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

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

Info

Publication number
WO2018012830A1
WO2018012830A1 PCT/KR2017/007363 KR2017007363W WO2018012830A1 WO 2018012830 A1 WO2018012830 A1 WO 2018012830A1 KR 2017007363 W KR2017007363 W KR 2017007363W WO 2018012830 A1 WO2018012830 A1 WO 2018012830A1
Authority
WO
WIPO (PCT)
Prior art keywords
scanning
block
transform
coefficient
mode
Prior art date
Application number
PCT/KR2017/007363
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 US16/308,208 priority Critical patent/US11863798B2/en
Priority to CN202311337844.0A priority patent/CN117412043A/zh
Priority to CN202311338274.7A priority patent/CN117412044A/zh
Priority to CN202311340532.5A priority patent/CN117412045A/zh
Priority to CN202311337836.6A priority patent/CN117412042A/zh
Priority to CN201780043698.7A priority patent/CN109479138B/zh
Publication of WO2018012830A1 publication Critical patent/WO2018012830A1/ko
Priority to US18/513,906 priority patent/US20240098311A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
    • 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/129Scanning of coding units, e.g. zig-zag scan of transform coefficients or flexible macroblock ordering [FMO]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • 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/146Data rate or code amount at the encoder output
    • H04N19/149Data rate or code amount at the encoder output by estimating the code amount by means of a model, e.g. mathematical model or statistical model
    • 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/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/167Position within a video image, e.g. region of interest [ROI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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/18Methods 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 a set of transform coefficients
    • 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/182Methods 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 a pixel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/649Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding the transform being applied to non rectangular image segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/88Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving rearrangement of data among different coding units, e.g. shuffling, interleaving, scrambling or permutation of pixel data or permutation of transform coefficient data among different blocks

Definitions

  • the present invention relates to a method and apparatus for encoding / decoding an image, and more particularly, to a method and apparatus for encoding / decoding an image using scanning.
  • HD high definition
  • UHD ultra high definition
  • An inter-screen prediction technique for predicting pixel values included in the current picture from a picture before or after the current picture using an image compression technology
  • an intra-picture prediction technology for predicting pixel values included in the current picture using pixel information in the current picture
  • transformation and quantization techniques for compressing the energy of the residual signal
  • entropy coding technique for assigning short codes to high-frequency values and long codes for low-frequency values.
  • Image data can be effectively compressed and transmitted or stored.
  • An object of the present invention is to provide a method and apparatus for efficiently encoding / decoding an image.
  • a method of encoding an image may include generating a transform block by performing at least one of transform and quantization, and grouping at least one coefficient included in the transform block into at least one coefficient group (CG).
  • the method may include scanning at least one coefficient included in the coefficient group, and encoding the at least one coefficient.
  • the scanning may be at least one of transform block reference diagonal scanning, transform block reference zigzag scanning, and boundary scanning.
  • the scanning is a diagonal block based scanning of the transform block
  • the scanning is performed in the order of the position of the DC coefficient at the lower right AC coefficient position of the transform block, or the DC of the transform block.
  • the diagonal direction is the lower left diagonal direction or the upper right diagonal direction
  • the at least one CG each includes a predetermined number of coefficients consecutive in the scanning order. Can be.
  • the scanning is the transform block reference zigzag scanning
  • the scanning is performed in the order of the position of the DC coefficient at the lower right AC coefficient position of the transform block, or the DC coefficient of the transform block.
  • Zc is performed in the order of the position of the lower right AC coefficient at the position of the at least one CG, and each of the at least one CG may include a predetermined number of coefficients consecutive in the scanning order.
  • each of the at least one CG may be different in size or shape from other CGs.
  • the first scanning may be zigzag scanning
  • the second scanning may be at least one of horizontal and vertical scanning.
  • the method may further include specifying a predetermined region of the transform block, and at least one of scanning, grouping, and encoding may not be performed on coefficients included in the predetermined region.
  • the predetermined area may be specified based on the coordinates of the coefficients in the transform block.
  • the scanning when the transform block is rectangular, the scanning may be zigzag scanning, and the zigzag scanning may be zigzag scanning inclined toward the longer side of the transform block.
  • an image decoding method includes grouping the at least one coefficient into at least one coefficient group (CG) based on scanning information or scanning information about scanning at least one coefficient included in a transform block. Identifying grouping information about the method, decoding at least one coefficient included in the transform block from the bitstream, and restoring the transform block based on the at least one coefficient.
  • the decoding of the coefficient of may be performed based on at least one of the scanning information and the grouping information.
  • the scanning may be at least one of transform block reference diagonal scanning, transform block reference zigzag scanning, and boundary scanning.
  • the scanning is the diagonal block scanning based on the transform block
  • the scanning is performed in the order of the position of the DC coefficient at the lower right AC coefficient position of the transform block, or the DC of the transform block.
  • the diagonal direction is the lower left diagonal direction or the upper right diagonal direction, and the at least one CG each includes a predetermined number of coefficients consecutive in the scanning order. Can be.
  • the scanning is the transform block reference zigzag scanning
  • the scanning is performed in the order of the position of the DC coefficient at the lower right AC coefficient position of the transform block, or the DC coefficient of the transform block.
  • Zc is performed in the order of the position of the lower right AC coefficient at the position of the at least one CG, and each of the at least one CG may include a predetermined number of coefficients consecutive in the scanning order.
  • each of the at least one CG may be different in size or shape from other CGs.
  • the first scanning may be zigzag scanning
  • the second scanning may be at least one of horizontal and vertical scanning.
  • the method may further include specifying a predetermined region of the transform block, and coefficients included in the predetermined region may be set to zero.
  • the predetermined area may be specified based on the coordinates of the coefficients in the transform block.
  • the scanning when the transform block is rectangular, the scanning may be zigzag scanning, and the zigzag scanning may be zigzag scanning inclined toward the longer side of the transform block.
  • the image encoding apparatus generates a transform block by performing at least one of transform and quantization, group at least one coefficient included in the transform block into at least one coefficient group (CG),
  • An encoder may be configured to scan at least one coefficient included in the coefficient group and to encode the at least one coefficient.
  • the recording medium performs at least one of transform and quantization to generate a transform block, grouping at least one coefficient included in the transform block into at least one coefficient group (CG),
  • a bitstream generated by an image encoding method may include storing at least one coefficient included in the coefficient group, and encoding the at least one coefficient.
  • the encoding / decoding efficiency of an image can be improved.
  • the amount of bits required for encoding the coefficients in the TU can be reduced.
  • FIG. 1 is a block diagram illustrating a configuration of an encoding apparatus according to an embodiment of the present invention.
  • FIG. 2 is a block diagram illustrating a configuration of a decoding apparatus according to an embodiment of the present invention.
  • FIG. 3 is a diagram schematically illustrating a division structure of an image when encoding and decoding an image.
  • FIG. 4 is a diagram illustrating a form of a prediction unit PU that may be included in the coding unit CU.
  • FIG. 5 is a diagram illustrating a form of a transform unit (TU) that a coding unit CU may include.
  • TU transform unit
  • FIG. 6 is a diagram for explaining an embodiment of an intra prediction process.
  • FIG. 7 is a diagram for explaining an embodiment of an inter prediction process.
  • FIG. 8 is a diagram for describing a transform set according to an intra prediction mode.
  • 9 is a view for explaining the process of the conversion.
  • 10 is a diagram for describing scanning of quantized transform coefficients.
  • 11 is a diagram for explaining block division.
  • FIG. 12 is a diagram illustrating a basis vector in the DCT-2 frequency domain according to the present invention.
  • FIG. 13 is a diagram illustrating a basis vector in the DST-7 frequency domain according to the present invention.
  • FIG. 14 is a diagram illustrating a distribution of average residual values according to positions in a 2N ⁇ 2N prediction unit PU of an 8 ⁇ 8 coding unit CU predicted in an inter mode of a Cactus sequence according to the present invention.
  • FIG. 15 is a 3D graph illustrating a distribution characteristic of residual values in a 2N ⁇ 2N prediction unit PU of an 8 ⁇ 8 coding unit CU predicted in an inter mode according to the present invention.
  • FIG. 16 is a diagram illustrating a residual distribution feature in a 2N ⁇ 2N prediction unit (PU) mode of a coding unit (CU) according to the present invention.
  • FIG. 17 illustrates residual distribution characteristics before and after shuffling of a 2N ⁇ 2N prediction unit (PU) according to the present invention.
  • 18 is a diagram illustrating an example of 4x4 residual data rearrangement of a subblock according to the present invention.
  • FIG. 19 is a diagram illustrating a transform unit (TU) partition structure and a shuffling method of a transform unit (TU) according to a prediction unit (PU) mode of a coding unit (CU) according to the present invention.
  • FIG. 20 is a diagram illustrating a result of performing DCT-2 and SDST according to a residual distribution of a 2N ⁇ 2N prediction unit (PU) according to the present invention.
  • FIG 21 illustrates an SDST process according to the present invention.
  • FIG. 22 illustrates size distribution characteristics of transform unit (TU) partition and residual absolute values according to prediction unit (PU) partition mode of an inter prediction predicted coding unit (CU) according to the present invention.
  • FIG. 23 is a diagram illustrating a residual signal scanning order and relocation order of a transform unit TU having a depth value of 0 according to the present invention.
  • RDO rate-distortion optimization
  • 25 is a flowchart illustrating a DCT-2 or SDST selective decoding process according to the present invention.
  • 26 is a flowchart illustrating a decoding process using the SDST according to the present invention.
  • 27 and 28 show positions where residual rearrangement is performed in the encoder and the decoder according to the present invention, respectively.
  • 29 is a flowchart illustrating a decoding method using the SDST method according to the present invention.
  • FIG. 30 is a flowchart illustrating a coding method using the SDST method according to the present invention.
  • FIG. 31 is a diagram for explaining an example in which transform and / or quantized coefficients in a TU having a size of 16 ⁇ 16 are grouped in CG units.
  • FIG. 32 exemplarily shows a scanning order of all coefficients within a TU having a size of 16 ⁇ 16.
  • 33 is a diagram for explaining the necessity of configuring distribution of coefficients in TU, efficient scanning, and CG.
  • 34 is a diagram for explaining lower left diagonal scanning and / or grouping according to an embodiment of the present invention.
  • FIG. 35 exemplarily illustrates a coding / decoding region of a 32x32 TU.
  • FIG. 36 is a diagram illustrating zigzag scanning and / or grouping according to an embodiment of the present invention.
  • 38 exemplarily illustrates an encoding / decoding region of a 32x32 TU.
  • FIG. 39 exemplarily illustrates scanning and / or grouping for a horizontally long rectangular TU.
  • FIG. 40 exemplarily illustrates scanning and / or grouping for a vertically long rectangular TU.
  • FIG. 41 is an exemplary diagram for describing a reference CG when encoding / decoding a CSBF of a current CG in an 8x8 TU to which a scanning and / or grouping method according to the present invention is applied.
  • first and second may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another.
  • the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component.
  • any component of the invention When any component of the invention is said to be “connected” or “connected” to another component, it may be directly connected to or connected to that other component, but other components may be present in between. It should be understood that it may. On the other hand, when a component is referred to as being “directly connected” or “directly connected” to another component, it should be understood that there is no other component in between.
  • each component shown in the embodiments of the present invention are shown independently to represent different characteristic functions, and do not mean that each component is made of separate hardware or one software component unit.
  • each component is included in each component for convenience of description, and at least two of the components may be combined into one component, or one component may be divided into a plurality of components to perform a function.
  • Integrated and separate embodiments of the components are also included within the scope of the present invention without departing from the spirit of the invention.
  • Some components of the present invention are not essential components for performing essential functions in the present invention but may be optional components for improving performance.
  • the present invention can be implemented including only the components essential for implementing the essentials of the present invention except for the components used for improving performance, and the structure including only the essential components except for the optional components used for improving performance. Also included in the scope of the present invention.
  • an image may mean one picture constituting a video and may represent a video itself.
  • "encoding and / or decoding of an image” may mean “encoding and / or decoding of a video” and may mean “encoding and / or decoding of one of images constituting the video.” It may be.
  • the picture may have the same meaning as the image.
  • Encoder This may mean an apparatus for performing encoding.
  • Decoder Refers to an apparatus for performing decoding.
  • Parsing This may mean determining a value of a syntax element by entropy decoding or may refer to entropy decoding itself.
  • An MxN array of samples where M and N are positive integer values, and a block can often mean a two-dimensional sample array.
  • Sample This is a basic unit that constitutes a block and can represent values from 0 to 2 Bd -1 depending on the bit depth (B d ).
  • the pixel and the pixel may be used as the sample.
  • Unit may mean a unit of image encoding and decoding.
  • a unit may be an area generated by division of one image.
  • a unit may mean a divided unit when a single image is divided into subdivided units to be encoded or decoded.
  • a predetermined process may be performed for each unit.
  • One unit may be further divided into subunits having a smaller size than the unit.
  • the unit may be a block, a macroblock, a coding tree unit, a coding tree block, a coding unit, a coding block, a prediction. It may mean a unit, a prediction block, a transform unit, a transform block, or the like.
  • the unit may refer to a luma component block, a chroma component block corresponding thereto, and a syntax element for each block in order to refer to the block separately.
  • the unit may have various sizes and shapes, and in particular, the shape of the unit may include a geometric figure that can be expressed in two dimensions such as a square, a trapezoid, a triangle, a pentagon, as well as a rectangle.
  • the unit information may include at least one of a type of a unit indicating a coding unit, a prediction unit, a transformation unit, and the like, a size of a unit, a depth of a unit, an encoding and decoding order of the unit, and the like.
  • a reconstructed neighbor unit may refer to a unit that has already been encoded or decoded in a spatial / temporal manner around the encoding / decoding target unit.
  • the restored peripheral unit may mean a restored peripheral block.
  • a neighbor block may mean a block adjacent to an encoding / decoding target block.
  • the block adjacent to the encoding / decoding object block may mean a block in which a boundary of the encoding / decoding object block abuts.
  • the neighboring block may mean a block located at an adjacent vertex of the encoding / decoding target block.
  • the neighboring block may mean a restored neighboring block.
  • Unit Depth It means the degree of unit division. In the tree structure, the root node has the smallest depth, and the leaf node has the deepest depth.
  • This may mean a encoding / decoding target unit syntax element, a coding parameter, a value of a transform coefficient, or the like.
  • Parameter set may correspond to header information among structures in the bitstream, and includes a video parameter set, a sequence parameter set, a picture parameter set, and an adaptive parameter set. At least one or more of the adaptation parameter set may be included in the parameter set.
  • the parameter set may have a meaning including slice header and tile header information.
  • Bitstream may mean a string of bits including encoded image information.
  • Prediction Unit This is a basic unit when performing inter prediction or intra prediction and compensation thereof, and one prediction unit may be divided into a plurality of partitions having a small size. In this case, each of the plurality of partitions becomes a basic unit at the time of performing the prediction and compensation, and the partition in which the prediction unit is divided may also be called a prediction unit.
  • the prediction unit may have various sizes and shapes, and in particular, the shape of the prediction unit may include a geometric figure that can be expressed in two dimensions such as a square, a trapezoid, a triangle, a pentagon, as well as a rectangle.
  • Prediction Unit Partition This may mean a form in which a prediction unit is divided.
  • Reference Picture List refers to a list including one or more reference pictures used for inter prediction or motion compensation.
  • the types of reference picture lists may be LC (List Combined), L0 (List 0), L1 (List 1), L2 (List 2), L3 (List 3), and the like. Lists can be used.
  • Inter Prediction Indicator It may mean the inter prediction direction (unidirectional prediction, bi-directional prediction, etc.) of the block to be encoded / decoded during inter prediction, and the block to be encoded / decoded will generate the prediction block. This may mean the number of reference pictures used, and may mean the number of prediction blocks used when the encoding / decoding target block performs inter prediction or motion compensation.
  • a reference picture index may mean an index of a specific reference picture in the reference picture list.
  • Reference Picture Refers to an image referred to by a specific unit for inter prediction or motion compensation.
  • the reference picture may also be referred to as a reference picture.
  • Motion Vector A two-dimensional vector used for inter prediction or motion compensation, and may mean an offset between an encoding / decoding target image and a reference image.
  • (mvX, mvY) may represent a motion vector
  • mvX may represent a horizontal component
  • mvY may represent a vertical component.
  • Motion Vector Candidate When a motion vector is predicted, it may mean a unit which is a prediction candidate or a motion vector of the unit.
  • a motion vector candidate list may mean a list constructed using motion vector candidates.
  • Motion Vector Candidate Index An indicator indicating a motion vector candidate in a motion vector candidate list, and may be referred to as an index of a motion vector predictor.
  • Motion Information Information including at least one of a motion vector, a reference picture index, an inter prediction indicator, as well as reference picture list information, a reference picture, a motion vector candidate, and a motion vector candidate index. It may mean.
  • a merge candidate list may mean a list constructed using merge candidates.
  • the merge candidate may include prediction type information, each of which is a prediction type information. It may include motion information such as a reference picture index and a motion vector for the list.
  • Merge Index refers to information indicating a merge candidate in the merge candidate list.
  • the merge index may indicate a block in which a merge candidate is derived among blocks reconstructed adjacent to the current block in a spatial / temporal manner.
  • the merge index may indicate at least one or more of the motion information that the merge candidate has.
  • a transform unit may refer to a basic unit when performing residual signal encoding / decoding such as transform, inverse transform, quantization, inverse quantization, and transform coefficient encoding / decoding. It may be divided into a plurality of transform units having a small size.
  • the transform unit may have various sizes and shapes, and in particular, the shape of the transform unit may include a geometric figure that can be expressed in two dimensions such as a square, a trapezoid, a triangle, a pentagon, as well as a rectangle.
  • Scaling This may mean a process of multiplying a transform coefficient level by a factor and generating a transform coefficient as a result. Scaling can also be called dequantization.
  • a quantization parameter may mean a value used when scaling transform coefficient levels in quantization and inverse quantization.
  • the quantization parameter may be a value mapped to a quantization step size.
  • a quantization parameter may mean a differential value between the predicted quantization parameter and the quantization parameter of the encoding / decoding target unit.
  • Scan Refers to a method of arranging the order of coefficients in a block or matrix. For example, aligning a two-dimensional array into a one-dimensional array is called a scan, and a one-dimensional array into a two-dimensional array. Sorting can also be called scan or inverse scan.
  • Transform Coefficient A coefficient value generated after performing a transform, and in the present invention, a quantized transform coefficient level in which quantization is applied to the transform coefficient may also be included in the meaning of the transform coefficient.
  • Non-zero Transform Coefficient may mean a transform coefficient whose magnitude is not zero or a transform coefficient level whose magnitude is not zero.
  • Quantization Matrix A matrix used in a quantization or inverse quantization process to improve the subjective or objective image quality of an image.
  • the quantization matrix may also be called a scaling list.
  • Quantization Matrix Coefficient It may mean each element in the quantization matrix. Quantization matrix coefficients may also be referred to as matrix coefficients.
  • a predetermined matrix may mean a predetermined quantization matrix defined in the encoder and the decoder.
  • Non-default Matrix A non-default matrix, which is not defined in advance in the encoder and the decoder, may mean a quantization matrix transmitted / received by a user.
  • a coding component may be composed of two color difference component (Cb, Cr) coding tree blocks associated with one luminance component (Y) coding tree block.
  • Each coding tree unit may be split using one or more partitioning methods such as a quad tree and a binary tree to form sub-units such as a coding unit, a prediction unit, and a transform unit.
  • partitioning methods such as a quad tree and a binary tree to form sub-units such as a coding unit, a prediction unit, and a transform unit.
  • Coding Tree Block A term used to refer to any one of a Y coded tree block, a Cb coded tree block, and a Cr coded tree block.
  • FIG. 1 is a block diagram illustrating a configuration of an encoding apparatus according to an embodiment of the present invention.
  • the encoding apparatus 100 may be a video encoding apparatus or an image encoding apparatus.
  • the video may include one or more images.
  • the encoding apparatus 100 may sequentially encode one or more images of the video over time.
  • the encoding apparatus 100 may include a motion predictor 111, a motion compensator 112, an intra predictor 120, a switch 115, a subtractor 125, a transformer 130, and quantization.
  • the unit 140 may include an entropy encoder 150, an inverse quantizer 160, an inverse transform unit 170, an adder 175, a filter unit 180, and a reference picture buffer 190.
  • the encoding apparatus 100 may encode the input image in an intra mode and / or an inter mode. In addition, the encoding apparatus 100 may generate a bitstream through encoding of an input image, and may output the generated bitstream.
  • the switch 115 When the intra mode is used as the prediction mode, the switch 115 may be switched to intra, and when the inter mode is used as the prediction mode, the switch 115 may be switched to inter.
  • the intra mode may mean an intra prediction mode
  • the inter mode may mean an inter prediction mode.
  • the encoding apparatus 100 may generate a prediction block for the input block of the input image. In addition, after the prediction block is generated, the encoding apparatus 100 may encode a residual between the input block and the prediction block.
  • the input image may be referred to as a current image that is a target of current encoding.
  • the input block may be referred to as a current block or an encoding target block that is a target of the current encoding.
  • the intra prediction unit 120 may use the pixel value of a block that is already encoded around the current block as a reference pixel.
  • the intra predictor 120 may perform spatial prediction using the reference pixel, and generate prediction samples for the input block through spatial prediction.
  • Intra prediction may refer to intra prediction.
  • the motion predictor 111 may search an area that best matches the input block from the reference image in the motion prediction process, and derive a motion vector using the searched area.
  • the reference picture may be stored in the reference picture buffer 190.
  • the motion compensator 112 may generate a prediction block by performing motion compensation using a motion vector.
  • the motion vector may be a two-dimensional vector used for inter prediction.
  • the motion vector may indicate an offset between the current picture and the reference picture.
  • inter prediction may mean inter prediction.
  • the motion predictor 111 and the motion compensator 112 may generate a prediction block by applying an interpolation filter to a part of a reference image when the motion vector does not have an integer value.
  • a motion prediction and motion compensation method of a prediction unit included in a coding unit based on a coding unit may be skip mode, merge mode, or AMVP mode. ), It may be determined which method is the current picture reference mode, and inter prediction or motion compensation may be performed according to each mode.
  • the current picture reference mode may mean a prediction mode using a pre-restored region in the current picture to which the encoding target block belongs.
  • a motion vector for the current picture reference mode may be defined to specify the pre-restored region. Whether the encoding target block is encoded in the current picture reference mode may be encoded using the reference image index of the encoding target block.
  • the subtractor 125 may generate a residual block using the difference between the input block and the prediction block.
  • the residual block may be referred to as the residual signal.
  • the transform unit 130 may generate a transform coefficient by performing transform on the residual block, and output a transform coefficient.
  • the transform coefficient may be a coefficient value generated by performing transform on the residual block.
  • the transform unit 130 may omit the transform on the residual block.
  • Quantized transform coefficient levels may be generated by applying quantization to the transform coefficients.
  • the quantized transform coefficient level may also be referred to as transform coefficient.
  • the quantization unit 140 may generate a quantized transform coefficient level by quantizing the transform coefficient according to the quantization parameter, and output the quantized transform coefficient level. In this case, the quantization unit 140 may quantize the transform coefficients using the quantization matrix.
  • the entropy encoder 150 may generate a bitstream by performing entropy encoding according to probability distribution on values calculated by the quantizer 140 or coding parameter values calculated in the encoding process. And output a bitstream.
  • the entropy encoder 150 may perform entropy encoding on information for decoding an image in addition to information on pixels of an image.
  • the information for decoding the image may include a syntax element.
  • the entropy encoder 150 may use an encoding method such as exponential golomb, context-adaptive variable length coding (CAVLC), or context-adaptive binary arithmetic coding (CABAC) for entropy encoding.
  • CAVLC context-adaptive variable length coding
  • CABAC context-adaptive binary arithmetic coding
  • the entropy encoder 150 may perform entropy encoding using a variable length coding (VLC) table.
  • VLC variable length coding
  • the entropy encoder 150 derives a binarization method of a target symbol and a probability model of a target symbol / bin, and then performs arithmetic coding using the derived binarization method or a probability model. You may.
  • the entropy encoder 150 may change a two-dimensional block shape coefficient into a one-dimensional vector form through a transform coefficient scanning method to encode a transform coefficient level.
  • a transform coefficient scanning method For example, upright scanning can be used to scan the coefficients of a block to change it into a one-dimensional vector.
  • a vertical scan that scans two-dimensional block shape coefficients in a column direction instead of an upright scan and a horizontal scan that scans two-dimensional block shape coefficients in a row direction may be used. That is, according to the size of the conversion unit and the intra prediction mode, it is possible to determine which scan method among upright scan, vertical scan and horizontal scan is used.
  • the coding parameter may include information derived from an encoding or decoding process as well as information encoded by an encoder and transmitted to a decoder, such as a syntax element, and may mean information required when encoding or decoding an image. have. For example, block size, block depth, block splitting information, unit size, unit depth, unit splitting information, quadtree split flag, binary tree split flag, binary tree split direction, intra prediction mode, Intra prediction direction, reference sample filtering method, prediction block boundary filtering method, filter tab, filter coefficient, inter prediction mode, motion information, motion vector, reference image index, inter prediction direction, inter prediction indicator, reference image list , Motion vector predictor, motion vector candidate list, motion merge mode, motion merge candidate, motion merge candidate list, skip mode, interpolation filter type, motion vector size, motion vector representation accuracy , Transform type, transform size, additional (secondary) transform availability information, residual signal presence information, coded block pattern, Coded Block Flag, Quantization Parameter, Quantization Matrix, In-loop Filter Information, In-loop Filter App
  • the residual signal may mean a difference between the original signal and the prediction signal.
  • the residual signal may be a signal generated by transforming a difference between the original signal and the prediction signal.
  • the residual signal may be a signal generated by transforming and quantizing the difference between the original signal and the prediction signal.
  • the residual block may be a residual signal in block units.
  • the encoded current image may be used as a reference image with respect to other image (s) to be processed later. Therefore, the encoding apparatus 100 may decode the encoded current image again and store the decoded image as a reference image. Inverse quantization and inverse transform on the encoded current image may be processed for decoding.
  • the quantized coefficients may be dequantized in inverse quantization unit 160.
  • the inverse transform unit 170 may perform an inverse transform.
  • the inverse quantized and inverse transformed coefficients may be summed with the prediction block via the adder 175.
  • a reconstructed block may be generated by adding the inverse quantized and inverse transformed coefficients and the prediction block.
  • the recovery block may pass through the filter unit 180.
  • the filter unit 180 may apply at least one of a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the reconstructed block or the reconstructed image. Can be.
  • the filter unit 180 may be referred to as an in-loop filter.
  • the deblocking filter may remove block distortion generated at boundaries between blocks.
  • it may be determined whether to apply the deblocking filter to the current block based on the pixels included in the several columns or rows included in the block.
  • a strong filter or a weak filter may be applied according to the required deblocking filtering strength.
  • horizontal filtering and vertical filtering may be performed in parallel when vertical filtering and horizontal filtering are performed.
  • the sample adaptive offset may add an appropriate offset value to the pixel value to compensate for the encoding error.
  • the sample adaptive offset may correct the offset with the original image on a pixel basis for the deblocked image.
  • the pixels included in the image are divided into a predetermined number of areas, and then, the area to be offset is determined and the offset is applied to the corresponding area or the offset considering the edge information of each pixel. You can use this method.
  • the adaptive loop filter may perform filtering based on a comparison value between the reconstructed image and the original image. After dividing the pixels included in the image into a predetermined group, one filter to be applied to the group may be determined and filtering may be performed for each group. For information related to whether to apply the adaptive loop filter, a luminance signal may be transmitted for each coding unit (CU), and the shape and filter coefficient of the adaptive loop filter to be applied according to each block may vary. In addition, an adaptive loop filter of the same type (fixed form) may be applied regardless of the characteristics of the block to be applied.
  • the reconstructed block that has passed through the filter unit 180 may be stored in the reference picture buffer 190.
  • FIG. 2 is a block diagram illustrating a configuration of a decoding apparatus according to an embodiment of the present invention.
  • the decoding apparatus 200 may be a video decoding apparatus or an image decoding apparatus.
  • the decoding apparatus 200 may include an entropy decoder 210, an inverse quantizer 220, an inverse transform unit 230, an intra predictor 240, a motion compensator 250, and an adder 255.
  • the filter unit 260 may include a reference picture buffer 270.
  • the decoding apparatus 200 may receive a bitstream output from the encoding apparatus 100.
  • the decoding apparatus 200 may decode the bitstream in an intra mode or an inter mode.
  • the decoding apparatus 200 may generate a reconstructed image through decoding and output the reconstructed image.
  • the switch When the prediction mode used for decoding is an intra mode, the switch may be switched to intra. When the prediction mode used for decoding is an inter mode, the switch may be switched to inter.
  • the decoding apparatus 200 may obtain a reconstructed residual block from the input bitstream, and generate a prediction block. When the reconstructed residual block and the prediction block are obtained, the decoding apparatus 200 may generate a reconstruction block that is a decoding target block by adding the reconstructed residual block and the prediction block.
  • the decoding target block may be referred to as a current block.
  • the entropy decoder 210 may generate symbols by performing entropy decoding according to a probability distribution of the bitstream.
  • the generated symbols may include symbols in the form of quantized transform coefficient levels.
  • the entropy decoding method may be similar to the entropy encoding method described above.
  • the entropy decoding method may be an inverse process of the above-described entropy encoding method.
  • the entropy decoder 210 may change the one-dimensional vector form coefficient into a two-dimensional block form through a transform coefficient scanning method.
  • a transform coefficient scanning method For example, upright scanning can be used to scan the coefficients of a block to change it into a two-dimensional block shape.
  • vertical scan or horizontal scan may be used instead of upright scan. That is, according to the size of the conversion unit and the intra prediction mode, it is possible to determine which scan method among upright scan, vertical scan and horizontal scan is used.
  • the quantized transform coefficient level may be inversely quantized by the inverse quantizer 220 and inversely transformed by the inverse transformer 230.
  • a reconstructed residual block may be generated.
  • the inverse quantization unit 220 may apply a quantization matrix to the quantized transform coefficient level.
  • the intra predictor 240 may generate a prediction block by performing spatial prediction using pixel values of blocks that are already decoded around the decoding target block.
  • the motion compensator 250 may generate a predictive block by performing motion compensation using a reference vector stored in the motion vector and the reference picture buffer 270.
  • the motion compensator 250 may generate a prediction block by applying an interpolation filter to a portion of the reference image.
  • a motion compensation method of a prediction unit included in a coding unit is selected from among skip mode, merge mode, AMVP mode, and current picture reference mode. It may be determined whether or not it is a method, and motion compensation may be performed according to each mode.
  • the current picture reference mode may mean a prediction mode using a pre-restored region in the current picture to which the decoding target block belongs.
  • a motion vector for the current picture reference mode may be used to specify the pre-restored region.
  • a flag or index indicating whether the decoding object block is a block encoded in the current picture reference mode may be signaled or inferred through a reference picture index of the decoding object block.
  • the current picture may exist at a fixed position (eg, the position at which the reference image index is 0 or the last position) in the reference image list for the decoding object block.
  • the reference picture index may be variably positioned in the reference picture list, and a separate reference picture index indicating the location of the current picture may be signaled for this purpose.
  • signaling a flag or index may mean that the encoder entropy encodes the flag or index and includes the flag or index in the bitstream, and the decoder entropy decodes the corresponding flag or index from the bitstream. Entropy Decoding).
  • the reconstructed residual block and the prediction block may be added through the adder 255.
  • the generated block may pass through the filter unit 260.
  • the filter unit 260 may apply at least one or more of a deblocking filter, a sample adaptive offset, and an adaptive loop filter to the reconstructed block or the reconstructed image.
  • the filter unit 260 may output the reconstructed image.
  • the reconstructed picture may be stored in the reference picture buffer 270 and used for inter prediction.
  • 3 is a diagram schematically illustrating a division structure of an image when encoding and decoding an image. 3 schematically shows an embodiment in which one unit is divided into a plurality of sub-units.
  • a coding unit may be used in encoding and decoding.
  • the coding unit may mean a coding unit.
  • a unit may be a term that collectively refers to a block including 1) a syntax element and 2) image samples.
  • "division of a unit” may mean “division of a block corresponding to a unit”.
  • the block division information may include information about a depth of a unit. The depth information may indicate the number and / or degree of division of the unit.
  • the image 300 is sequentially divided into units of a largest coding unit (LCU), and a split structure is determined by units of an LCU.
  • the LCU may be used as the same meaning as a coding tree unit (CTU).
  • CTU coding tree unit
  • One unit may be hierarchically divided with depth information based on a tree structure. Each divided subunit may have depth information. Since the depth information indicates the number and / or degree of division of the unit, the depth information may include information about the size of the sub-unit.
  • the partition structure may mean a distribution of a coding unit (CU) in the LCU 310.
  • the CU may be a unit for efficiently encoding / decoding an image. This distribution may be determined according to whether to divide one CU into a plurality of CUs (two or more positive integers including 2, 4, 8, 16, etc.).
  • the horizontal and vertical sizes of the CUs created by splitting are either half of the horizontal and vertical sizes of the CU before splitting, or smaller than the horizontal and vertical sizes of the CU before splitting, depending on the number of splits.
  • Can have The partitioned CU may be recursively divided into a plurality of CUs having reduced horizontal and vertical sizes in the same manner.
  • the depth information may be information indicating the size of a CU and may be stored for each CU.
  • the depth of the LCU may be 0, and the depth of the smallest coding unit (SCU) may be a predefined maximum depth.
  • the LCU may be a coding unit having a maximum coding unit size as described above, and the SCU may be a coding unit having a minimum coding unit size.
  • the division starts from the LCU 310, and the depth of the CU increases by one each time the division reduces the horizontal and vertical sizes of the CU.
  • the CU that is not divided may have a size of 2N ⁇ 2N.
  • a 2N ⁇ 2N sized CU may be divided into a plurality of CUs having an N ⁇ N size. The magnitude of N decreases in half for every 1 increase in depth.
  • the horizontal and vertical sizes of the divided four coding units may each have a size of half compared to the horizontal and vertical sizes of the coding unit before being split. have.
  • the four divided coding units may each have a size of 16x16.
  • the coding unit is divided into quad-tree shapes.
  • the horizontal or vertical size of the divided two coding units may have a half size compared to the horizontal or vertical size of the coding unit before splitting.
  • the two split coding units may have a size of 16x32.
  • the two divided coding units may each have a size of 32x16.
  • an LCU having a depth of 0 may be 64 ⁇ 64 pixels. 0 may be the minimum depth.
  • An SCU of depth 3 may be 8x8 pixels. 3 may be the maximum depth.
  • a CU of 64x64 pixels, which is an LCU may be represented by a depth of zero.
  • a CU of 32x32 pixels may be represented by depth one.
  • a CU of 16 ⁇ 16 pixels may be represented by depth two.
  • a CU of 8x8 pixels, which is an SCU, may be represented by depth 3.
  • information on whether the CU is split may be expressed through split information of the CU.
  • the split information may be 1 bit of information. All CUs except the SCU may include partition information. For example, if the value of the partition information is 0, the CU may not be split. If the value of the partition information is 1, the CU may be split.
  • FIG. 4 is a diagram illustrating a form of a prediction unit PU that may be included in the coding unit CU.
  • a CU that is no longer split among CUs partitioned from the LCU may be divided into one or more prediction units (PUs). This process may also be called division.
  • PUs prediction units
  • the PU may be a basic unit for prediction.
  • the PU may be encoded and decoded in any one of a skip mode, an inter screen mode, and an intra screen mode.
  • the PU may be divided into various forms according to modes.
  • the coding unit may not be divided into prediction units, and the coding unit and the prediction unit may have the same size.
  • the skip mode there may be no partition in the CU.
  • the 2N ⁇ 2N mode 410 having the same size as the CU without splitting may be supported.
  • inter-screen mode eight divided forms in the CU can be supported.
  • 2Nx2N mode 410, 2NxN mode 415, Nx2N mode 420, NxN mode 425, 2NxnU mode 430, 2NxnD mode 435, nLx2N mode 440, and nRx2N mode 445 may be supported.
  • 2Nx2N mode 410 and NxN mode 425 may be supported.
  • One coding unit may be split into one or more prediction units, and one prediction unit may also be split into one or more prediction units.
  • the horizontal and vertical sizes of the divided four prediction units may each have a size of half compared to the horizontal and vertical sizes of the prediction unit before splitting. have.
  • the four divided prediction units may each have a size of 16x16.
  • the horizontal or vertical size of the divided two prediction units may have a half size compared to the horizontal or vertical size of the prediction unit before splitting.
  • the two divided prediction units may each have a size of 16x32.
  • the two divided prediction units may each have a size of 32x16.
  • FIG. 5 is a diagram illustrating a form of a transform unit (TU) that a coding unit CU may include.
  • TU transform unit
  • a transform unit may be a basic unit used for a process of transform, quantization, inverse transform, and inverse quantization in a CU.
  • the TU may have a shape such as a square shape or a rectangle.
  • the TU may be determined dependent on the size and / or shape of the CU.
  • a CU that is no longer split into CUs may be split into one or more TUs.
  • the partition structure of the TU may be a quad-tree structure.
  • one CU 510 may be divided one or more times according to the quadtree structure. If a CU is split more than once, it can be said to be split recursively.
  • one CU 510 may be configured with TUs of various sizes. Or, it may be divided into one or more TUs based on the number of vertical lines and / or horizontal lines dividing the CU.
  • the CU may be divided into symmetrical TUs and may be divided into asymmetrical TUs.
  • Information about the size / shape of the TU may be signaled for division into an asymmetric TU and may be derived from information about the size / shape of the CU.
  • the coding unit may not be divided into a transform unit, and the coding unit and the transform unit may have the same size.
  • One coding unit may be split into one or more transform units, and one transform unit may also be split into one or more transform units.
  • the horizontal and vertical sizes of the divided four transform units may each have a size of half compared to the horizontal and vertical sizes of the transform unit before splitting. have.
  • the divided four transform units may have a size of 16x16.
  • the horizontal or vertical size of the divided two transform units may be half the size of the transform unit before the split.
  • the two divided transform units may have a size of 16x32.
  • the divided two transform units may each have a size of 32x16.
  • the transform unit may be said to be divided into a binary-tree.
  • the residual block may be transformed using at least one of a plurality of pre-defined transformation methods.
  • Discrete Cosine Transform DCT
  • DST Discrete Sine Transform
  • KLT KLT
  • Which transformation method is applied to transform the residual block may be determined using at least one of inter prediction mode information of the prediction unit, intra prediction mode information, and size / shape of the transform block, and in some cases, indicates a transformation method.
  • the information may be signaled.
  • FIG. 6 is a diagram for explaining an embodiment of an intra prediction process.
  • the intra prediction mode may be a non-directional mode or a directional mode.
  • the non-directional mode may be a DC mode or a planar mode
  • the directional mode may be a prediction mode having a specific direction or angle, and the number may be one or more M.
  • the directional mode may be expressed by at least one of a mode number, a mode value, a mode number, and a mode angle.
  • the number of intra prediction modes may be one or more N including the non-directional and directional modes.
  • the number of intra prediction modes may vary depending on the size of the block.
  • the size of a block may be 67 pieces in case of 4x4 or 8x8, 35 pieces in case of 16x16, 19 pieces in case of 32x32, and 7 pieces in case of 64x64.
  • the number of intra prediction modes may be fixed to N regardless of the size of the block. For example, it may be fixed to at least one of 35 or 67 regardless of the size of the block.
  • the number of intra prediction modes may vary depending on the type of color component. For example, the number of prediction modes may vary depending on whether the color component is a luma signal or a chroma signal.
  • Intra picture encoding and / or decoding may be performed using sample values or encoding parameters included in neighboring reconstructed blocks.
  • a step of checking whether samples included in neighboring reconstructed blocks are available as reference samples of the encoding / decoding target block may be performed. If there are samples that are not available as reference samples of the block to be encoded / decoded, at least one or more of the samples included in the neighboring reconstructed blocks are used to copy and / or sample values to samples that are not available as reference samples. Interpolation may be used as a reference sample of a block to be encoded / decoded.
  • a filter may be applied to at least one of a reference sample or a prediction sample based on at least one of an intra prediction mode and a size of an encoding / decoding target block.
  • the encoding / decoding target block may mean a current block and may mean at least one of a coding block, a prediction block, and a transform block.
  • the type of filter applied to the reference sample or the prediction sample may be different according to at least one or more of the intra prediction mode or the size / shape of the current block.
  • the type of filter may vary depending on at least one of the number of filter taps, a filter coefficient value, or a filter strength.
  • the non-directional planar mode In the intra prediction mode, the non-directional planar mode generates a predicted block of a target encoding / decoding block.
  • the upper right reference sample of the current block may be generated as a weighted sum of the lower left reference samples of the current block.
  • the non-directional DC mode may be generated as an average value of upper reference samples of the current block and left reference samples of the current block when generating the prediction block of the target coding / decoding block.
  • one or more upper rows and one or more left columns adjacent to the reference sample in the encoding / decoding block may be filtered using reference sample values.
  • the prediction block may be generated by using the upper right and / or lower left reference samples, and the directional modes may have different directions.
  • Real interpolation may be performed to generate predictive sample values.
  • the intra prediction mode of the current prediction block may be predicted from the intra prediction mode of the prediction block existing around the current prediction block.
  • the current prediction is performed by using predetermined flag information.
  • Information that the intra prediction modes of the block and the neighboring prediction block are the same may be transmitted. If the intra prediction modes of the current prediction block and the neighboring prediction block are different, entropy encoding is performed to perform the intra prediction mode of the encoding / decoding target block. Information can be encoded.
  • FIG. 7 is a diagram for explaining an embodiment of an inter prediction process.
  • the rectangle illustrated in FIG. 7 may represent an image (or a picture).
  • arrows in FIG. 7 may indicate prediction directions. That is, the image may be encoded and / or decoded according to the prediction direction.
  • Each picture may be classified into an I picture (Intra Picture), a P picture (U-predictive Picture), a B picture (Bi-predictive Picture), and the like.
  • Each picture may be encoded and decoded according to an encoding type of each picture.
  • the image to be encoded When the image to be encoded is an I picture, the image may be encoded in the picture with respect to the image itself without inter prediction.
  • the image to be encoded When the image to be encoded is a P picture, the image may be encoded through inter prediction or motion compensation using the reference image only in the forward direction. If the image to be encoded is a B picture, it may be encoded through inter prediction or motion compensation using reference pictures in both forward and reverse directions, and inter prediction or motion using the reference picture in one of the forward and reverse directions. Can be coded through compensation.
  • the encoder may perform inter prediction or motion compensation, and the decoder may perform motion compensation corresponding thereto.
  • the pictures of the P picture and the B picture that are encoded and / or decoded using the reference picture may be regarded as a picture using inter prediction.
  • Inter prediction or motion compensation may be performed using a reference picture and motion information.
  • inter prediction may use the skip mode described above.
  • the reference picture may be at least one of a previous picture of the current picture or a subsequent picture of the current picture.
  • the inter prediction may perform prediction on a block of the current picture based on the reference picture.
  • the reference picture may mean an image used for prediction of the block.
  • an area in the reference picture may be specified by using a reference picture index (refIdx) indicating a reference picture, a motion vector to be described later, and the like.
  • the inter prediction may select a reference picture corresponding to the current block within the reference picture and the reference picture, and generate a prediction block for the current block using the selected reference block.
  • the current block may be a block targeted for current encoding or decoding among blocks of the current picture.
  • the motion information may be derived during inter prediction by each of the encoding apparatus 100 and the decoding apparatus 200.
  • the derived motion information may be used to perform inter prediction.
  • the encoding apparatus 100 and the decoding apparatus 200 use encoding information and / or decoding efficiency by using motion information of a reconstructed neighboring block and / or motion information of a collocated block (col block).
  • the call block may be a block corresponding to a spatial position of a block to be encoded / decoded in a collocated picture (col picture).
  • the reconstructed neighboring block may be a block within the current picture and may be a block that is already reconstructed through encoding and / or decoding.
  • the reconstruction block may be a neighboring block adjacent to the encoding / decoding object block and / or a block located at an outer corner of the encoding / decoding object block.
  • the block located at the outer corner of the encoding / decoding target block is a block vertically adjacent to a neighboring block horizontally adjacent to the encoding / decoding target block or a block horizontally adjacent to a neighboring block vertically adjacent to the encoding / decoding target block. Can be.
  • Each of the encoding apparatus 100 and the decoding apparatus 200 may determine a block existing at a position corresponding to a block to be encoded / decoded spatially within a call picture, and determines a predetermined relative position based on the determined block. Can be.
  • the predefined relative position may be a position inside and / or outside of a block existing at a position corresponding to a block to be encoded / decoded spatially.
  • each of the encoding apparatus 100 and the decoding apparatus 200 may derive a call block based on the determined predetermined relative position.
  • the call picture may be one picture among at least one reference picture included in the reference picture list.
  • the method of deriving the motion information may vary according to the prediction mode of the encoding / decoding target block.
  • a prediction mode applied for inter prediction there may be an advanced motion vector prediction (AMVP) and a merge mode.
  • AMVP advanced motion vector prediction
  • the merge mode may be referred to as a motion merge mode.
  • each of the encoding apparatus 100 and the decoding apparatus 200 uses a motion vector of the reconstructed neighboring block and / or a motion vector of the call block. create a motion vector candidate list.
  • the motion vector of the reconstructed neighboring block and / or the motion vector of the call block may be used as a motion vector candidate.
  • the motion vector of the call block may be referred to as a temporal motion vector candidate
  • the motion vector of the reconstructed neighboring block may be referred to as a spatial motion vector candidate.
  • the bitstream generated by the encoding apparatus 100 may include a motion vector candidate index. That is, the encoding apparatus 100 may generate a bitstream by entropy encoding a motion vector candidate index.
  • the motion vector candidate index may indicate an optimal motion vector candidate selected from the motion vector candidates included in the motion vector candidate list.
  • the motion vector candidate index may be transmitted from the encoding apparatus 100 to the decoding apparatus 200 through a bitstream.
  • the decoding apparatus 200 may entropy decode the motion vector candidate index from the bitstream, and select the motion vector candidate of the decoding target block from the motion vector candidates included in the motion vector candidate list using the entropy decoded motion vector candidate index. .
  • the encoding apparatus 100 may calculate a motion vector difference (MVD) between the motion vector of the encoding target block and the motion vector candidate, and may entropy encode the MVD.
  • the bitstream may include entropy coded MVD.
  • the MVD may be transmitted from the encoding apparatus 100 to the decoding apparatus 200 through a bitstream.
  • the decoding apparatus 200 may entropy decode the received MVD from the bitstream.
  • the decoding apparatus 200 may derive the motion vector of the decoding object block through the sum of the decoded MVD and the motion vector candidate.
  • the bitstream may include a reference picture index and the like indicating a reference picture.
  • the reference image index may be entropy encoded and transmitted from the encoding apparatus 100 to the decoding apparatus 200 through a bitstream.
  • the decoding apparatus 200 may predict the motion vector of the decoding object block using the motion information of the neighboring block, and may derive the motion vector of the decoding object block using the predicted motion vector and the motion vector difference.
  • the decoding apparatus 200 may generate a prediction block for the decoding target block based on the derived motion vector and the reference image index information.
  • the merge mode may mean merging of motions for a plurality of blocks.
  • the merge mode may mean applying motion information of one block to other blocks.
  • each of the encoding apparatus 100 and the decoding apparatus 200 may generate a merge candidate list using the motion information of the reconstructed neighboring block and / or the motion information of the call block.
  • the motion information may include at least one of 1) a motion vector, 2) a reference picture index, and 3) an inter prediction prediction indicator.
  • the prediction indicator may be unidirectional (L0 prediction, L1 prediction) or bidirectional.
  • the merge mode may be applied in a CU unit or a PU unit.
  • the encoding apparatus 100 may entropy-code predetermined information to generate a bitstream and then transmit the encoded stream to the decoding apparatus 200.
  • the bitstream may include predefined information.
  • the predefined information includes: 1) a merge flag, which is information indicating whether to perform a merge mode for each block partition, and 2) which one of neighboring blocks adjacent to an encoding target block is merged with. It may include a merge index that is information about the merge.
  • the neighboring blocks of the encoding object block may include a left neighboring block of the encoding object block, an upper neighboring block of the encoding object block, and a temporal neighboring block of the encoding object block.
  • the merge candidate list may represent a list in which motion information is stored.
  • the merge candidate list may be generated before the merge mode is performed.
  • the motion information stored in the merge candidate list includes motion information of neighboring blocks adjacent to the encoding / decoding target block, motion information of a block corresponding to the encoding / decoding target block in the reference image, and motion already existing in the merge candidate list. At least one or more of the new motion information and the zero merge candidate generated by the combination of the information.
  • the motion information of the neighboring block adjacent to the encoding / decoding target block is a spatial merge candidate and the motion information of the block corresponding to the encoding / decoding target block in the reference image is a temporal merge candidate. It may be referred to as).
  • the skip mode may be a mode in which motion information of a neighboring block is applied to an encoding / decoding target block as it is.
  • the skip mode may be one of modes used for inter prediction.
  • the encoding apparatus 100 may entropy-encode information on which block motion information is to be used as the motion information of the encoding target block and transmit the information to the decoding apparatus 200 through the bitstream.
  • the encoding apparatus 100 may not transmit other information to the decoding apparatus 200.
  • the other information may be syntax element information.
  • the syntax element information may include at least one of motion vector difference information, a coding block flag, and a transform coefficient level.
  • the residual signal generated after intra-picture or inter-screen prediction may be converted into a frequency domain through a conversion process as part of a quantization process.
  • the first transform may be performed using various DCT and DST kernels, and these transform kernels may perform 1D transform on horizontal and / or vertical directions for the residual signal.
  • the transformation may be performed by a separate transform, each performed, or the transformation may be performed by a 2D non-separable transform.
  • the DCT and DST types used for the conversion may be adaptively used for 1D conversion of DCT-V, DCT-VIII, DST-I, and DST-VII in addition to DCT-II as shown in the following table.
  • a transform set may be configured to derive the DCT or DST type used for the transform.
  • the intra / prediction mode of the current encoding / decoding target block in the sub / decoder and the Transforms and / or inverse transforms may be performed using the transforms included in the corresponding transform set.
  • the transform set may not be entropy encoded / decoded but may be defined according to the same rules in the sub / decoder.
  • entropy encoding / decoding indicating which transform is used among transforms belonging to the corresponding transform set may be performed.
  • encoding efficiency can be improved by encoding / decoding a residual signal using an optimal transform method.
  • truncated Unary binarization may be used to entropy encode / decode information on which of three transforms belonging to one transform set.
  • information indicating which transform among transforms belonging to a transform set is used for at least one of a vertical transform and a horizontal transform may be entropy encoded / decoded.
  • the encoder may perform a secondary transform in order to increase energy concentration of transformed coefficients as shown in the example of FIG. 9.
  • Secondary transformations may also perform discrete transformations that perform one-dimensional transformations respectively in the horizontal and / or vertical directions, or may perform two-dimensional non-separated transformations, and used transformation information may be transmitted or present and surrounding. It may be implicitly derived from the encoder / decoder according to the encoding information.
  • a transform set for a secondary transform may be defined, such as a primary transform, and the transform set may be defined according to the same rules in the encoder / decoder rather than entropy encoding / decoding.
  • information indicating which transform is used among transforms belonging to the corresponding transform set may be transmitted, and may be applied to at least one or more of residual signals through intra prediction or inter prediction.
  • At least one of the number or type of transform candidates is different for each transform set, and at least one of the number or type of transform candidates is a position, a size, a partition type, and a prediction mode of a block (CU, PU, TU, etc.). It may be determined variably in consideration of at least one of directional / non-directional of the intra / inter mode) or the intra prediction mode.
  • the second inverse transform may be performed according to whether the second inverse transform is performed, and the first inverse transform may be performed according to whether the first inverse transform is performed on the result of the second inverse transform.
  • the above-described first-order transform and second-order transform may be applied to at least one or more signal components of luminance / chromatic components or according to an arbitrary coding block size / shape, and may be used or used in any coding block.
  • An index indicating a / second order transform may be entropy encoded / decoded, or may be implicitly derived from the encoder / decoder according to at least one of current and peripheral encoding information.
  • the residual signal generated after intra-picture or inter-screen prediction undergoes a quantization process, and then the quantized transform coefficients perform an entropy encoding process.
  • the image may be scanned in a diagonal, vertical, or horizontal direction based on at least one of an intra prediction mode or a minimum block size / shape.
  • the entropy decoded quantized transform coefficients may be inverse scanned and arranged in a block form, and at least one of inverse quantization or inverse transform may be performed on the block.
  • at least one of a diagonal scan, a horizontal scan, and a vertical scan may be performed as a reverse scanning method.
  • the residual signal for the 8x8 block is three scanning order methods shown in FIG. 10 for four 4x4 subblocks after the first, second order transform and quantization.
  • Entropy encoding may be performed while scanning the quantized transform coefficients according to at least one of the following. It is also possible to entropy decode while inversely scanning the quantized transform coefficients.
  • the inverse scanned quantized transform coefficients become transform coefficients after inverse quantization, and at least one of a second order inverse transform or a first order inverse transform may be performed to generate a reconstructed residual signal.
  • one block may be split as shown in FIG. 11 and an indicator corresponding to the split information may be signaled.
  • the split information may be at least one of a split flag (split_flag), a quad / binary tree flag (QB_flag), a quadtree split flag (quadtree_flag), a binary tree split flag (binarytree_flag), and a binary tree split type flag (Btype_flag).
  • split_flag is a flag indicating whether a block is divided
  • QB_flag is a flag indicating whether a block is divided into quadtrees or binary trees
  • quadtree_flag is a flag indicating whether a block is divided into quadtrees
  • binarytree_flag may be a flag indicating whether a block is divided into a binary tree form
  • Btype_flag may be a flag indicating a vertical or horizontal division when the block is divided into a binary tree form.
  • the division flag may be 0, indicating that the partition is not divided.
  • the quad / binary tree flag 0 may indicate quadtree division, and 1, binary tree division. This may indicate quadtree splitting.
  • the binary tree partition type flag 0 indicates horizontal division, 1 indicates vertical division, and 0 indicates vertical division, and 1 indicates horizontal division.
  • the split information of FIG. 11 may be derived by signaling at least one of quadtree_flag, binarytree_flag, and Btype_flag as shown in Table 3 below.
  • the split information for FIG. 11 may be derived by signaling at least one of split_flag, QB_flag, and Btype_flag as shown in Table 2 below.
  • the splitting method may be divided into quadtrees or only binary trees, depending on the size / shape of the block.
  • the split_flag may mean a flag indicating whether quadtree or binary tree is split.
  • the size / shape of the block may be derived according to the depth information of the block, and the depth information may be signaled.
  • the block When the size of the block falls within a predetermined range, the block may be divided into quadtrees only.
  • the predetermined range may be defined as at least one of the maximum block size or the minimum block size that can be divided only by the quadtree.
  • Information indicating the size of the maximum / minimum block that allows the quadtree splitting may be signaled through a bitstream, and the corresponding information may be signaled in units of at least one of a sequence, a picture parameter, or a slice (segment). have.
  • the size of the maximum / minimum block may be a fixed size preset in the encoder / decoder. For example, when the size of the block corresponds to 256x256 to 64x64, the block may be divided into quadtrees only.
  • the split_flag may be a flag indicating whether the quadtree is split.
  • the predetermined range may be defined as at least one of the maximum block size or the minimum block size that can be divided only by the binary tree.
  • Information indicating the size of the maximum / minimum block that allows the division of the binary tree type may be signaled through a bitstream, and the corresponding information may be signaled in units of at least one of a sequence, a picture parameter, or a slice (segment). have.
  • the size of the maximum / minimum block may be a fixed size preset in the encoder / decoder. For example, when the size of the block corresponds to 16x16 to 8x8, it may be possible to divide only into a binary tree.
  • the split_flag may be a flag indicating whether a binary tree is split.
  • the partitioned block After the one block is partitioned into a binary tree, when the partitioned block is further partitioned, it may be partitioned only into a binary tree.
  • the one or more indicators may not be signaled.
  • the quadtree based splitting may be possible.
  • the encoding of the existing video coding includes an intra / inter prediction step for predicting an original block that is a large part of the current original image, a predicted prediction block and an original block.
  • the original image through entropy coding, a transform-based quantization step of residual blocks, a coefficient of transform block, coefficients of transformed and quantized blocks, and a probability-based lossless compression method for the compression information obtained in the previous stage.
  • a bitstream which is a compressed form of, is formed and transmitted to a decoder or stored in a recording medium.
  • Shuffling and Discrete Sine Transform hereinafter referred to as SDST
  • SDST Shuffling and Discrete Sine Transform
  • the SDST method according to the present invention is not a Discrete Cosine Transform type-2 or DCT-II (hereinafter DCT-2), which is a transform kernel widely used in video coding, but a Discrete Sine Transform type-7 or DST-VII (hereinafter, referred to as DCT-2). , DST-7) can be used to better reflect the frequency characteristics common to the images.
  • DCT-2 Discrete Cosine Transform type-2
  • DCT-2 Discrete Sine Transform type-7
  • DST-VII hereinafter, referred to as DCT-2
  • DST-7 can be used to better reflect the frequency characteristics common to the images.
  • DST-7 may be applied to data of a residual block.
  • DST-7 application to the residual block may be performed based on the prediction mode corresponding to the residual block. For example, it may be applied to the residual block encoded in the inter mode.
  • the DST-7 may be applied after rearranging or shuffling data of the residual block.
  • shuffling means rearrangement of image data, and equivalently, residual signal rearrangement.
  • the residual block may have the same meaning as a residual, residual block, residual signal, residual signal, residual data, residual data.
  • the residual block includes a reconstructed residual, a reconstructed residual block, a reconstructed residual signal, a reconstructed residual signal, a reconstructed residual data, and a reconstructed residual data in which the residual block is reconstructed in the encoder and the decoder. It may have the same meaning as.
  • SDST may use DST-7 as a conversion kernel.
  • the transform kernel of the SDST is not limited to the DST-7, but the Discrete Sine Transform type-1 (DST-1), Discrete Sine Transform type-2 (DST-2), and Discrete Sine Transform type-3 (DST-3) ),...
  • DST-1 Discrete Sine Transform type-1
  • DST-2 Discrete Sine Transform type-2
  • DST-3 Discrete Sine Transform type-3
  • DST-n Discrete Sine Transform type-n
  • n is a positive integer of 1 or greater
  • Equation 1 may represent a method of performing one-dimensional DCT-2 according to an embodiment of the present invention.
  • N may represent a block size
  • k may be a position of a frequency component
  • x n may represent a value of an n th coefficient in the spatial domain.
  • DCT-2 of the two-dimensional domain may be possible by performing a horizontal and vertical transform on the residual block using Equation 1 above.
  • the DCT-2 conversion kernel may be defined by Equation 2 below.
  • X k may be a basis vector according to a position in the frequency domain
  • N may represent the size of the frequency domain.
  • FIG. 12 shows a basis vector in the DCT-2 frequency domain according to the present invention.
  • the frequency characteristics of the DCT-2 are shown in the frequency domain.
  • the value calculated through the X 0 basis vector of the DCT-2 may mean a DC component.
  • DCT-2 can be used for the conversion process for the remaining blocks, such as 4x4, 8x8, 16x16, 32x32 size.
  • DCT-2 may be selectively used based on at least one of the size of the residual block, the color component (eg, luminance component, chrominance component) of the residual block, or a prediction mode corresponding to the residual block.
  • the prediction mode may mean inter prediction or intra prediction.
  • the prediction mode may mean intra prediction mode or intra prediction direction.
  • Transformation through the DCT-2 transform kernel can show high compression efficiency in a block having a small change between neighboring pixels such as an image background.
  • it may not be suitable as a conversion kernel for a region having a complex pattern, such as an image texture. This is because when a block having a low correlation between neighboring pixels is converted through DCT-2, many transform coefficients may appear in high frequency components in the frequency domain. Frequent transform coefficient generation in the high frequency region in video compression can reduce the compression efficiency.
  • Equation 3 may represent a method of performing 1D DST-7 according to an embodiment of the present invention.
  • N may mean the size of the block
  • k is the position of the frequency component
  • x n may mean the value of the n th coefficient in the spatial domain.
  • DST-7 of the two-dimensional domain may be possible by performing horizontal and vertical transforms on the residual block using Equation 3 above.
  • the DST-7 conversion kernel may be defined by Equation 4 below.
  • X k may represent the K th base vector of DST-7
  • i may represent a position in the frequency domain
  • N may represent a size of the frequency domain.
  • the DST-7 may be used for a conversion process for residual blocks having at least one or more sizes of 2x2, 4x4, 8x8, 16x16, 32x32, 64x64, 128x128, and the like.
  • DST-7 may be applied to a rectangular block rather than a square block.
  • DST-7 may be applied to at least one of vertical transformation and horizontal transformation of rectangular blocks having different horizontal and vertical sizes, such as 8x4, 16x8, 32x4, and 64x16.
  • the DST-7 may be selectively used based on at least one of a size of the residual block, a color component of the residual block (eg, a luminance component, a color difference component), or a prediction mode corresponding to the residual block.
  • a size of the residual block e.g, a 4x4 sized residual block encoded in the intra mode and a component of the residual block is a luminance component
  • DST-7 may be used.
  • the prediction mode may mean inter prediction or intra prediction.
  • the prediction mode may mean intra prediction mode or intra prediction direction.
  • Figure 13 shows a basis vector (basis vector) in each frequency domain of the DST-7 according to the present invention.
  • the first basis vector (x 0 ) of DST-7 has a curved shape. This allows the DST-7 to achieve higher conversion performance for blocks with larger spatial variations in the image than the DCT-2.
  • the DST-7 may be used in transforming a 4x4 transform unit (TU) in an intra predicted coding unit (CU).
  • This may be a DST-7 that exhibits higher conversion efficiency by reflecting an increase in error amount as the distance from a reference sample increases according to intra prediction characteristics. That is, in the case of a block in which the amount of the residual signal increases as the distance from the (0, 0) position in the block increases in the spatial domain, the block can be efficiently compressed using the DST-7.
  • the conversion efficiency of the DST-7 and the DCT-2 can be known by examining the distribution characteristics of the residual signal in the CU, PU, or TU block.
  • the left figure of FIG. 14 separately shows a relatively large upper 30% value among the average residual signal values in the block, and the right figure shows a relative value among the average residual signal values in the block as shown in the left figure. This large top 70% value is shown separately.
  • the residual signal distribution in the 2Nx2N PU of the 8x8 CU predicted in the inter mode through FIG. 14 is such that small values of the residual signal value are mainly concentrated near the center of the block, and the further the distance from the middle point of the block remains. It can be seen that the signal value increases. That is, it can be seen that the residual signal value increases at the block boundary.
  • This residual signal distribution characteristic is a common feature of the residual signal in the PU regardless of the CU size and the PU partition mode (2Nx2N, 2NxN, Nx2N, NxN, nRx2N, nLx2N, 2NxnU, 2NxnD) capable of inter predicted CU.
  • FIG. 15 is a 3D graph illustrating a residual signal distribution characteristic in a 2N ⁇ 2N prediction unit PU of an 8 ⁇ 8 coding unit CU predicted in an inter mode according to the present invention.
  • the residual signal distribution having a small value is concentrated near the center of the block, and the residual signal closer to the block boundary has a larger value.
  • the conversion of the residual signal in the PU of the CU predicted in the inter mode may be more efficient when using DST-7 rather than DCT-2.
  • SDST which is one of conversion methods using DST-7 as a conversion kernel
  • SDST according to the present invention can be performed in two steps.
  • the first step is to shuffle the residual signals in the PU of the CU predicted in inter mode or intra mode.
  • the second step is to apply DST-7 to the residual signal in the shuffled block.
  • the residual signals arranged in the current block may be scanned according to the first direction and rearranged according to the second direction. That is, shuffling may be performed by scanning the residual signals arranged in the current block in a first direction and rearranging the residual signals in the second direction.
  • the residual signal may mean a signal representing a difference signal between the original signal and the prediction signal. That is, the residual signal may mean a signal before performing at least one of the transformation and the quantization. Alternatively, the residual signal may mean a signal form in which at least one of conversion and quantization is performed.
  • the residual signal may mean a restored residual signal. That is, the residual signal may mean a signal in which at least one of inverse transformation and inverse quantization is performed. Also, the residual signal may mean a signal before performing at least one of inverse transformation and inverse quantization.
  • the first direction may include a raster scan order, an up-right diagonal scan order, a horizontal scan order, and a vertical scan order. order).
  • the first direction may be defined as follows.
  • any one of the above-described scan directions in the second direction may be selectively used.
  • the first direction and the second direction may be the same or may be different from each other.
  • Scanning and rearranging the residual signal may be performed in the current block unit.
  • the rearrangement may mean arranging the residual signals scanned in the first direction in the block in the second direction in blocks of the same size.
  • the size of the block scanned in the first direction and the size of the block rearranged in the second direction may be different from each other.
  • the scan and rearrangement are expressed separately according to the first direction and the second direction, respectively, the scan and the rearrangement may be performed in one process with respect to the first direction.
  • the remaining signals in the block may be scanned from the top row to the bottom row, but one row may be scanned from right to left and stored (rearranged) in the block.
  • the scan and rearrangement of the residual signal may be performed in units of predetermined sub-blocks in the current block.
  • the subblock may be a block equal to or smaller than the current block.
  • the subblock units may have a fixed size / shape (eg 4x4, 4x8, 8x8, ... NxM, where N and M are positive integers).
  • the size and / or shape of the subblock unit may be variably derived.
  • the size and / or shape of the subblock unit may be determined depending on the size, shape, and / or prediction mode (inter, intra) of the current block.
  • the scan direction and / or rearrangement direction may be adaptively determined according to the position of the subblock. In this case, different scan directions and / or rearrangement directions may be used for each subblock, and all or some of the subblocks belonging to the current block may use the same scan direction and / or rearrangement direction.
  • FIG. 16 is a diagram illustrating a residual signal distribution feature in a 2N ⁇ 2N prediction unit (PU) mode of a coding unit (CU) according to the present invention.
  • a PU is divided into four subblocks in a quadtree structure, and an arrow advancing direction of each subblock represents a residual signal distribution.
  • an arrow progress direction of each subblock indicates a direction in which a residual signal increases. This is due to a distribution characteristic that the residual signals in the PU have in common regardless of the PU partitioning mode. Therefore, a shuffling operation for rearranging the residual signals of each subblock may be performed to have a distribution characteristic suitable for DST-7 transform.
  • FIG. 17 illustrates residual signal distribution characteristics before and after shuffling of a 2N ⁇ 2N prediction unit (PU) according to the present invention.
  • the upper block shows a distribution before shuffling of the residual signal in the 2N ⁇ 2N PU of the 8 ⁇ 8 CU predicted in the inter mode.
  • Equation 5 below represents a value according to the position of each residual signal in the upper block of FIG. 17.
  • the lower block of FIG. 17 shows the residual signal distribution characteristic in the 2N ⁇ 2N PU after shuffling.
  • the residual signal distribution for each subblock of the PU that performed the shuffling is a residual signal distribution suitable for the first basis vector of DST-7. That is, since the residual signal in each subblock is larger as it moves away from the (0, 0) position, the transform coefficient values, which are frequency-converted through the DST-7, may appear concentrated in the low frequency region when the transform is performed.
  • Equation 6 shows a method of performing shuffling according to a position in a PU of each subblock in four subblocks divided into a quadtree structure in a PU.
  • Wk and Hk mean the width or height of the kth subblock (k ⁇ ⁇ blk0, blk1, blk2, blk3 ⁇ ) in the PU, respectively, and blk0 to blk3 denote each subblock divided into quadtree structures in the PU. it means.
  • x and y denote horizontal and vertical positions in each subblock, and a (x, y), b (x, y), c (x, y), and d (x, y) are shown in FIG. 17.
  • the positions before shuffling of each residual signal are a '(x, y), b' (x, y), c '(x, y), and d' (x, y) of FIG. 17. As in the lower block, it indicates the position of the residual signal changed through shuffling.
  • FIG. 18 illustrates an example of 4x4 residual data rearrangement of a subblock according to the present invention.
  • a sub block means any one of a plurality of sub blocks belonging to an 8x8 prediction block.
  • 18 (a) shows the position of the original residual data before rearrangement, and
  • FIG. 18 (b) shows the rearranged position of the residual data.
  • the value of the residual data may gradually increase from the position (0,0) to the position (3,3).
  • residual data in one horizontal and / or vertical one dimension in each subblock may have a data distribution in the form of a basis vector shown in FIG. 13.
  • the shuffling according to the present invention may rearrange the residual data of each sub-block so that the residual data distribution is suitable for the above-described form of the DST-7 basis vector.
  • the DST-7 transform may be applied to the rearranged data for each subblock unit.
  • the sub block may be additionally partitioned into a quadtree structure, or a rearrangement process may be selectively performed.
  • a rearrangement process may be selectively performed.
  • an NxN subblock belonging to a 2Nx2N PU may be divided into N / 2xN / 2 blocks, and a rearrangement process may be applied to each N / 2xN / 2 block.
  • quadtree based TU partitioning may be performed repeatedly until the minimum TU size is reached.
  • DCT-2 transform may be applied to the 2N ⁇ 2N block. At this time, the rearrangement of the residual data may not be performed.
  • the partition structure of the TU performing SDST may be defined as being divided into quadtree structures based on the PU.
  • FIG. 19 (a) and 19 (b) illustrate a transform unit (TU) partition structure and a shuffling method of a transform unit (TU) according to a prediction unit (PU) mode of a coding unit (CU) according to the present invention.
  • Figure is a diagram.
  • 19 (a) and 19 (b) show a quadtree splitting structure of a TU according to TU depth for each asymmetric splitting mode (2NxnU, 2NxnD, nRx2N, nLx2N) of an inter predicted PU.
  • the thick solid line of each block represents a PU in a CU
  • the thin solid line represents a TU.
  • S0, S1, S2, and S3 in each TU represent a shuffling method of the residual signal in the TU defined in Equation 6 described above.
  • the depth 0 TU of each PU has the same block size as the corresponding PU (for example, the size of the depth 0 TU in the 2N ⁇ 2N PU is equal to the size of the PU).
  • the shuffling of the residual signal in the depth 0 TU will be described later as described with reference to FIG. 23.
  • At least one of the CU, PU, TU has a rectangular shape (eg, 2NxnU, 2NxnD, nRx2N, nLx2N)
  • at least one or more of at least one of the CU, PU, TU before the residual signal rearrangement It can be divided into N subblocks, such as 6, 8, 16, and apply the residual signal rearrangement to the divided subblocks.
  • At least one of the CU, PU, TU has a square shape (eg, 2Nx2N, NxN)
  • at least one or more of the CU, PU, TU, 4, 8, 16, etc. before the residual signal rearrangement It is possible to divide into N subblocks and to apply residual signal rearrangement to the divided subblocks.
  • the TU when the TU is divided from a CU or a PU, when the TU is the highest depth (not divided), the TU is divided into N subblocks such as 2, 4, 6, 8, 16, etc. Thereafter, residual signal rearrangement may be performed in units of divided subblocks.
  • the example of performing residual signal rearrangement when the CUs, PUs, and TUs have different shapes or sizes is shown.
  • at least two or more of the CUs, PUs, and TUs may have the same form. It can be applied even if it has a size.
  • the asymmetric division mode of the inter predicted PU is described, but is not limited thereto.
  • the division of the TU and the shuffle of the TU may also be applied to the symmetric division modes 2NxN and Nx2N of the PU.
  • DST-7 conversion may be performed on each TU in the PU on which shuffling is performed.
  • DST-7 transform may be performed on one block.
  • performing the DST-7 transform after shuffling may be more efficient than performing the DCT-2 transform regardless of the size of the CU and the PU partition mode. have.
  • the distribution of transform coefficients after transformation is more near low frequency component (especially DC component), i) minimizing energy loss after quantization, ii) when residual signal distribution is not in terms of bit usage reduction during entropy coding process. It can be seen that it shows a higher compression efficiency.
  • 20 is a diagram illustrating a result of performing DCT-2 and SDST transformation according to the residual signal distribution of the 2N ⁇ 2N prediction unit (PU) according to the present invention.
  • FIG. 20 shows a distribution in which the residual signal increases from the center to the boundary when the PU partitioning mode of the CU is 2N ⁇ 2N.
  • the figure shown in the middle of FIG. 20 shows the distribution of the residual signal which performed DCT-2 transform on the TU of depth 1 in PU
  • the figure shown to the right of FIG. 20 shows the TU of depth 1 in PU.
  • the residual signal distribution after performing the DST-7 transform (SDST) after shuffling is shown.
  • the coefficient distribution when the SDST is performed on the TU of the PU having the residual signal distribution characteristics mentioned above is closer to the coefficient distribution when the DCT-2 is performed.
  • a smaller coefficient value occurs in the high frequency component.
  • a higher compression efficiency is achieved by performing SDST instead of DCT-2 when performing the residual signal of the inter predicted PU.
  • the unit of the block on which the DST-7 transformation is performed performs SDST in units of TUs defined in the PU, and the partition structure of the TUs can be quadtree split or binary tree split up to the maximum depth in the PU unit as shown in FIG. 19. . This may mean that the DST-7 transform may be performed not only on the square block but also after the shuffling on the rectangular block.
  • FIG. 21 illustrates an SDST process according to the present invention.
  • a shuffling may be performed on the divided TU in the PU with respect to the PU whose prediction mode is the inter mode (S2120).
  • the SDST process may be performed in the order of performing a DST-7 transform on the shuffled TU (S2130), performing a quantization (S2140), and a series of subsequent processes.
  • shuffling and DST-7 transform may be performed on a block in which the prediction mode is intra mode.
  • an inter predicted block is described, but the present invention is not limited thereto and the following method may be applied to an intra predicted block.
  • FIG. 22 is a diagram illustrating a size distribution characteristic of transform unit (TU) partitioning and residual absolute values according to a prediction unit (PU) partition mode of an inter-screen predicted coding unit (CU) according to the present invention.
  • a TU may perform quadtree splitting or binary tree splitting from a CU to a maximum depth, and there may be a total of K partition modes.
  • K is a positive integer
  • K is 8 in FIG.
  • the SDST uses the residual signal distribution characteristic in the PU in the inter predicted CU as described with reference to FIG. 15.
  • a TU may be divided into a quadtree structure or a binary tree structure based on a PU. This means that a TU having a depth of 0 may correspond to a PU, and a TU having a depth of 1 has a quad tree structure or a binary tree once a PU is defined. It may correspond to each subblock divided into a structure.
  • Each block of FIG. 22 shows a form of partitioning up to TU depth 2 according to each PU partitioning mode of an inter predicted CU.
  • the thick solid line represents the PU
  • the thin solid line represents the TU
  • the arrow direction of each TU may indicate that the residual signal value in the corresponding TU increases as the direction of the arrow heads.
  • Each TU may perform the shuffling mentioned in the above description regarding the shuffling step according to the position in the PU.
  • the shuffling may be performed in various ways in addition to the above-described method.
  • One of them starts scanning from the residual signal at the center position of the PU block, scans the surrounding residual signal in a circular direction, and then scans the residual signal again from the (0,0) position of the PU. -zag) Reorder in scanning order.
  • FIG. 23 illustrates a residual signal scanning order and relocation order of a transform unit TU having a depth value of zero in the prediction unit PU as described above.
  • FIG. 23 (a) and 23 (b) show the scanning order for shuffling
  • FIG. 23 (c) shows the rearrangement order for SDST.
  • Residual signals in each shuffled TU may be DST-7 transformed, and quantization and entropy encoding may be performed.
  • Such a shuffling method uses a residual signal distribution characteristic in a TU according to a PU partitioning mode, and may optimize the residual signal distribution to increase efficiency of a next step, DST-7 conversion.
  • the SDST may be performed for all TUs in the PU predicted by the encoder according to the SDST procedure of FIG. 21 described above.
  • TU partitioning may be performed up to a maximum depth of 2 in a PU as shown in FIG. 22, and residual signals in each TU are shuffled using the residual signal distribution characteristics in the TU of FIG. 22. Can be performed.
  • quantization and entropy encoding may be performed.
  • the decoder performs DST-7 inverse transform on each TU of the inter predicted PU and performs inverse shuffling on the reconstructed residual signal when performing residual signal recovery of the TU in the inter predicted PU. You can get it.
  • the SDST method has an advantage in that there is no flag or information to be transmitted to the decoder because SDST is applied to the conversion method of all TUs in the inter predicted PU. That is, the SDST method may be performed without additional signaling for the SDST method.
  • a method of selecting and applying one of DCT-2 and SDST to a method of converting a corresponding PU through RDO as a method of performing SDST will be described.
  • This method can increase the amount of computation in the encoder compared to the above-described embodiment of performing SDST on all TUs in the inter-predicted PU.
  • the compression method is higher than the previous method. Efficiency can be seen.
  • RDO rate-distortion optimization
  • a cost (S2420) and SDST of a TU obtained by performing DCT-2 on each TU in a PU that performs prediction in inter mode are performed (S2430 and S2440).
  • the optimal conversion mode (DCT-7 or SDST) of the TU can be determined in terms of rate-distortion (S2450).
  • quantization (S2460), entropy encoding, or the like may be performed on the transformed TU according to the determined transform mode.
  • a TU applying SDST or DCT-2 may select an optimal conversion mode through RDO only when one of the following conditions is satisfied.
  • TUs performing DCT-2 and SDST should be divided into quadtree form or binary tree form or CU size based on the CU regardless of the PU partitioning mode.
  • TUs performing DCT-2 and SDST should be divided into a quadtree or binary tree form or a PU size from the PU according to the PU partitioning mode.
  • TUs performing DCT-2 and SDST are not split based on the CU regardless of the PU partitioning mode.
  • Condition i) is a method of selecting DCT-2 or SDST as a conversion mode in terms of rate-distortion optimization for a TU partitioned in a quadtree or binary tree or a CU size regardless of the PU partitioning mode.
  • Condition ii) performs DCT-2 and SDST on a TU partitioned into quadtree or binary tree form or PU size according to the PU partitioning mode mentioned in the embodiment of performing SDST on all TUs in the above-described inter predicted PU. Then, the conversion mode of the TU is determined using the cost.
  • Condition iii) determines a conversion mode of a TU by performing DCT-2 and SDST without splitting a CU or a TU in a CU unit having the same size as the TU, regardless of the PU partitioning mode.
  • the conversion mode of depth 0 TU can be selected.
  • 25 is a flowchart illustrating a process of selecting and decoding DCT-2 or SDST according to the present invention.
  • the transmitted SDST flag may be referred to for each TU (S2510).
  • the SDST flag may be a flag indicating whether the SDST is used as the conversion mode.
  • the conversion mode of the TU is determined as the SDST mode, performs the DST-7 inverse transform on the remaining signals in the TU (S2530), and in the TU in which the DST-7 inverse conversion is performed. According to the position of the PU in the TU with respect to the residual signal, inverse shuffling using Equation 6 described above may be performed (S2540) to finally obtain the reconstructed residual signal (S2560).
  • the conversion mode of the TU is determined to be DCT-2 mode, and the DCT-2 inverse transform is performed on the residual signal in the TU (S2550) to obtain a restored residual signal. It may be (S2560).
  • residual data may be rearranged.
  • the residual data may mean residual data corresponding to the inter predicted PU.
  • integer transformations derived from DST-7 can be used in the SDST method.
  • sdst_flag may be signaled for selective use of DCT-2 or DST-7.
  • sdst_flag may be signaled in units of TUs.
  • sdst_flag may indicate that it is required to identify whether to perform SDST.
  • 26 is a flowchart illustrating a decoding process using the SDST according to the present invention.
  • sdst_flag may be signaled entropy decoded in units of TUs (S2610).
  • SDST when the depth of the TU is 0 (S2620-Yes), SDST is not used, and DCT-2 may be used to restore the TU (S2670 and S2680). This is because the SDST can be performed between 1 to the maximum TU depth value.
  • the TU may be restored without performing an inverse transform.
  • the sdst_flag value can be checked (S2640).
  • the TU may be restored by performing inverse shuffling on the residual data of the TU (S2660) (S2680).
  • the TU may be restored by performing inverse transform based on DCT-2 (S2670) (S2680).
  • the signal to be shuffled or rearranged may be at least one of a residual signal before inverse transformation, a residual signal before inverse quantization, a residual signal after inverse transformation, a residual signal after inverse quantization, a restored residual signal, and a restored block signal.
  • FIG. 26 illustrates that the sdst_flag is signaled in units of TUs
  • the sdst_flag may be selectively signaled based on at least one of a conversion mode of the TU or a cbf value of the TU. For example, when the transform mode of the TU is the transform skip mode and / or when the cbf value of the TU is 0, sdst_flag may not be signaled. In addition, even when the depth of the TU is 0, sdst_flag may not be signaled.
  • sdst_flag has been described as being signaled in TU units, it may be signaled in a predetermined unit.
  • sdst_flag may be signaled in at least one unit of a video, a sequence, a picture, a slice, a tile, an encoding tree unit, an encoding unit, a prediction unit, and a transform unit.
  • the selected transform mode information may be entropy encoded / decoded through an n-bit flag (n is a positive integer of 1 or more) in TU units.
  • the conversion mode information may indicate at least one or more, such as whether the TU performs conversion through DCT-2, conversion through SDST, and conversion through DST-7.
  • Entropy encoding / decoding may be performed in the bypass mode only in the case of a TU in the inter predicted PU. Also, entropy encoding / decoding of transform mode information may be omitted and not signaled in at least one of the case of transform skip mode, RDPCM (Residual Differential PCM) mode, and lossless mode.
  • entropy encoding / decoding of the transform mode information may be omitted and may not be signaled.
  • the coded block flag is 0, the inverse transform process is skipped in the decoder, so that the corresponding block can be restored even if the transform mode information does not exist in the decoder.
  • the conversion mode information is not limited to indicating the conversion mode through a flag, and may be implemented in the form of a pre-defined table and an index.
  • the pre-defined table may be a conversion mode available for each index.
  • the conversion of the DCT or the SDST may be performed separately in the horizontal direction and the vertical direction.
  • the same conversion mode may be used for the horizontal direction and the vertical direction, and different conversion modes may be used for each other.
  • transform mode information on whether DCT-2, SDST, or DST-7 is used for each of the horizontal and vertical directions may be entropy encoded / decoded, respectively.
  • the transformation mode information may be entropy encoded / decoded in at least one unit of a CU, PU, or TU unit.
  • the conversion mode information may be transmitted according to a luminance component or a chrominance component.
  • the conversion mode information may be transmitted according to the Y component, the Cb component, or the Cr component.
  • transform mode information on whether DCT-2 or SDST is performed for the Y component is signaled, signaling is performed in the Y component without separate transform mode information signaling in at least one of the Cb component and the Cr component.
  • the transformed mode information may be used as the transformed mode of the corresponding block.
  • the transform mode information may be entropy encoded / decoded by an arithmetic coding method using a context model. If the conversion mode information is implemented in the form of a pre-defined table and an index, entropy encoding / decoding may be performed by an arithmetic encoding method using a context model for all or some of the bins.
  • the transform mode information may be selectively entropy encoded / decoded according to the block size. For example, when the size of the current block is 64x64 or more, the transformation mode information may not be entropy encoded / decoded, and when the size of the current block is 32x32 or less, the transformation mode information may be entropy encoded / decoded.
  • one of DCT-2, DST-7, or SDST method may be performed without entropy encoding / decoding transform mode information.
  • the transform mode information may not be entropy encoded / decoded regardless of the non-zero transform coefficient or the position in the block for the quantization level.
  • transform mode information may not be entropy encoded / decoded only when the non-zero transform coefficient or quantization level exists at the upper left position in the block.
  • entropy encoding / decoding may be performed.
  • J is a positive integer.
  • the conversion mode information may be restricted in the use of some conversion modes according to the conversion mode of the collocated block, or the binarization method of the conversion information may be changed in such a manner that the conversion mode of the call block is represented with fewer bits. have.
  • the above-described SDST may be limitedly used based on at least one of a prediction mode, a TU depth (depth), a size, or a shape of the current block.
  • the SDST may be used when the current block is encoded in the inter mode.
  • the minimum / maximum depth in which the SDST is allowed may be defined.
  • SDST may be used when the depth of the current block is equal to or larger than the minimum depth, or SDST may be used when the depth of the current block is equal to or smaller than the maximum depth.
  • the minimum / maximum depth may be a fixed value or may be variably determined based on information indicating the minimum / maximum depth.
  • Information indicative of the minimum / maximum depth may be signaled from the encoder and derived at the decoder based on the attributes (eg, size, depth and / or shape) of the current / peripheral block.
  • the minimum / maximum size in which SDST is allowed may be defined. Similarly, SDST may be used when the size of the current block is equal to or larger than the minimum size, or SDST may be used when the size of the current block is equal to or smaller than the maximum size.
  • the minimum / maximum size may be a fixed value or may be variably determined based on information indicating the minimum / maximum size. Information indicating the minimum / maximum size may be signaled from the encoder and derived at the decoder based on the attributes (eg, size, depth and / or shape) of the current / peripheral block. For example, when the current block is 4x4, DCT-2 may be used as a transform method, and entropy encoding / decoding of transform mode information on whether DCT-2 or SDST is used may not be performed.
  • the type of block in which SDST is allowed may be defined.
  • SDST may be used when the type of the current block is a type of a defined block.
  • a block type in which SDST is not allowed may be defined.
  • SDST may not be used when the shape of the current block is a shape of a defined block.
  • the type of block in which SDST is allowed or disallowed may be fixed and information about it may be signaled from the encoder. Or may be derived at the decoder based on attributes (eg, size, depth and / or shape) of the current / peripheral block.
  • the type of block in which SDST is allowed or disallowed may mean, for example, M, N and / or the ratio of M and N in an M ⁇ N block.
  • DCT-2 or DST-7 is used as a conversion method, and entropy encoding / decoding of the conversion mode information on which conversion method is used. If the DST-7 is used as a conversion method, the residual signal rearrangement process may be performed.
  • DCT-2 or SDST may be used as the conversion method, and entropy encoding / decoding of the conversion mode information on which conversion method is used.
  • the conversion method may be selectively used according to the partition type of the CU and the PU or the shape of the current block.
  • DCT-2 when the divided form of the CU and PU or the form of the current block is 2N ⁇ 2N, DCT-2 may be used, and DCT-2 or SDST may be selectively used for the remaining divided and block forms.
  • DCT-2 may be used, and DCT-2 or SDST may be selectively used for the remaining partition and block types.
  • DCT-2 may be used, and DCT-2 or SDST may be selectively used for the remaining partition and block types.
  • scanning and inverse scanning of transform coefficients may be performed on a divided block basis.
  • scanning and inverse scanning of transform coefficients may be performed in units of undivided current blocks.
  • the transform / inverse transform using the SDST or the DST-7 may be performed according to at least one of an intra prediction mode (direction) of the current block, a size of the current block, and a component of the current block (either luminance component or chrominance component). Can be.
  • DST-1 may be used instead of DST-7 at the time of conversion / inverse conversion using the SDST or the DST-7.
  • DCT-4 may be used instead of the DST-7 at the time of the conversion / inverse conversion using the SDST or the DST-7.
  • the rearrangement method used for rearranging the residual signals of the SDST or the DST-7 may be applied when the DCT-2 is converted / inversely transformed. That is, even when using the DCT-2, the residual signal may be rearranged or the residual signal may be rotated using a predetermined angle.
  • the SDST of the present invention aims at improving image compression efficiency by changing a conversion method.
  • Performing DST-7 by shuffling the residual signal can exhibit high compression efficiency because it effectively reflects the residual signal distribution characteristic in the PU.
  • the residual signal rearrangement process may be implemented by a horizontal flipping and a vertical flipping method.
  • Residual signal rearrangement methods (1) to (4) may be implemented through flipping as follows.
  • r '(x, y) is the residual signal after rearrangement
  • r (x, y) is the residual signal before rearrangement
  • w and h represent the width and height of the block, respectively
  • x and y represent the residual signal position in the block.
  • the reverse rearrangement method of the rearrangement method using flipping may be performed by the same process as the rearrangement method. That is, the residual signal rearranged using the horizontal flipping can be restored to the original residual signal arrangement by performing the horizontal flipping once again.
  • the rearrangement method performed by the encoder and the inverse rearrangement method performed by the decoder may be the same flipping method.
  • the residual signal shuffling / rearrangement method using the flipping can be used without dividing the current block. That is, in the SDST method, the current block (TU, etc.) is divided into sub-blocks and DST-7 is used for each sub-block. However, the residual signal shuffling / rearrangement method using flipping may be used. In this case, the DST-7 may be used after the current block is flipped on all or part of the current block without dividing it into subblocks.
  • Entropy encoding / decoding may be performed based on the conversion mode information using a residual signal shuffling / rearrangement method using flipping. For example, when the flag bit indicating the conversion mode information has the first value, the residual signal shuffling / rearrangement method using flipping and the DST-7 may be used as the conversion / inverse conversion method, and the flag bit may be set to the first value. If the value is 2, a transform / inverse transform method other than the residual signal shuffling / rearrangement method using flipping may be used. In this case, the transformation mode information may be entropy encoded / decoded for each block.
  • At least one of the four flipping methods (no flipping, horizontal flipping, vertical flipping, horizontal flipping and vertical flipping) using the flipping method information may be entropy encoded in the form of a flag or an index. Can be decrypted. That is, the decoder may perform the same flipping method as that performed by the encoder through signaling about the flipping method information.
  • the conversion mode information may include flipping method information.
  • the residual signal rearrangement method is not limited to the above-described residual signal rearrangement, and the shuffling may be implemented by rotating the residual signal in the block at a predetermined angle.
  • the predetermined angle herein may mean 0 degrees, 90 degrees, 180 degrees, -90 degrees, -180 degrees, 270 degrees, -270 degrees, 45 degrees, -45 degrees, 135 degrees, -135 degrees, or the like.
  • the information on the angle may be entropy encoded / decoded in the form of a flag or an index, and may be performed similarly to the signaling method for the transform mode information.
  • the angular information may be predictively encoded / decoded from angular information of a block reconstructed around the current block during entropy encoding / decoding.
  • the current block may be divided and then SDST or DST-7 may be performed.
  • the SDST or DST-7 may be performed in the current block unit without partitioning the current block.
  • the predetermined angle may be determined differently according to the position of the subblock.
  • a method of rearranging through rotation only for a subblock of a specific position (eg, the first subblock) among the subblocks may be limitedly used.
  • the rearrangement using a predetermined angle can be applied to the entire current block.
  • the current block to be rearranged may be at least one of a residual block before inverse transformation, a residual block before inverse quantization, a residual block after inverse transformation, a residual block after inverse quantization, a restored residual block, and a restored block.
  • the transform may be performed by rearranging or rotating the coefficients of the transform matrix for transform so that the same effect as the residual signal rearrangement or rotation is obtained, and applying the same to the pre-arranged residual signal. That is, by performing the transformation using the rearrangement of the transformation matrix (matrix) instead of the residual signal rearrangement, the same effect as the method of performing the residual signal rearrangement and transformation may be obtained.
  • the rearrangement of the coefficients of the transform matrix may be performed in the same manner as the residual signal rearrangement methods described above, and the signaling method of information necessary for this may be the same as the signaling method of the information necessary for the residual signal rearrangement method described above. Can be performed.
  • some of the residual signal rearrangement methods mentioned in the above description regarding the shuffling step may be determined by the encoder as an optimal rearrangement method, and information about the determined rearrangement method may be transmitted to the decoder. For example, if four rearrangements are used, the encoder may transmit information about the residual signal rearrangement method to the decoder by 2 bits.
  • each rearrangement method having a high probability of occurrence may be encoded using fewer bits, and the rearrangement method having a lower probability of occurrence may be encoded using more bits.
  • four rearrangement methods may be coded as truncated unary codes in order of high probability of occurrence (0, 10, 110, 111).
  • the occurrence probability of the rearrangement method may vary according to encoding parameters such as the prediction mode of the current CU, the intra prediction mode (direction) of the PU, and the motion vector of the neighboring block
  • information about the rearrangement method according to the encoding parameter can be used differently.
  • the probability of occurrence of the rearrangement method may be different according to the prediction mode of the intra prediction, a small bit is allocated to the rearrangement method having a high probability of occurrence for each intra mode, and high for the rearrangement method having a low probability of occurrence.
  • bits may be allocated, or in some cases, a rearrangement method having a very low probability of occurrence may not be used and no bits may be allocated.
  • Table 5 shows an example of a method of encoding a residual signal rearrangement method according to a prediction mode of a CU and an intra prediction mode (direction) of a PU.
  • Prediction mode In-screen prediction direction Residual Signal Rearrangement Method (One) (2) (3) (4) In screen Planar / DC 0 110 10 111 In screen Horizontal or near horizontal mode 0 - One - In screen Vertical or near vertical mode 0 One - - In screen Even 0 10 11 - In screen odd number 0 - 10 11 In screen Otherwise 0 10 11 - Between screens - 00 01 10 11
  • the residual signal rearrangement methods (1) to (4) of Table 5 are indexes for the scanning / rearrangement order, indexes for predetermined angle values, or indexes for predetermined flipping methods for the residual signal rearrangements described previously. And the like can be specified how the residual signal rearrangement.
  • At least one rearrangement method may be used in the encoder and the decoder.
  • the current block when the current block is intra mode and the intra prediction direction is even, at least one of no flipping, horizontal flipping, and vertical flipping may be used as a residual signal rearrangement method.
  • at least one of no flipping, vertical flipping, horizontal and vertical flipping methods may be used as a residual signal rearrangement method.
  • information about rearrangement method can be entropy encoded / decoded by truncated unary code based on the frequency of four methods.
  • the probability of the rearrangement method (1) and (3) may be high.
  • one bit may be used for each of the two rearrangement methods to entropy encode / decode the information on the rearrangement method.
  • the probability of the rearrangement method may be high.
  • entropy encoding / decoding of the information on the rearrangement method may be performed using 1 bit in each of the two methods.
  • entropy encoding / decoding may be performed using truncated unary code only for (1), (2), and (3) rearrangement methods.
  • the information on the rearrangement method may be entropy encoded / decoded using truncated unary code only for the rearrangement methods (1), (3), and (4).
  • the probability of occurrence of the rearrangement method can be equally seen, and the information on the rearrangement method can be entropy coded / decoded with a fixed length code of 2 bits.
  • each encoding bin value may use arithmetic encoding / decoding.
  • each encoding bin value may be entropy encoded / decoded in bypass mode without using arithmetic encoding.
  • 27 and 28 show positions where residual rearrangement is performed in the encoder and the decoder according to the present invention, respectively.
  • the encoder may perform residual signal rearrangement before performing the DST-7 conversion process.
  • the residual signal rearrangement may be performed between the transform process and the quantization process in the encoder, and the residual signal rearrangement may be performed after the quantization process is performed.
  • the decoder may perform residual signal rearrangement after performing the DST-7 inverse transform process.
  • the residual signal rearrangement may be performed between the inverse quantization process and the inverse transformation process in the decoder, and the residual signal rearrangement may be performed before the inverse quantization process is performed.
  • 29 is a diagram for describing a decoding method using the SDST method according to the present invention.
  • a transform mode of a current block may be determined (S2910), and residual data of the current block may be inversely transformed according to the transform mode of the current block (S2920).
  • residual data of the inversely transformed current block may be rearranged according to the transform mode of the current block.
  • the transformation mode may include at least one of a shuffling disc sine transform (SDST), a shuffling disc cosine transform (SDCT), a discrete sine transform (DST), and a discrete cosine transform (DCT).
  • SDST shuffling disc sine transform
  • SDCT shuffling disc cosine transform
  • DST discrete sine transform
  • DCT discrete cosine transform
  • the SDST mode may indicate a mode for performing inverse transformation in the DST-7 transformation mode and performing rearrangement of the inversely transformed residual data.
  • the SDCT mode may indicate a mode for performing inverse transform in the DCT-2 transform mode and performing rearrangement of the inverse transformed residual data.
  • the DST mode may indicate a mode in which inverse transformation is performed in the DST-7 transformation mode and in which rearrangement of the inverse transformed residual data is not performed.
  • the DCT mode may indicate a mode in which inverse transform is performed in the DCT-2 transform mode and no rearrangement of the inverse transformed residual data is performed.
  • the rearrangement of the residual data may be performed only when the transform mode of the current block is one of SDST and SDCT.
  • DST-7 conversion mode Although the inverse transformation is performed in the above-described SDST and DST modes in the DST-7 conversion mode, other DST-based conversion modes such as DST-1 and DST-2 may be used.
  • the step of determining the conversion mode of the current block may include obtaining the conversion mode information of the current block from the bitstream and determining the conversion mode of the current block based on the conversion mode information.
  • the conversion mode of the current block may be determined based on at least one of a prediction mode of the current block, depth information of the current block, a size of the current block, and a shape of the current block.
  • the transform mode of the current block may be determined as one of SDST and SDCT.
  • the first direction order may be any one of a raster scan order, an up-right diagonal scan order, a horizontal scan order, and a vertical scan order. It can be one.
  • the first direction order may be defined as follows.
  • any one of the above-described directions may be selectively used.
  • the first direction and the second direction may be the same or may be different from each other.
  • the residual data of the inversely transformed current block may be rearranged in units of subblocks in the current block.
  • the residual data may be rearranged based on the position of the sub block in the current block. Rearrangement of the residual data based on the position of the sub block is described in detail in Equation 6 above, and thus redundant description will be avoided.
  • the residual data of the inversely transformed current block may be rearranged by rotating the residual data arranged in the inversely transformed current block by a predetermined angle.
  • the residual data of the inversely transformed current block may be rearranged by flipping the residual data arranged in the inversely transformed current block according to a flipping method.
  • determining the conversion mode of the current block may include obtaining flipping method information from the bitstream and determining the flipping method of the current block based on the flipping method information. have.
  • FIG. 30 is a view for explaining a coding method using the SDST method according to the present invention.
  • the conversion mode of the current block may be determined (S3010).
  • residual data of the current block may be rearranged according to a conversion mode of the current block.
  • residual data of the rearranged current block may be converted according to the conversion mode of the current block.
  • the transformation mode may include at least one of a shuffling disc sine transform (SDST), a shuffling disc cosine transform (SDCT), a discrete sine transform (DST), and a discrete cosine transform (DCT).
  • SDST shuffling disc sine transform
  • SDCT shuffling disc cosine transform
  • DST discrete sine transform
  • DCT discrete cosine transform
  • the determining of the transform mode of the current block may be determined based on at least one of a prediction mode of the current block, depth information of the current block, a size of the current block, and a shape of the current block.
  • the transform mode of the current block may be determined as one of SDST and SDCT.
  • the residual data of the current block may be rearranged in units of sub blocks within the current block.
  • rearranging the residual data of the current block may rearrange the residual data based on the position of the sub block in the current block.
  • the residual data of the current block may be rearranged by rotating the residual data arranged in the current block at a predetermined angle.
  • the residual data arranged in the current block in the current block may be flipped and rearranged by a flipping method.
  • the image decoder using the SDST method according to the present invention determines the conversion mode of the current block, inversely transforms the residual data of the current block according to the conversion mode of the current block, and converts the inverse transform of the current block according to the conversion mode of the current block. It may include an inverse transform unit for rearranging the residual data.
  • the transformation mode may include at least one of a shuffling disc sine transform (SDST), a shuffling disc cosine transform (SDCT), a discrete sine transform (DST), and a discrete cosine transform (DCT).
  • the image decoder using the SDST method according to the present invention determines the transform mode of the current block, rearranges the residual data of the current block according to the transform mode of the current block, and reorders the current block according to the transform mode of the current block. It may include an inverse transform unit for inversely transforming the residual data of the.
  • the transformation mode may include at least one of a shuffling disc sine transform (SDST), a shuffling disc cosine transform (SDCT), a discrete sine transform (DST), and a discrete cosine transform (DCT).
  • the image encoder using the SDST method according to the present invention determines the transform mode of the current block, rearranges the residual data of the current block according to the transform mode of the current block, and rearranges the current block according to the transform mode of the current block. It may include a conversion unit for converting the residual data of the.
  • the transformation mode may include at least one of a shuffling disc sine transform (SDST), a shuffling disc cosine transform (SDCT), a discrete sine transform (DST), and a discrete cosine transform (DCT).
  • the image encoder using the SDST method according to the present invention determines a conversion mode of the current block, converts residual data of the current block according to the conversion mode of the current block, and residuals of the converted current block according to the conversion mode of the current block. It may include a conversion unit for rearranging the data.
  • the transformation mode may include at least one of a shuffling disc sine transform (SDST), a shuffling disc cosine transform (SDCT), a discrete sine transform (DST), and a discrete cosine transform (DCT).
  • the bitstream generated by the encoding method using the SDST method according to the present invention may include determining a transform mode of the current block, rearranging residual data of the current block according to the transform mode of the current block, and transform mode of the current block. Transforming the residual data of the current block rearranged according to the above, wherein the transform mode includes a shuffling discrete cosine transform (SDST), a shuffling discrete cosine transform (SDCT), a discrete sine transform (DST), and a discrete cosine transform (DCT). It may include at least one of.
  • SDST discrete cosine transform
  • SDCT discrete cosine transform
  • DST discrete sine transform
  • DCT discrete cosine transform
  • compression efficiency may be improved by changing a scanning and / or grouping method of transformed and / or quantized coefficients.
  • the video encoding process includes largely predicting an original block through intra prediction or inter prediction, and applying at least one of transform or quantization to residual pixels in a residual block that is a difference between the prediction block and the original block.
  • a bitstream which is a compressed form of an original image, may be generated by performing entropy coding on coefficients and encoding information in a block to which at least one of transform or quantization is applied, which is a probability-based lossless compression method.
  • the generated bitstream may be transmitted to a decoder or stored in a recording medium.
  • a scanning and / or grouping method according to the present invention is used to entropy encode / decode coefficients within a TU to which transform and / or quantization have been applied.
  • Applicable Encoding / decoding mentioned below may mean entropy encoding / decoding.
  • the TU referred to below may mean a sample array in which one or more samples, such as a CU, a PU, a block, a sub block, and the like exist. That is, a TU may mean at least one or more of a CU, a PU, a block, and a sub block.
  • the coefficients mentioned below may mean transformed and / or quantized coefficients.
  • the transformation may include at least one of a primary transformation and a secondary transformation.
  • the secondary transformation may refer to a method of performing the transformation once more in addition to all or some of the primary transformed coefficients.
  • the predetermined prediction mode may be an inter prediction mode or an intra prediction mode.
  • the intra prediction mode may be either a pre-defined directional mode or a non-directional mode.
  • the coefficients in the TU may be encoded / decoded by reflecting a distribution characteristic of transform and / or quantization coefficients in the TU predicted in the predetermined prediction mode.
  • the TU may be divided into one or more subblocks through a predetermined grouping method, and encoding / decoding may be performed by applying the scanning method to coefficients belonging to each subblock.
  • Scanning and / or grouping according to the present invention may take into account distribution characteristics of transformed and / or quantized coefficients within a TU. Therefore, according to the present invention, the probability that nonzero coefficients or zero coefficients can be classified into the same group can be increased. According to the present invention, since the number of bits necessary for encoding / decoding coefficients in a TU can be reduced, more bits can be saved compared to the same picture quality.
  • a coefficient group (CG) may be defined, which is a group of N coefficients in a TU.
  • N may be a positive integer of 0 or more.
  • N may be 16.
  • the grouping may mean allocating coefficients in a TU to which transform and / or quantization is applied in units of the coefficient group.
  • the group mentioned below may mean a coefficient group.
  • FIG. 31 is a diagram for explaining an example in which transform and / or quantized coefficients in a TU having a size of 16 ⁇ 16 are grouped in CG units.
  • Coefficients belonging to the fixed 4x4 square subblock in the TU may be grouped into one CG.
  • a flag and / or syntax element for encoding / decoding transformed and / or quantized coefficients may be determined.
  • the flag and / or syntax element may include, for example, at least one of coded_sub_block_flag (hereinafter referred to as CSBF), sig_coeff_flag, coeff_abs_level_greater1_flag, coeff_abs_level_greater2_flag, coeff_sign_flag, coeff_abs_level_remaining_value.
  • coded_sub_block_flag may be a syntax element indicating whether there is any non-zero transform and / or quantized coefficient in each CG.
  • sig_coeff_flag may be a syntax element indicating whether the transformed and / or quantized coefficients are zero or not.
  • coeff_abs_level_greater1_flag may be a syntax element indicating whether or not the absolute value of the transformed and / or quantized coefficient is greater than one.
  • coeff_abs_level_greater2_flag may be a syntax element indicating whether the absolute value of the transformed and / or quantized coefficient is greater than two.
  • coeff_sign_flag may be a syntax element indicating a sign value of transformed and / or quantized coefficients.
  • coeff_abs_level_remaining_value may be a syntax element indicating a value obtained by subtracting 3 from an absolute value of the transformed and / or quantized coefficients when the absolute value of the transformed and / or quantized coefficients is greater than 3. That is, at least one or more of the syntax elements for the transformed and / or quantized coefficients may be encoded / decoded in the CG unit.
  • a specific scanning method may be selected based on the prediction mode for the intra prediction or the inter prediction and / or the prediction direction of the intra prediction. At least one or more of the flag and syntax elements may be determined while scanning the transformed and / or quantized coefficients within each CG of the TU using the selected scanning method. In addition, at least one or more of the flag and syntax elements may be encoded / decoded while scanning the transformed and / or quantized coefficients in each CG of the TU using the selected scanning method.
  • Table 6 exemplarily shows a method of scanning coefficients of each CG in a TU.
  • the scanning method may be determined according to the prediction mode, the intra prediction direction, and / or the block size.
  • the scanning method and its determination condition are not limited to the example shown in Table 6.
  • the scanning method may be determined based on at least one of the prediction mode of the TU, the intra prediction direction, and the size of the TU.
  • a scanning method different from the scanning method shown in Table 6 may be performed.
  • the transform and / or quantized coefficients to be scanned may include at least one of a quantized transform coefficient level, a transform coefficient, a quantized level, and a residual signal coefficient. Can mean.
  • Each of the scanning methods (diagonal, horizontal or vertical) shown in Table 6 may correspond to each of the scanning methods shown in FIG. 10.
  • FIG. 32 exemplarily shows a scanning order of all coefficients within a TU having a size of 16 ⁇ 16.
  • the coefficient of the TU may be performed by performing at least one of transform and / or quantization on the residual block generated through the difference between the prediction block generated through inter-screen prediction or intra-screen prediction and the original block.
  • the thick line indicates the boundary of each CG
  • the solid arrow indicates the scanning order of coefficients in each CG
  • the dotted line arrow indicates the CG to be scanned next after scanning of the last coefficient in each CG.
  • the dotted arrows indicate the scanning order between CGs.
  • any one of a plurality of pre-defined scanning methods may be selectively used based on at least one or more of a prediction direction and a TU size.
  • Coefficients in each CG of the predicted TU between screens may use a scanning order in a down-left diagonal direction. At this time, the coefficients at the position where the arrow passes in FIG. 32 may be scanned. In addition, up-right diagonal scanning may be applied instead of scanning in the lower left diagonal direction.
  • diagonal scanning may mean lower left diagonal scanning or upper right diagonal scanning according to a scanning direction.
  • the CG may be a square of NxN size in the TU or may be a rectangle of NxM size.
  • the size of the CG may be a fixed size preset in the encoder / decoder or may be variably determined according to the size / type of the TU. Alternatively, information about the size of the CG may be signaled, and the size of the CG may be variably determined based on the corresponding information.
  • the information about the size of the CG may be encoded / decoded in various ways such as a width / height, a depth, a flag indicating whether to split or not, and the number of CGs constituting the TU.
  • 33 is a diagram for explaining the necessity of configuring distribution of coefficients in TU, efficient scanning, and CG.
  • FIG. 33A is a diagram exemplarily illustrating a frequency of occurrence of transform and / or quantized coefficients within a TU having a size of 16 ⁇ 16.
  • FIG. 33B is a diagram exemplarily illustrating a frequency of occurrence of transform and / or quantized coefficients within a TU having a size of 8 ⁇ 8.
  • the higher the frequency of occurrence of the coefficient the darker the color.
  • the frequency of occurrence of the coefficient is lower as it moves away from the DC coefficient position. This may be a common feature that appears in all TUs predicted in the inter prediction mode regardless of the size of the TUs. This is because high compression performance can be obtained by transforming and / or quantized coefficients in video compression so that the coefficients occur in the low frequency band.
  • a more efficient scanning and / or grouping method for encoding / decoding transform and / or quantized coefficients in a TU in consideration of distribution characteristics of transform and / or quantized coefficients in a TU may be provided. Can be.
  • the purpose of scanning according to the present invention is to optimize the alignment of coefficients in a TU to improve entropy coding efficiency.
  • Scanning may be performed to represent the coefficients in the two-dimensional block in a one-dimensional array.
  • scanning may be performed to represent the coefficients of the one-dimensional array in a two-dimensional block.
  • the efficiency of entropy coding may vary depending on how it is distributed within the array of scanned coefficients. For example, it is preferable in terms of coding efficiency that the coefficients in the array are concentrated in the low frequency region. Since the scanning according to the present invention reflects the distribution characteristic of coefficients in the TU, the coefficients can be aligned in a direction in which the data gradually increases. As a result, entropy coding efficiency can be improved.
  • the grouping according to the present invention is intended to increase the number of CGs in which the transformed and / or quantized coefficients are all zero, so that transformed and / or quantized coefficients in a TU with a high probability that the transformed and / or quantized coefficients are zero Grouping into one CG.
  • horizontal and / or vertical transforms having separation characteristics may be performed to improve the compression ratio of video encoding / decoding.
  • the DST-7 may be used for at least one of the horizontal and vertical transformations
  • the DCT-2 may be used for at least one of the horizontal and vertical transformations.
  • the horizontal transform may use a different transform type than in the vertical transform.
  • Horizontal conversion may use DST-7 (or DST-4), and vertical conversion may use DCT-2.
  • the horizontal transform may use DCT-2, and the vertical transform may use DST-7 (or DST-4).
  • the distribution of coefficients in a block can be more concentrated on the low frequency (near the DC component) components by using the same transform method for horizontal and vertical transforms or by using different transform methods.
  • the grouping method according to the present invention may increase the number of groups in which all coefficients belonging to the group are zero by reflecting the coefficient distribution characteristic described above.
  • syntax elements eg, flags
  • encoding may mean entropy encoding.
  • the encoder may set the CSBF to 0 when all coefficients in the 4x4 CG are zero.
  • the decoder may not refer to or decode additional syntax elements (eg, flags) for restoring coefficients in the corresponding CG.
  • decryption may mean entropy decryption.
  • the encoder encodes the corresponding Cvalue by encoding at least one or more of the CSBF and additional flag or syntax elements representing the information of the coefficient (sig_coeff_flag, coeff_abs_level_greater1_flag, coeff_abs_level_greater2_flag, coeff_sign_flag, coeff_abs_level_ coefficient) Can be encoded.
  • the decoder can also decode the values of the coefficients in the corresponding CG by decoding at least one or more of the flag or syntax element. Accordingly, by grouping coefficients of positions in a TU having a high probability of occurrence of zero coefficients into one group, syntax elements and / or flags required for encoding / decoding coefficients in a group can be saved.
  • M and N may each be a positive integer of zero or more.
  • M and N may each have a value of 2, 4, 8, 16, 32, 48 or 64 or more.
  • M and N may be the same or different.
  • coefficients occurring in the high frequency region of the TU may have a smaller value and / or a frequency of occurrence.
  • the increase in the compression efficiency obtained by discarding the coefficient of the high frequency region is greater than the loss due to the deterioration of the subjective and objective image quality.
  • scanning and / or grouping according to the present invention may be applied only to a part of the upper left part of the TU.
  • information about a group and / or information about a quantized coefficient level may not be encoded / decoded. For example, in FIG. 35, encoding / decoding may not be performed on the black region.
  • the TU may mean the same as a transform unit or a transform block.
  • Scanning and / or grouping may be TU reference diagonal scanning and / or grouping.
  • N coefficients consecutive in the lower left diagonal direction from the coefficient of the lower right AC position of the TU to the coefficient of the upper left DC position may be configured as a group CG.
  • N may be a positive integer greater than zero.
  • Each of the plurality of CGs may be configured with the same number (N) coefficients. Alternatively, all or part of the plurality of CGs may be configured with different numbers of coefficients.
  • the coefficients in each group can sequentially scan the coefficients from the largest frequency domain in the lower left diagonal direction to the DC position.
  • 34 is a diagram for explaining TU reference diagonal scanning and / or grouping according to an embodiment of the present invention.
  • 34 (a) is a diagram for describing scanning and grouping for a 4X4 TU.
  • FIG. 34B is a diagram for explaining scanning and grouping for an 8X8 TU.
  • FIG. 34C is a diagram for describing scanning and grouping for a 16X16 TU.
  • arrows indicate the order of scanning coefficients in each CG. Also, successive regions shaded equally represent one CG.
  • One CG includes 16 coefficients that are continuous in the lower left diagonal direction from the coefficient at the lower right AC position. That is, in the example shown in FIG. 34, each of the plurality of CGs includes the same number (16) coefficients.
  • the coefficients in each CG may be scanned in the direction and order indicated by the arrow.
  • scanning may be performed on the CG including the coefficient after the last coefficient in the lower left diagonal scanning order. In this way, all coefficients in the TU can be scanned.
  • a right upper diagonal scan may be used instead of a lower left diagonal scan using a diagonal scanning method.
  • FIG. 35 exemplarily illustrates a coding / decoding region of a 32x32 TU.
  • coefficients in the frequency domain that do not encode / decode at least one of the information on the group and the information on the transformed and / or quantized coefficient levels are shown in black.
  • the frequency of occurrence of the coefficient located in the high frequency region is low or small.
  • the coefficient of the high frequency region is removed, there is no significant difference in image quality felt by a human according to the HVS system. Therefore, by removing the coefficients of the high frequency region without encoding, high coding efficiency can be obtained.
  • the predetermined size may be NxM.
  • N and M may each be a positive integer.
  • N and M may be the same or different.
  • NxM may be 32x32.
  • the predetermined magnitude (N and / or M) may be a fixed value pre-defined to the encoder / decoder or may be explicitly signaled.
  • the some high frequency region may be determined based on the position in the TU. For example, some high frequency regions may be determined based on horizontal and / or vertical coordinates in the TU. For example, some high frequency areas may be areas in which horizontal and / or vertical coordinates are equal to or greater than a predetermined first threshold value, or areas in which the sum of horizontal and vertical coordinates is equal to or greater than a second predetermined threshold.
  • the first and / or second threshold may be a fixed value pre-defined to the encoder / decoder and may be explicitly signaled. Or it may be determined depending on the characteristics of the TU (eg, block size, block shape, depth, prediction mode (inter or intra), intra prediction mode, type of transform, component (luminance or color difference)). For example, it may be determined as three quarters of the length or width of the TU. Or from a threshold used for one or more peripheral TUs.
  • the region to be encoded / decoded except for some of the non-encoded / decoded high frequency regions or some of the non-encoded / decoded high frequency regions may have a block shape such as a square, a rectangle, a triangle, and / or a pentagon.
  • the high frequency region may be determined based on characteristics of the TU (eg, block size, block shape, depth, prediction mode (inter or intra), intra prediction mode, type of transformation, and component (luminance or color difference)).
  • the coefficients in the TU can be scanned in the lower left diagonal direction from the coefficient of the lower right AC position to the coefficient of the upper left DC position, and the N consecutive coefficients can be grouped into one group.
  • the coefficients in the TU may be scanned in a right upper diagonal direction from the coefficient of the upper left DC position to the coefficient of the lower right AC position, and the N consecutive coefficients may be grouped into one group.
  • the grouping may be performed according to the scanning direction from the coefficient of the lower right AC position to the coefficient of the upper left DC position.
  • Scanning and / or grouping according to an embodiment of the present invention may be TU reference zigzag scanning and / or grouping.
  • FIG. 36 is a diagram illustrating zigzag scanning and / or grouping according to an embodiment of the present invention.
  • 36 (a) is a diagram for describing scanning and grouping for 4 ⁇ 4 TUs.
  • 36 (b) is a diagram for describing scanning and grouping for an 8 ⁇ 8 TU.
  • FIG. 36C is a diagram for describing scanning and grouping for a 16X16 TU.
  • arrows indicate the order of scanning coefficients in each CG.
  • successive regions shaded equally represent one CG.
  • N coefficients that are continuous in the zigzag direction from the coefficient of the lower right AC position of the TU to the coefficient of the upper left DC position may be configured as one CG.
  • N may be a positive integer greater than zero.
  • Each of the plurality of CGs may be configured with the same number (N) coefficients. Alternatively, all or part of the plurality of CGs may be configured with different numbers of coefficients.
  • the coefficients in each CG may be sequentially scanned from the coefficient of the lower right AC position to the coefficient of the upper left DC position in the zigzag direction. In addition, each CG can be scanned in the zigzag direction.
  • scanning may be performed on the CG including the coefficient after the last coefficient in the TU reference zigzag scanning order. In this way, all coefficients in the TU can be scanned.
  • coefficients of some high frequency regions are not encoded / decoded for TUs having a predetermined size or more. You may not.
  • the method described with reference to FIG. 35 may be applied to the predetermined size, specification of some high frequency regions, and the like.
  • the coefficients in the TU may be scanned in the zigzag scanning direction from the coefficient of the lower right AC position to the coefficient of the upper left DC position, and the N consecutive coefficients may be grouped into one group.
  • the coefficients in the TU may be scanned in the zigzag scanning direction from the coefficient of the upper left DC position to the coefficient of the lower right AC position, and the N consecutive coefficients may be grouped into one group.
  • the grouping may be performed according to the scanning direction from the coefficient of the lower right AC position to the coefficient of the upper left DC position.
  • Scanning and / or grouping according to an embodiment of the present invention may be boundary scanning and / or grouping.
  • FIG. 37A is a diagram for describing scanning and grouping for a 4X4 TU.
  • FIG. 37B is a diagram for explaining scanning and grouping for an 8X8 TU.
  • FIG. 37C is a diagram for describing scanning and grouping for 16 ⁇ 16 TUs.
  • the scanning and / or grouping methods described with reference to FIGS. 34 to 36 configure a fixed number of coefficients consecutive in the scanning order into one group.
  • groups in a TU may have different sizes or shapes, respectively.
  • the larger the coefficient located in the high frequency component the larger the size of the group.
  • coefficients located in the high frequency components may have a high probability of being zero. Therefore, the probability that all coefficients of the group including many high frequency components shown in FIG. 37 is 0 is not significantly different from the probability that all coefficients of 4x4 CG are zero.
  • the CG is configured as shown in FIG. 37, since the number of bits required for coding the coefficients in the TU is reduced because the total number of groups is reduced, more efficient grouping can be achieved.
  • Table 7 shows the number of groups according to the grouping shown in FIG. 37 and the CG grouping of 4 ⁇ 4 units.
  • grouping by the method shown in FIG. 37 is advantageous in view of the total number of groups as the size of the TU increases, rather than grouping the CGs in 4x4 units. That is, it can be seen that as the size of the TU increases, the efficiency of grouping shown in FIG. 37 increases.
  • each of the plurality of CGs included in one TU may include a fixed number of coefficients, and all or some of the plurality of CGs may include different numbers of coefficients.
  • zigzag scanning may be performed for a group of fixed size (eg, 4 ⁇ 4 square size) including a DC coefficient.
  • the remaining groups may be repeatedly scanned in the horizontal and / or vertical direction with respect to the coefficients in the group. In this case, at least one of lower left diagonal scanning, upper right diagonal scanning, horizontal scanning, and vertical scanning may be used instead of zigzag scanning.
  • the some high frequency regions may be regions located at coordinates of at least half of the TU width in the horizontal direction and / or at least half of the TU height in the vertical direction.
  • 38 exemplarily illustrates an encoding / decoding region of a 32x32 TU.
  • coefficients of regions where scanning, grouping, and / or encoding / decoding are not performed are shown in black. If the horizontal and / or vertical position of a particular coefficient within the TU is greater than or equal to the third threshold, then that coefficient may be excluded from scanning and / or grouping. For the coefficients excluded from scanning and / or grouping, the encoding / decoding process may also be omitted, and the value may be set to zero.
  • the third threshold may be a fixed value pre-defined to the encoder / decoder or may be explicitly signaled. Or it may be determined depending on the characteristics of the TU (eg, block size, block shape, depth, prediction mode (inter or intra), intra prediction mode, type of transform, component (luminance or color difference)). For example, the third threshold may be determined as one half of the horizontal length and / or vertical length of the TU. Or from a threshold used for one or more peripheral TUs. Alternatively, the threshold for the horizontal position of the coefficient may be set differently from the threshold for the vertical position.
  • An area to be encoded / decoded except for some non-encoded / high-decoded high frequency areas or some non-encoded / decoded high-frequency areas may have a square, rectangle, triangle, and / or pentagon shape.
  • the high frequency region may be determined based on characteristics of the TU (eg, block size, block shape, depth, prediction mode (inter or intra), intra prediction mode, type of transformation, and component (luminance or color difference)).
  • boundary scanning and / or grouping according to the TU size scans coefficients in the TU from the coefficient of the AC position to the coefficient of the DC position, and groups a variable number of coefficients in succession in the scanning order.
  • the coefficients in the TU may be scanned from the coefficient of the DC position to the coefficient direction of the AC position, and the continuous variable number of coefficients may be grouped into one group.
  • the grouping may be performed according to the scanning direction from the coefficient of the AC position to the coefficient of the DC position.
  • Scanning and / or grouping according to an embodiment of the present invention may be non-square TU reference scanning and / or grouping.
  • Rectangular TU reference scanning and / or grouping may be performed when the M ⁇ N TU is not square. For example, it may be applied to a rectangular TU such as 2N ⁇ N, N ⁇ 2N, 4N ⁇ N, N ⁇ 4N, 8N ⁇ N or N ⁇ 8N.
  • FIG. 39 exemplarily illustrates scanning and / or grouping for a horizontally long rectangular TU.
  • scanning and / or grouping are performed from 8x2 TU of 4NxN structure, 16x4 TU of 4NxN structure, 16x2 TU of 8NxN structure, 32x8 TU of 8NxN structure, 8x4 TU of 2NxN structure, and 16x8 TU of 2NxN structure.
  • FIG. 40 exemplarily illustrates scanning and / or grouping for a vertically long rectangular TU. Scanning and / or grouping in 2x8 TU of Nx4N structure, 4x16 TU of Nx4N structure, 2x16 TU of Nx8N structure, 4x32 TU of Nx8N structure, 4x8 TU of Nx2N structure, 8x16 TU of Nx2N structure in order from left to right in FIG. Indicates.
  • arrows indicate the order of scanning the coefficients in each CG.
  • successive regions shaded equally represent one CG.
  • coefficients in the TU of the rectangular structure are also concentrated in the frequency position near the DC component. Accordingly, in consideration of this, the coefficients in the TU may be scanned and grouped. Also, coefficients in a rectangular TU where the horizontal length is longer than the vertical length can occur much near the DC component and in the right region of the DC component. Also, coefficients in the TU where the vertical length is longer than the horizontal length can occur much near the DC component and in the region below the DC component.
  • a zigzag scanning inclined to the horizontal axis may be performed on a horizontally long TU such as the 16x8 TU of FIG. 39.
  • the zigzag scanning inclined with respect to the vertical axis may be performed on a vertically long TU, such as the 8x16 TU of FIG. 40.
  • 16 coefficients consecutive in the scanning order may be grouped into one group.
  • zigzag scanning inclined along the vertical axis may be performed on the horizontally long TUs, and zigzag scanning inclined on the horizontal axis may be performed on the vertically long TUs.
  • At least one of lower left diagonal scanning, upper right diagonal scanning, horizontal scanning, and vertical scanning may be used instead of zigzag scanning.
  • the rectangular structure of the TU is four times or more (or K times or more, K is an integer of 2 or more), for example, Nx4N, Nx8N, Nx16N, 4NxN, 8NxN, or 16NxN.
  • the TU may be divided into subblocks having the same ratio as the TU to perform scanning and / or grouping from the coefficient of the AC position to the coefficient of the DC position.
  • coefficient scanning and / or grouping methods in a TU having a higher compression efficiency than a method of grouping into a fixed 4x4 size CG and scanning by CG are provided. Can be.
  • each of the scanning and / or grouping methods according to the present invention may completely replace the method of scanning and grouping coefficients in a TU in the lower left diagonal direction from the AC position to the DC position (method 1).
  • the coefficients in the TU may be grouped into a fixed 4x4 sized CG and scanning may be performed according to the present invention in CG units or CG (method 2).
  • method 3 At least one or more of the methods 1 and 2 may be selectively performed (method 3).
  • the encoder may select at least one or more of a plurality of scanning and / or grouping methods.
  • Information about the scanning and / or grouping method selected by the encoder may be encoded in the bitstream.
  • the decoder may decode information about the selected scanning and / or grouping method from the bitstream.
  • the decoder can then decode the coefficients within the TU using the selected scanning and / or grouping method.
  • a flag may be used to encode information about the selected scanning and / or grouping method.
  • the number of bits of the flag can be determined by the number of selectable scanning / grouping methods. For example, if the number of selectable scanning and / or grouping methods is two, the flag may be a one bit flag.
  • two selectable methods include at least one of diagonal scanning and / or grouping using a fixed 4x4 sized CG, TU reference diagonal scanning and / or grouping, TU reference zigzag scanning and / or grouping, and boundary scanning and / or grouping. It can be two. Selectable scanning and / or grouping methods may be predefined in the encoder and the decoder.
  • the transformed and / or quantized coefficients may dense near the DC component.
  • an index of 1 bit or more may be used for at least one or more information of the scanning and grouping.
  • the scanning method may be determined or applied based on an intra prediction mode, an inter prediction mode, an intra prediction direction, a TU size, a transform type, a transform size, a luma signal or a chroma signal, or the like. have.
  • a method of determining a context model related to encoding / decoding of coefficients may be changed.
  • the CSBF of the CG that has been coded / decoded on the basis of the current encoding / decoding target CG. Can only refer to it.
  • at least one or more CGs among the CGs in the current TU may be referenced. In this case, the reference CG may be selected regardless of the position in the TU.
  • FIG. 41 is an exemplary diagram for describing a reference CG when encoding / decoding a CSBF of a current CG in an 8x8 TU to which a scanning and / or grouping method according to the present invention is applied.
  • a context increment may be selected based on the CSBF value of the CG encoded / decoded immediately before the current CG to be encoded / decoded.
  • the context information for encoding / decoding the CSBF of the current CG may be obtained based on the selected context increment value.
  • the probability of whether there is a nonzero coefficient in the immediately preceding CG may affect the probability of whether there is a nonzero coefficient in the current CG.
  • the probability of the CSBF value of the immediately preceding CG may affect the probability of the CBSF value of the current CG.
  • the current CG is the first CG in the scanning order (CG including the coefficients of the AC position) or if the CSBF of the immediately encoded / decoded CG is 0, context increment for coding / decoding of the CSBF of the current CG is performed.
  • the value can be set to 0, and in other cases it can be set to 1.
  • FIG. 42 illustrates a context model reference method for encoding / decoding sig_coeff_flag according to the position of a coefficient in a TU when applying the scanning and / or grouping method according to the present invention.
  • the context model for encoding / decoding the sig_coeff_flag of each coefficient in the current CG as shown in FIG. 42 without using the CSBF of the neighboring CG.
  • the context can be selected based on the position of each coefficient within the TU.
  • a TU may be divided into a plurality of regions, and the same context increment value may be used for one region.
  • the plurality of regions may be determined based on one-nth of the horizontal length of the TU and / or one-th of the M of the vertical length.
  • N and M may be positive integers greater than zero, and N and M may be the same or different.
  • each TU may be divided into at least two regions. 42 shows an example in which each TU is divided into three regions (A region, B region, and C region).
  • the area A may be an area including a position where the horizontal coordinate is smaller than one quarter of the TU's horizontal length and the vertical coordinate is smaller than one quarter of the TU's vertical length. Or it may be an area including a position where the sum of the horizontal coordinates and the vertical coordinates is less than one quarter of the horizontal length or the vertical length of the TU.
  • the same context increment may be used for coefficients included in the A region.
  • the B region may be defined among parts except for the A region in the TU.
  • the B region may be an area including a position where the horizontal coordinate is smaller than one half of the TU's horizontal length and the vertical coordinate is smaller than one half of the TU's vertical length.
  • the sum may be a region including a position where the sum of the horizontal coordinates and the vertical coordinates is smaller than one half of the horizontal length or the vertical length of the TU.
  • the same context increment may be used for the coefficients included in the B area.
  • the C region may be defined as a portion of the TU except for the A region and the B region.
  • the same context increment may be used for coefficients included in the C region.
  • Increasing the context increment may mean that the probability of occurrence of sig_coeff_flag is increased.
  • the region may have a shape of at least one of a square, a rectangle, a triangle, and / or a pentagon.
  • the region may be determined based on characteristics of the TU (eg, block size, block shape, depth, prediction mode (inter or intra), intra prediction mode, type of transformation, and component (luminance or color difference)).
  • sig_coeff_flag can be encoded / decoded without using a context model.
  • the context model may not be used to reduce the complexity of the encoder / decoder.
  • a method of efficiently scanning and / or grouping coefficients in an encoding / decoding target TU may be provided.
  • the transform and / or quantized coefficients generated through inter-picture prediction may be more densely distributed near the DC component than the transform and / or quantized coefficients generated through intra-picture prediction.
  • the efficiency can be reduced when the coefficients in the TU block are concentrated near the DC component.
  • coefficients in a TU may be scanned and / or grouped in diagonal or zigzag order based on the TU. Applying the scanning method according to the present invention, since the coefficient values listed in one dimension are constantly reduced, the efficiency of the entropy coding aspect can be increased.
  • many groups having all zero coefficients may be generated by grouping coefficients having a frequency position having a high probability of zero as one according to a distribution characteristic of coefficients in a TU. Accordingly, the amount of bits can be reduced by saving syntax elements and / or flags necessary for encoding the coefficients in the group.
  • the intra / decoding process may be performed on each of luminance and chrominance signals.
  • at least one or more of an intra prediction mode derivation, block division, reference sample configuration, and intra prediction may be differently applied to the luminance signal and the chrominance signal during the intra / decoding process.
  • the intra / decoding process for the luminance and chrominance signals may be performed in the same manner.
  • at least one of intra prediction mode derivation, block division, reference sample configuration, and intra prediction may be equally applied to the color difference signal.
  • the above methods can be performed in the same way in the encoder and the decoder.
  • at least one or more methods of intra picture prediction mode derivation, block division, reference sample configuration, and intra picture prediction may be equally applied to the encoder and the decoder during the intra picture decoding.
  • the order of applying the above methods may be different in the encoder and the decoder. For example, in performing intra picture decoding / decoding for the current block, the encoder configures a reference sample and then encodes the determined intra picture prediction mode by performing one or more intra picture prediction.
  • the above embodiments of the present invention may be applied according to the size of at least one of a coding block, a prediction block, a block, and a unit.
  • the size here may be defined as a minimum size and / or a maximum size for the above embodiments to be applied, or may be defined as a fixed size to which the above embodiments are applied.
  • the first embodiment may be applied at the first size
  • the second embodiment may be applied at the second size. That is, the embodiments may be applied in combination according to the size.
  • the above embodiments of the present invention can be applied only when the minimum size or more and the maximum size or less. That is, the above embodiments can be applied only when the block size is included in a certain range.
  • the above embodiments may be applied only when the size of an encoding / decoding target block is 8x8 or more.
  • the above embodiments may be applied only when the size of the encoding / decoding target block is 16x16 or more.
  • the above embodiments may be applied only when the size of the encoding / decoding target block is 32x32 or more.
  • the above embodiments may be applied only when the size of the encoding / decoding target block is 64x64 or more.
  • the above embodiments may be applied only when the size of the encoding / decoding target block is 128x128 or more.
  • the above embodiments may be applied only when the size of the encoding / decoding target block is 4x4.
  • the above embodiments may be applied only when the size of an encoding / decoding target block is 8x8 or less.
  • the above embodiments may be applied only when the size of an encoding / decoding target block is 16x16 or less.
  • the above embodiments may be applied only when the size of an encoding / decoding target block is 8x8 or more and 16x16 or less.
  • the above embodiments may be applied only when the size of the encoding / decoding target block is 16x16 or more and 64x64 or less.
  • the above embodiments of the present invention can be applied according to a temporal layer.
  • a separate identifier is signaled to identify the temporal layer to which the embodiments are applicable and the embodiments can be applied to the temporal layer specified by the identifier.
  • the identifier here may be defined as a minimum layer and / or a maximum layer to which the embodiment is applicable, or may be defined as indicating a specific layer to which the embodiment is applied.
  • the above embodiments may be applied only when the temporal layer of the current image is the lowest layer.
  • the above embodiments may be applied only when the temporal layer identifier of the current image is zero.
  • the above embodiments may be applied only when the temporal layer identifier of the current image is one or more.
  • the above embodiments may be applied only when the temporal layer of the current image is the highest layer.
  • the reference picture set used in the process of reference picture list construction and reference picture list modification as in the embodiment of the present invention is one of L0, L1, L2, and L3. At least one reference picture list may be used.
  • one or more motion vectors of the encoding / decoding target block may be used.
  • N represents a positive integer of 1 or more, and may be 2, 3, 4, or the like.
  • the motion vectors are in 16-pel units, 8-pel units, 4-pixel units, integer-pel units, 1/2 -1 / 2-pel units, 1 / 4-pel units, 1 / 8-pixel units 1 / 8-pel, 1 / 16-pixel units
  • the above embodiments of the present invention may also be applied when the device has at least one of 1), 1 / 32-pixel (1 / 32-pel) units, and 1 / 64-pixel (1 / 64-pel) units.
  • a motion vector may be selectively used for each pixel unit.
  • a slice type to which the above embodiments of the present invention are applied is defined, and the above embodiments of the present invention may be applied according to the corresponding slice type.
  • a prediction block is generated using at least three or more motion vectors, and a weighted sum of at least three or more prediction blocks is calculated to calculate a block to be encoded / decoded. It can be used as the final prediction block of.
  • a prediction block is generated using at least four or more motion vectors, and a weighted sum of at least four or more prediction blocks is calculated to calculate a block to be encoded / decoded. It can be used as the final prediction block of.
  • the above embodiments of the present invention can be applied not only to inter prediction and motion compensation methods using motion vector prediction, but also to inter prediction and motion compensation methods using skip mode and merge mode.
  • the shape of the block to which the embodiments of the present invention are applied may have a square shape or a non-square shape.
  • the methods are described based on a flowchart as a series of steps or units, but the present invention is not limited to the order of steps, and certain steps may occur in a different order or simultaneously from other steps as described above. Can be. Also, one of ordinary skill in the art appreciates that the steps shown in the flowcharts are not exclusive, that other steps may be included, or that one or more steps in the flowcharts may be deleted without affecting the scope of the present invention. I can understand.
  • Embodiments according to the present invention described above may be implemented in the form of program instructions that may be executed by various computer components, and may be recorded in a computer-readable recording medium.
  • the computer-readable recording medium may include program instructions, data files, data structures, etc. alone or in combination.
  • Program instructions recorded on the computer-readable recording medium may be those specially designed and configured for the present invention, or may be known and available to those skilled in the computer software arts.
  • Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks and magnetic tape, optical recording media such as CD-ROMs, DVDs, and magneto-optical media such as floptical disks. media), and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like.
  • Examples of program instructions include not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like.
  • the hardware device may be configured to operate as one or more software modules to perform the process according to the invention, and vice versa.
  • the present invention can be used to encode / decode an image.

Abstract

본 발명은 영상 부호화/복호화 방법 및 장치에 관한 것이다. 본 발명에 따른 영상 부호화 방법은, 변환 및 양자화 중 적어도 하나를 수행하여 변환 블록을 생성하는 단계, 상기 변환 블록에 포함된 적어도 하나의 계수를 적어도 하나의 계수 그룹(Coefficient Group, CG)으로 그룹핑하는 단계, 상기 계수 그룹에 포함된 적어도 하나의 계수를 스캐닝하는 단계, 및 상기 적어도 하나의 계수를 부호화하는 단계를 포함할 수 있다.

Description

영상 부호화/복호화 방법 및 장치
본 발명은 영상의 부호화/복호화 방법 및 장치에 관한 것으로, 보다 상세하게는 스캐닝을 이용한 영상의 부호화/복호화하는 방법 및 장치에 관한 것이다.
최근 HD(High Definition) 영상 및 UHD(Ultra High Definition) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 응용 분야에서 증가하고 있다. 영상 데이터가 고해상도, 고품질이 될수록 기존의 영상 데이터에 비해 상대적으로 데이터량이 증가하기 때문에 기존의 유무선 광대역 회선과 같은 매체를 이용하여 영상 데이터를 전송하거나 기존의 저장 매체를 이용해 저장하는 경우, 전송 비용과 저장 비용이 증가하게 된다. 영상 데이터가 고해상도, 고품질화 됨에 따라 발생하는 이러한 문제들을 해결하기 위해서는 더 높은 해상도 및 화질을 갖는 영상에 대한 고효율 영상 부호화(encoding)/복호화(decoding) 기술이 요구된다.
영상 압축 기술로 현재 픽처의 이전 또는 이후 픽처로부터 현재 픽처에 포함된 화소값을 예측하는 화면 간 예측 기술, 현재 픽처 내의 화소 정보를 이용하여 현재 픽처에 포함된 화소값을 예측하는 화면 내 예측 기술, 잔여 신호의 에너지를 압축하기 위한 변환 및 양자화 기술, 출현 빈도가 높은 값에 짧은 부호를 할당하고 출현 빈도가 낮은 값에 긴 부호를 할당하는 엔트로피 부호화 기술 등 다양한 기술이 존재하고 이러한 영상 압축 기술을 이용해 영상 데이터를 효과적으로 압축하여 전송 또는 저장할 수 있다.
본 발명은 영상을 효율적으로 부호화/복호화하는 방법 및 장치를 제공하는 것을 목적으로 한다.
본 발명에 따른 영상 부호화 방법은, 변환 및 양자화 중 적어도 하나를 수행하여 변환 블록을 생성하는 단계, 상기 변환 블록에 포함된 적어도 하나의 계수를 적어도 하나의 계수 그룹(Coefficient Group, CG)으로 그룹핑하는 단계, 상기 계수 그룹에 포함된 적어도 하나의 계수를 스캐닝하는 단계, 및 상기 적어도 하나의 계수를 부호화하는 단계를 포함할 수 있다.
본 발명의 영상 부호화 방법에 있어서, 상기 스캐닝은 변환 블록 기준 대각 방향 스캐닝, 변환 블록 기준 지그재그 스캐닝 및 바운더리 스캐닝 중 적어도 하나일 수 있다.
본 발명의 영상 부호화 방법에 있어서, 상기 스캐닝이 상기 변환 블록 기준 대각 방향 스캐닝인 경우, 상기 스캐닝은 상기 변환 블록의 우하단 AC 계수 위치에서 DC 계수의 위치의 순서로 수행되거나, 상기 변환 블록의 DC 계수의 위치에서 우하단 AC 계수의 위치의 순서로 수행되고, 상기 대각 방향은 좌하단 대각 방향 또는 우상단 대각 방향이며, 상기 적어도 하나의 CG는 각각 상기 스캐닝 순서 상 연속하는 소정 개수의 계수들을 포함할 수 있다.
본 발명의 영상 부호화 방법에 있어서, 상기 스캐닝이 상기 변환 블록 기준 지그재그 스캐닝인 경우, 상기 스캐닝은 상기 변환 블록의 우하단 AC 계수 위치에서 DC 계수의 위치의 순서로 수행되거나, 상기 변환 블록의 DC 계수의 위치에서 우하단 AC 계수의 위치의 순서로 지그재그로 수행되고, 상기 적어도 하나의 CG는 각각 상기 스캐닝 순서 상 연속하는 소정 개수의 계수들을 포함할 수 있다.
본 발명의 영상 부호화 방법에 있어서, 상기 스캐닝이 상기 바운더리 스캐닝인 경우, 상기 적어도 하나의 CG 중, DC 계수를 포함하는 제1 CG에 대해서는 제1 스캐닝을 적용하고, 나머지 CG에 대해서는 제2 스캐닝을 적용하며, 상기 적어도 하나의 CG의 각각은 다른 CG와 크기 또는 형태가 상이할 수 있다.
본 발명의 영상 부호화 방법에 있어서, 상기 제1 스캐닝은 지그재그 스캐닝이고, 상기 제2 스캐닝은 수평 및 수직 스캐닝 중 적어도 하나일 수 있다.
본 발명의 영상 부호화 방법에 있어서, 상기 변환 블록의 소정의 영역을 특정하는 단계를 더 포함하고, 상기 소정의 영역에 포함된 계수들에 대해서는 스캐닝, 그룹핑 및 부호화 중 적어도 하나를 수행하지 않을 수 있다.
본 발명의 영상 부호화 방법에 있어서, 상기 소정의 영역은 상기 변환 블록 내 계수의 좌표에 기초하여 특정될 수 있다.
본 발명의 영상 부호화 방법에 있어서, 상기 변환 블록이 직사각형일 때, 상기 스캐닝은 지그재그 스캐닝이고, 상기 지그재그 스캐닝은 상기 변환 블록의 가로 또는 세로 중 보다 긴 쪽으로 기울어진 지그재그 스캐닝일 수 있다.
본 발명에 따른 영상 복호화 방법은, 변환 블록에 포함된 적어도 하나의 계수를 스캐닝하는 것에 관한 스캐닝 정보 또는 상기 스캐닝에 기초하여 상기 적어도 하나의 계수를 적어도 하나의 계수 그룹(Coefficient Group, CG)으로 그룹핑하는 것에 관한 그룹핑 정보를 식별하는 단계, 비트스트림으로부터 변환 블록에 포함된 적어도 하나의 계수를 복호화하는 단계, 및 상기 적어도 하나의 계수에 기초하여 상기 변환 블록을 복원하는 단계를 포함하고, 상기 적어도 하나의 계수를 복호화하는 단계는 상기 스캐닝 정보 및 그룹핑 정보 중 적어도 하나에 기초하여 수행될 수 있다.
본 발명의 영상 복호화 방법에 있어서, 상기 스캐닝은 변환 블록 기준 대각 방향 스캐닝, 변환 블록 기준 지그재그 스캐닝 및 바운더리 스캐닝 중 적어도 하나일 수 있다.
본 발명의 영상 복호화 방법에 있어서, 상기 스캐닝이 상기 변환 블록 기준 대각 방향 스캐닝인 경우, 상기 스캐닝은 상기 변환 블록의 우하단 AC 계수 위치에서 DC 계수의 위치의 순서로 수행되거나, 상기 변환 블록의 DC 계수의 위치에서 우하단 AC 계수의 위치의 순서로 수행되고, 상기 대각 방향은 좌하단 대각 방향 또는 우상단 대각 방향이며, 상기 적어도 하나의 CG는 각각 상기 스캐닝 순서 상 연속하는 소정 개수의 계수들을 포함할 수 있다.
본 발명의 영상 복호화 방법에 있어서, 상기 스캐닝이 상기 변환 블록 기준 지그재그 스캐닝인 경우, 상기 스캐닝은 상기 변환 블록의 우하단 AC 계수 위치에서 DC 계수의 위치의 순서로 수행되거나, 상기 변환 블록의 DC 계수의 위치에서 우하단 AC 계수의 위치의 순서로 지그재그로 수행되고, 상기 적어도 하나의 CG는 각각 상기 스캐닝 순서 상 연속하는 소정 개수의 계수들을 포함할 수 있다.
본 발명의 영상 복호화 방법에 있어서, 상기 스캐닝이 상기 바운더리 스캐닝인 경우, 상기 적어도 하나의 CG 중, DC 계수를 포함하는 제1 CG에 대해서는 제1 스캐닝을 적용하고, 나머지 CG에 대해서는 제2 스캐닝을 적용하며, 상기 적어도 하나의 CG의 각각은 다른 CG와 크기 또는 형태가 상이할 수 있다.
본 발명의 영상 복호화 방법에 있어서, 상기 제1 스캐닝은 지그재그 스캐닝이고, 상기 제2 스캐닝은 수평 및 수직 스캐닝 중 적어도 하나일 수 있다.
본 발명의 영상 복호화 방법에 있어서, 상기 변환 블록의 소정의 영역을 특정하는 단계를 더 포함하고, 상기 소정의 영역에 포함된 계수들은 0으로 설정될 수 있다.
본 발명의 영상 복호화 방법에 있어서, 상기 소정의 영역은 상기 변환 블록 내 계수의 좌표에 기초하여 특정될 수 있다.
본 발명의 영상 복호화 방법에 있어서, 상기 변환 블록이 직사각형일 때, 상기 스캐닝은 지그재그 스캐닝이고, 상기 지그재그 스캐닝은 상기 변환 블록의 가로 또는 세로 중 보다 긴 쪽으로 기울어진 지그재그 스캐닝일 수 있다.
본 발명에 따른 영상 부호화 장치는, 변환 및 양자화 중 적어도 하나를 수행하여 변환 블록을 생성하고, 상기 변환 블록에 포함된 적어도 하나의 계수를 적어도 하나의 계수 그룹(Coefficient Group, CG)으로 그룹핑하고, 상기 계수 그룹에 포함된 적어도 하나의 계수를 스캐닝하고, 상기 적어도 하나의 계수를 부호화하는 부호화부를 포함할 수 있다.
본 발명에 따른 기록매체는 변환 및 양자화 중 적어도 하나를 수행하여 변환 블록을 생성하는 단계, 상기 변환 블록에 포함된 적어도 하나의 계수를 적어도 하나의 계수 그룹(Coefficient Group, CG)으로 그룹핑하는 단계, 상기 계수 그룹에 포함된 적어도 하나의 계수를 스캐닝하는 단계, 및 상기 적어도 하나의 계수를 부호화하는 단계를 포함하는 영상 부호화 방법에 의해 생성된 비트스트림을 저장할 수 있다.
본 발명에 의하면, 영상의 부호화/복호화 효율을 향상시킬 수 있다.
본 발명에 의하면, TU 내의 계수들을 부호화하는데 필요한 비트량을 줄일 수 있다.
도 1은 본 발명이 적용되는 부호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.
도 2는 본 발명이 적용되는 복호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.
도 3은 영상을 부호화 및 복호화할 때의 영상의 분할 구조를 개략적으로 나타내는 도면이다.
도 4는 부호화 유닛(CU)이 포함할 수 있는 예측 유닛(PU)의 형태를 도시한 도면이다.
도 5는 부호화 유닛(CU)이 포함할 수 있는 변환 유닛(TU)의 형태를 도시한 도면이다.
도 6은 화면 내 예측 과정의 실시예를 설명하기 위한 도면이다.
도 7은 화면 간 예측 과정의 실시예를 설명하기 위한 도면이다.
도 8은 화면 내 예측 모드에 따른 변환 세트를 설명하기 위한 도면이다.
도 9는 변환의 과정을 설명하기 위한 도면이다.
도 10은 양자화된 변환 계수의 스캐닝을 설명하기 위한 도면이다.
도 11은 블록 분할을 설명하기 위한 도면이다.
도 12는 본 발명에 따른 DCT-2 주파수 도메인에서 기저 벡터(basis vector)를 도시한 도면이다.
도 13은 본 발명에서 따른 DST-7 주파수 도메인에서 기저 벡터(basis vector)를 도시한 도면이다.
도 14는 본 발명에 따른 Cactus sequence의 인터 모드(inter mode)로 예측된 8x8 코딩 유닛(CU)의 2Nx2N 예측 유닛(PU) 내 위치에 따른 평균 잔여(residual) 값의 분포를 나타내는 도면이다.
도 15는 본 발명에 따른 화면간 예측 모드(inter mode)로 예측된 8x8 코딩 유닛(CU)의 2Nx2N 예측 유닛(PU) 내 잔여(residual) 값의 분포 특성을 나타내는 3차원 그래프이다.
도 16은 본 발명에 따른 코딩 유닛(CU)의 2Nx2N 예측 유닛(PU) 모드에서 잔여(residual) 분포 특징을 도시한 도면이다.
도 17은 본 발명에 따른 2Nx2N 예측 유닛(PU)의 셔플링(shuffling) 전후의 잔여(residual) 분포 특징을 도시한 도면이다.
도 18은 본 발명에 따른 서브 블록의 4x4 잔여(residual) 데이터 재배열의 일 예를 도시한 도면이다.
도 19는 본 발명에 따른 코딩 유닛(CU)의 예측 유닛(PU) 모드에 따른 변환 유닛(TU) 분할 구조와 변환 유닛(TU)의 셔플링(shuffling) 방법을 도시한 도면이다.
도 20은 본 발명에 따른 2Nx2N 예측 유닛(PU)의 잔여(residual) 분포에 따른 DCT-2와 SDST 수행 결과를 도시한 도면이다.
도 21은 본 발명에 따른 SDST 과정을 도시한 도면이다.
도 22는 본 발명에 따른 화면 간 예측된 코딩 유닛(CU)의 예측 유닛(PU) 분할 모드(partition mode)에 따른 변환 유닛(TU) 분할 및 잔여(residual) 절대값의 크기분포 특성을 도시한 도면이다.
도 23은 본 발명에 따른 예측 유닛(PU) 내 깊이(depth)값이 0인 변환 유닛(TU)의 잔여 신호 스캐닝(scanning) 순서와 재배치 순서를 도시한 도면이다.
도 24는 본 발명에 따른 율-왜곡 최적화(RDO)를 통한 DCT-2 또는 SDST 선택 인코딩 과정을 나타내는 순서도이다.
도 25는 본 발명에 따른 DCT-2 또는 SDST 선택 디코딩 과정을 나타내는 순서도이다.
도 26은 본 발명에 따른 SDST를 이용한 디코딩 과정을 나타내는 순서도이다.
도 27 및 도 28은 각각 본 발명에 따른 인코더 및 디코더에서 잔여 신호 재배열(residual rearrangement)이 수행되는 위치를 나타낸다.
도 29는 본 발명에 따른 SDST 방법을 이용한 복호화 방법을 설명하기 위한 순서도이다.
도 30은 본 발명에 따른 SDST 방법을 이용한 부호화 방법을 설명하기 위한 순서도이다.
도 31은 16x16 크기의 TU 내 변환 및/또는 양자화된 계수들이 CG 단위로 그룹핑된 예를 설명하기 위한 도면이다.
도 32는 16x16 크기의 TU 내 전체 계수의 스캐닝 순서를 예시적으로 도시한 도면이다.
도 33은 TU 내 계수의 분포 특성, 효율적인 스캐닝 및 CG의 구성의 필요성을 설명하기 위한 도면이다.
도 34는 본 발명의 일 실시예에 따른 좌하단 대각 스캐닝 및/또는 그룹핑을 설명하기 위한 도면이다.
도 35는 32x32 TU의 부호화/복호화 영역을 예시적으로 설명하기 위한 도면이다.
도 36은 본 발명의 일 실시예에 따른 지그재그(Zigzag) 스캐닝 및/또는 그룹핑을 설명하기 위한 도면이다.
도 37은 본 발명의 일 실시예에 따른 바운더리 스캐닝 및/또는 그룹핑을 설명하기 위한 도면이다.
도 38은 32x32 TU의 부호화/복호화 영역을 예시적으로 설명하기 위한 도면이다.
도 39는 가로로 긴 직사각형 TU에 대한 스캐닝 및/또는 그룹핑을 예시적으로 설명하기 위한 도면이다.
도 40은 세로로 긴 직사각형 TU에 대한 스캐닝 및/또는 그룹핑을 예시적으로 설명하기 위한 도면이다.
도 41은 본 발명에 따른 스캐닝 및/또는 그룹핑 방법이 적용된 8x8 TU에서 현재 CG의 CSBF를 부호화/복호화할 때의 참조 CG를 설명하기 위한 예시도이다.
도 42는 본 발명에 따른 스캐닝 및/또는 그룹핑 방법을 적용하는 경우, TU 내에서의 계수의 위치에 따라 Sig_Coeff_Flag를 부호화/복호화하기 위한 컨텍스트 모델 참조 방법을 설명하기 위한 도면이다.
본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 기능을 지칭한다. 도면에서의 요소들의 형상 및 크기 등은 보다 명확한 설명을 위해 과장될 수 있다. 후술하는 예시적 실시예들에 대한 상세한 설명은, 특정 실시예를 예시로서 도시하는 첨부 도면을 참조한다. 이들 실시예는 당업자가 실시예를 실시할 수 있기에 충분하도록 상세히 설명된다. 다양한 실시예들은 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 여기에 기재되어 있는 특정 형상, 구조 및 특성은 일 실시예에 관련하여 본 발명의 정신 및 범위를 벗어나지 않으면서 다른 실시예로 구현될 수 있다. 또한, 각각의 개시된 실시예 내의 개별 구성요소의 위치 또는 배치는 실시예의 정신 및 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 취하려는 것이 아니며, 예시적 실시예들의 범위는, 적절하게 설명된다면, 그 청구항들이 주장하는 것과 균등한 모든 범위와 더불어 첨부된 청구항에 의해서만 한정된다.
본 발명에서 제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.
본 발명의 어떤 구성 요소가 다른 구성 요소에 “연결되어” 있다거나 “접속되어” 있다고 언급된 때에는, 그 다른 구성 요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있으나, 중간에 다른 구성 요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어"있다거나 "직접 접속되어"있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.
본 발명의 실시예에 나타나는 구성부들은 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시되는 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 포함한 것으로 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수 개의 구성부로 나뉘어져 기능을 수행할 수 있고 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.
본 발명에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 발명에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다. 즉, 본 발명에서 특정 구성을 “포함”한다고 기술하는 내용은 해당 구성 이외의 구성을 배제하는 것이 아니며, 추가적인 구성이 본 발명의 실시 또는 본 발명의 기술적 사상의 범위에 포함될 수 있음을 의미한다.
본 발명의 일부의 구성 요소는 본 발명에서 본질적인 기능을 수행하는 필수적인 구성 요소는 아니고 단지 성능을 향상시키기 위한 선택적 구성 요소일 수 있다. 본 발명은 단지 성능 향상을 위해 사용되는 구성 요소를 제외한 본 발명의 본질을 구현하는데 필수적인 구성부만을 포함하여 구현될 수 있고, 단지 성능 향상을 위해 사용되는 선택적 구성 요소를 제외한 필수 구성 요소만을 포함한 구조도 본 발명의 권리범위에 포함된다.
이하, 도면을 참조하여 본 발명의 실시 형태에 대하여 구체적으로 설명한다. 본 명세서의 실시예를 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 명세서의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략하고, 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.
또한, 이하에서 영상은 동영상(video)을 구성하는 하나의 픽처를 의미할 수 있으며, 동영상 자체를 나타낼 수도 있다. 예를 들면, "영상의 부호화 및/또는 복호화"는 "비디오의 부호화 및/또는 복호화"를 의미할 수 있으며, "비디오를 구성하는 영상들 중 하나의 영상의 부호화 및/또는 복호화"를 의미할 수도 있다. 여기서, 픽처는 영상과 동일한 의미를 가질 수 있다.
용어 설명
부호화기(Encoder): 부호화를 수행하는 장치를 의미할 수 있다.
복호화기(Decoder): 복호화를 수행하는 장치를 의미할 수 있다.
파싱(Parsing): 엔트로피 복호화하여 구문 요소(Syntax Element)의 값을 결정하는 것을 의미하거나, 엔트로피 복호화 자체를 의미할 수 있다.
블록(Block): 샘플(Sample)의 MxN 배열이며, 여기서 M과 N은 양의 정수 값을 의미하며, 블록은 흔히 2차원 형태의 샘플 배열을 의미할 수 있다.
샘플(Sample): 블록을 구성하는 기본 단위이며, 비트 깊이 (bit depth, Bd)에 따라 0부터 2Bd - 1까지의 값을 표현 할 수 있다. 본 발명에서 화소 및 픽셀은 샘플과 같은 의미로 사용될 수 있다.
유닛(Unit): 영상 부호화 및 복호화의 단위를 의미할 수 있다. 영상의 부호화 및 복호화에 있어서, 유닛은 하나의 영상의 분할에 의해 생성된 영역일 수 있다. 또한, 유닛은 하나의 영상을 세분화 된 유닛으로 분할하여 부호화 혹은 복호화 할 때 그 분할된 단위를 의미할 수 있다. 영상의 부호화 및 복호화에 있어서, 유닛 별로 기정의된 처리가 수행될 수 있다. 하나의 유닛은 유닛에 비해 더 작은 크기를 갖는 하위 유닛으로 더 분할될 수 있다. 기능에 따라서, 유닛은 블록(Block), 매크로블록(Macroblock), 부호화 트리 유닛(Coding Tree Unit), 부호화 트리 블록(Coding Tree Block), 부호화 유닛(Coding Unit), 부호화 블록(Coding Block), 예측 유닛(Prediction Unit), 예측 블록(Prediction Block), 변환 유닛(Transform Unit), 변환 블록(Transform Block) 등을 의미할 수 있다. 또한, 유닛은 블록과 구분하여 지칭하기 위해 휘도(Luma) 성분 블록과 그에 대응하는 색차(Chroma) 성분 블록 그리고 각 블록에 대한 구문 요소를 포함한 것을 의미할 수 있다. 유닛은 다양한 크기와 형태를 가질 수 있으며, 특히 유닛의 형태는 직사각형뿐만 아니라 정사각형, 사다리꼴, 삼각형, 오각형 등 2차원으로 표현할 수 있는 기하학적 도형을 포함할 수 있다. 또한, 유닛 정보에는 부호화 유닛, 예측 유닛, 변환 유닛 등을 가리키는 유닛의 타입, 유닛의 크기, 유닛의 깊이, 유닛의 부호화 및 복호화 순서 등 중 적어도 하나 이상을 포함할 수 있다.
복원된 주변 유닛(Reconstructed Neighbor Unit): 부호화/복호화 대상 유닛 주변에 공간적(Spatial)/시간적(Temporal)으로 이미 부호화 혹은 복호화되어 복원된 유닛을 의미할 수 있다. 이때, 복원된 주변 유닛은 복원된 주변 블록을 의미할 수 있다.
주변 블록(Neighbor block): 부호화/복호화 대상 블록에 인접한 블록을 의미할 수 있다. 부호화/복호화 대상 블록에 인접한 블록은 부호화/복호화 대상 블록에 경계가 맞닿은 블록을 의미할 수 있다. 주변 블록은 부호화/복호화 대상 블록의 인접한 꼭지점에 위치한 블록을 의미할 수 있다. 주변 블록은 복원된 주변 블록을 의미할 수도 있다.
유닛 깊이(Depth): 유닛이 분할된 정도를 의미하며, 트리 구조(Tree Structure)에서 루트 노드(Root Node)는 깊이가 가장 얕고, 리프 노드(Leaf Node)는 깊이가 가장 깊다고 할 수 있다.
심볼(Symbol): 부호화/복호화 대상 유닛 구문 요소 및 부호화 파라미터(coding parameter), 변환 계수(Transform Coefficient)의 값 등을 의미할 수 있다.
파라미터 세트(Parameter Set): 비트스트림 내의 구조 중 헤더 정보에 해당할 수 있으며, 비디오 파라미터 세트(video parameter set), 시퀀스 파라미터 세트(sequence parameter set), 픽처 파라미터 세트(picture parameter set), 적응 파라미터 세트(adaptation parameter set) 중 적어도 하나 이상이 파라미터 세트에 포함될 수 있다. 또한, 파라미터 세트에는 슬라이스(slice) 헤더 및 타일(tile) 헤더 정보를 포함한 의미를 가질 수 있다.
비트스트림(Bitstream): 부호화된 영상 정보를 포함하는 비트의 열을 의미할 수 있다.
예측 유닛(Prediction Unit): 화면 간 예측 또는 화면 내 예측 및 그에 대한 보상을 수행할 때의 기본 유닛이며, 하나의 예측 유닛은 크기가 작은 복수의 파티션(Partition)으로 분할 될 수도 있다. 이 경우, 복수의 파티션 각각이 상기 예측 및 보상 수행 시의 기본 유닛이 되며, 예측 유닛이 분할된 파티션도 예측 유닛이라고 할 수 있다. 예측 유닛은 다양한 크기와 형태를 가질 수 있으며, 특히 예측 유닛의 형태는 직사각형뿐만 아니라 정사각형, 사다리꼴, 삼각형, 오각형 등 2차원으로 표현할 수 있는 기하학적 도형을 포함할 수 있다.
예측 유닛 파티션(Prediction Unit Partition): 예측 유닛이 분할된 형태를 의미할 수 있다.
참조 영상 리스트(Reference Picture List): 화면 간 예측 혹은 움직임 보상에 사용되는 하나 이상의 참조 영상이 포함된 리스트를 의미할 수 있다. 참조 영상 리스트의 종류는 LC (List Combined), L0 (List 0), L1 (List 1), L2 (List 2), L3 (List 3) 등이 있을 수 있으며, 화면 간 예측에는 1개 이상의 참조 영상 리스트가 사용될 수 있다.
화면 간 예측 지시자(Inter Prediction Indicator): 화면 간 예측 시에 부호화/복호화 대상 블록의 화면 간 예측 방향(단방향 예측, 쌍방향 예측 등)을 의미할 수 있으며, 부호화/복호화 대상 블록이 예측 블록을 생성할 때 사용하는 참조 영상 수를 의미할 수 있으며, 부호화/복호화 대상 블록이 화면 간 예측 혹은 움직임 보상을 수행할 때 사용하는 예측 블록의 수를 의미할 수 있다.
참조 영상 색인(Reference Picture Index): 참조 영상 리스트에서 특정 참조 영상에 대한 색인을 의미할 수 있다.
참조 영상(Reference Picture): 화면 간 예측 혹은 움직임 보상을 위해서 특정 유닛이 참조하는 영상을 의미할 수 있으며, 참조 영상을 참조 픽처라고도 지칭할 수 있다.
움직임 벡터(Motion Vector): 화면 간 예측 혹은 움직임 보상에 사용되는 2차원 벡터이며, 부호화/복호화 대상 영상과 참조 영상 사이의 오프셋을 의미할 수 있다. 예를 들어, (mvX, mvY)는 움직임 벡터를 나타낼 수 있으며, mvX는 가로(horizontal) 성분, mvY는 세로(vertical) 성분을 나타낼 수 있다.
움직임 벡터 후보(Motion Vector Candidate): 움직임 벡터를 예측할 때 예측 후보가 되는 유닛 혹은 그 유닛의 움직임 벡터를 의미할 수 있다.
움직임 벡터 후보 리스트(Motion Vector Candidate List): 움직임 벡터 후보를 이용하여 구성된 리스트를 의미할 수 있다.
움직임 벡터 후보 색인(Motion Vector Candidate Index): 움직임 벡터 후보 리스트 내의 움직임 벡터 후보를 가리키는 지시자, 움직임 벡터 예측기(Motion Vector Predictor)의 색인(index)이라고도 할 수 있다.
움직임 정보(Motion Information): 움직임 벡터, 참조 영상 색인, 화면 간 예측 지시자(Inter Prediction Indicator) 뿐만 아니라 참조 영상 리스트 정보, 참조 영상, 움직임 벡터 후보, 움직임 벡터 후보 색인 등 중 적어도 하나 이상을 포함하는 정보를 의미할 수 있다.
머지 후보 리스트(Merge Candidate List): 머지 후보를 이용하여 구성된 리스트를 의미할 수 있다.
머지 후보(Merge Candidate): 공간적 머지 후보, 시간적 머지 후보, 조합된 머지 후보, 조합된 양예측 머지 후보, 제로 머지 후보 등을 포함할 수 있으며, 머지 후보는 예측 종류 정보(prediction type information), 각 리스트에 대한 참조 영상 색인(reference picture index), 움직임 벡터(motion vector) 등의 움직임 정보를 포함할 수 있다.
머지 색인(Merge Index): 머지 후보 리스트 내 머지 후보를 지시하는 정보를 의미할 수 있다. 또한, 머지 색인은 공간적/시간적으로 현재 블록과 인접하게 복원된 블록들 중 머지 후보를 유도한 블록을 지시할 수 있다. 또한, 머지 색인은 머지 후보가 가지는 움직임 정보 중 적어도 하나 이상을 지시할 수 있다.
변환 유닛(Transform Unit): 변환, 역변환, 양자화, 역양자화, 변환 계수 부호화/복호화와 같이 잔여 신호(residual signal) 부호화/복호화를 수행할 때의 기본 유닛을 의미할 수 있으며, 하나의 변환 유닛은 분할되어 크기가 작은 복수의 변환 유닛으로 분할될 수 있다. 변환 유닛은 다양한 크기와 형태를 가질 수 있으며, 특히 변환 유닛의 형태는 직사각형뿐만 아니라 정사각형, 사다리꼴, 삼각형, 오각형 등 2차원으로 표현할 수 있는 기하학적 도형을 포함할 수 있다.
스케일링(Scaling): 변환 계수 레벨에 인수를 곱하는 과정을 의미할 수 있으며, 결과로 변환 계수를 생성할 수 있다. 스케일링을 역양자화(dequantization)라고도 부를 수 있다.
양자화 매개변수(Quantization Parameter): 양자화 및 역양자화에서 변환 계수 레벨(transform coefficient level)을 스케일링(scaling)할 때 사용하는 값을 의미할 수 있다. 이때, 양자화 매개변수는 양자화 스텝 크기(step size)에 매핑된 값일 수 있다.
잔여 양자화 매개변수(Delta Quantization Parameter): 예측된 양자화 매개변수와 부호화/복호화 대상 유닛의 양자화 매개변수의 차분된 값을 의미할 수 있다.
스캔(Scan): 블록 혹은 행렬 내 계수의 순서를 정렬하는 방법을 의미할 수 있으며, 예를 들어 2차원 배열을 1차원 배열 형태로 정렬하는 것을 스캔이라고 하며, 1차원 배열을 2차원 배열 형태로 정렬하는 것도 스캔 혹은 역 스캔(Inverse Scan)이라고 부를 수 있다.
변환 계수(Transform Coefficient): 변환을 수행하고 나서 생성된 계수 값, 본 발명에서는 변환 계수에 양자화를 적용한 양자화된 변환 계수 레벨(transform coefficient level)도 변환 계수의 의미에 포함될 수 있다.
넌제로 변환 계수(Non-zero Transform Coefficient): 변환 계수 값의 크기가 0이 아닌 변환 계수 혹은 값의 크기가 0이 아닌 변환 계수 레벨을 의미할 수 있다.
양자화 행렬(Quantization Matrix): 영상의 주관적 화질 혹은 객관적 화질을 향상시키기 위해서 양자화 혹은 역양자화 과정에서 이용하는 행렬을 의미할 수 있다. 양자화 행렬을 스케일링 리스트(scaling list)라고도 부를 수 있다.
양자화 행렬 계수(Quantization Matrix Coefficient): 양자화 행렬 내의 각 원소(element)를 의미할 수 있다. 양자화 행렬 계수를 행렬 계수(matrix coefficient)라고도 할 수 있다.
기본 행렬(Default Matrix): 부호화기와 복호화기에서 미리 정의되어 있는 소정의 양자화 행렬을 의미할 수 있다.
비 기본 행렬(Non-default Matrix): 부호화기와 복호화기에서 미리 정의되지 않고, 사용자에 의해서 전송/수신되는 양자화 행렬을 의미할 수 있다.
부호화 트리 유닛(Coding Tree Unit): 하나의 휘도 성분(Y) 부호화 트리 블록과 관련된 두 색차 성분(Cb, Cr) 부호화 트리 블록들로 구성될 수 있다. 각 부호화 트리 유닛은 부호화 유닛, 예측 유닛, 변환 유닛 등의 하위 유닛을 구성하기 위하여 쿼드트리(quad tree), 이진트리(binary tree) 등 하나 이상의 분할 방식을 이용하여 분할될 수 있다. 입력 영상의 분할 처럼 영상의 복/부호화 과정에서 처리 단위가 되는 픽셀 블록을 지칭하기 위한 용어로 사용될 수 있다.
부호화 트리 블록(Coding Tree Block): Y 부호화 트리 블록, Cb 부호화 트리 블록, Cr 부호화 트리 블록 중 어느 하나를 지칭하기 위한 용어로 사용될 수 있다.
도 1은 본 발명이 적용되는 부호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.
부호화 장치(100)는 비디오 부호화 장치 또는 영상 부호화 장치일 수 있다. 비디오는 하나 이상의 영상들을 포함할 수 있다. 부호화 장치(100)는 비디오의 하나 이상의 영상들을 시간에 따라 순차적으로 부호화할 수 있다.
도 1을 참조하면, 부호화 장치(100)는 움직임 예측부(111), 움직임 보상부(112), 인트라 예측부(120), 스위치(115), 감산기(125), 변환부(130), 양자화부(140), 엔트로피 부호화부(150), 역양자화부(160), 역변환부(170), 가산기(175), 필터부(180) 및 참조 픽처 버퍼(190)를 포함할 수 있다.
부호화 장치(100)는 입력 영상에 대해 인트라 모드 및/또는 인터 모드로 부호화를 수행할 수 있다. 또한, 부호화 장치(100)는 입력 영상에 대한 부호화를 통해 비트스트림을 생성할 수 있고, 생성된 비트스트림을 출력할 수 있다. 예측 모드로 인트라 모드가 사용되는 경우 스위치(115)는 인트라로 전환될 수 있고, 예측 모드로 인터 모드가 사용되는 경우 스위치(115)는 인터로 전환될 수 있다. 여기서 인트라 모드는 화면 내 예측 모드를 의미할 수 있으며, 인터 모드는 화면 간 예측 모드를 의미할 수 있다. 부호화 장치(100)는 입력 영상의 입력 블록에 대한 예측 블록을 생성할 수 있다. 또한, 부호화 장치(100)는 예측 블록이 생성된 후, 입력 블록 및 예측 블록의 차분(residual)을 부호화할 수 있다. 입력 영상은 현재 부호화의 대상인 현재 영상으로 칭해질 수 있다. 입력 블록은 현재 부호화의 대상인 현재 블록 혹은 부호화 대상 블록으로 칭해질 수 있다.
예측 모드가 인트라 모드인 경우, 인트라 예측부(120)는 현재 블록의 주변에 이미 부호화된 블록의 픽셀 값을 참조 화소로서 이용할 수 있다. 인트라 예측부(120)는 참조 화소를 이용하여 공간적 예측을 수행할 수 있고, 공간적 예측을 통해 입력 블록에 대한 예측 샘플들을 생성할 수 있다. 여기서 인트라 예측은 화면 내 예측을 의미할 수 있다.
예측 모드가 인터 모드인 경우, 움직임 예측부(111)는, 움직임 예측 과정에서 참조 영상으로부터 입력 블록과 가장 매치가 잘 되는 영역을 검색할 수 있고, 검색된 영역을 이용하여 움직임 벡터를 도출할 수 있다. 참조 영상은 참조 픽처 버퍼(190)에 저장될 수 있다.
움직임 보상부(112)는 움직임 벡터를 이용하는 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다. 여기서, 움직임 벡터는 인터 예측에 사용되는 2차원 벡터일 수 있다. 또한 움직임 벡터는 현재 영상 및 참조 영상 간의 오프셋(offset)을 나타낼 수 있다. 여기서 인터 예측은 화면 간 예측을 의미할 수 있다.
상기 움직임 예측부(111)과 움직임 보상부(112)는 움직임 벡터의 값이 정수 값을 가지지 않을 경우에 참조 영상 내의 일부 영역에 대해 보간 필터(Interpolation Filter)를 적용하여 예측 블록을 생성할 수 있다. 화면 간 예측 혹은 움직임 보상을 수행하기 위해 부호화 유닛을 기준으로 해당 부호화 유닛에 포함된 예측 유닛의 움직임 예측 및 움직임 보상 방법이 스킵 모드(Skip Mode), 머지 모드(Merge mode), AMVP 모드(AMVP Mode), 현재 픽처 참조 모드 중 어떠한 방법인지 여부를 판단할 수 있고, 각 모드에 따라 화면 간 예측 혹은 움직임 보상을 수행할 수 있다. 여기서, 현재 픽처 참조 모드는 부호화 대상 블록이 속한 현재 픽처 내의 기-복원된 영역을 이용한 예측 모드를 의미할 수 있다. 상기 기-복원된 영역을 특정하기 위해 현재 픽처 참조 모드를 위한 움직임 벡터가 정의될 수 있다. 부호화 대상 블록이 현재 픽처 참조 모드로 부호화되는지 여부는 부호화 대상 블록의 참조 영상 색인을 이용하여 부호화될 수 있다.
감산기(125)는 입력 블록 및 예측 블록의 차분을 사용하여 잔여 블록(residual block)을 생성할 수 있다. 잔여 블록은 잔여 신호로 칭해질 수도 있다.
변환부(130)는 잔여 블록에 대해 변환(transform)을 수행하여 변환 계수(transform coefficient)를 생성할 수 있고, 변환 계수를 출력할 수 있다. 여기서, 변환 계수는 잔여 블록에 대한 변환을 수행함으로써 생성된 계수 값일 수 있다. 변환 생략(transform skip) 모드가 적용되는 경우, 변환부(130)는 잔여 블록에 대한 변환을 생략할 수도 있다.
변환 계수에 양자화를 적용함으로써 양자화된 변환 계수 레벨(transform coefficient level)이 생성될 수 있다. 이하, 실시예들에서는 양자화된 변환 계수 레벨도 변환 계수로 칭해질 수 있다.
양자화부(140)는 변환 계수를 양자화 매개변수에 따라 양자화함으로써 양자화된 변환 계수 레벨(transform coefficient level)을 생성할 수 있고, 양자화된 변환 계수 레벨을 출력할 수 있다. 이때, 양자화부(140)에서는 양자화 행렬을 사용하여 변환 계수를 양자화할 수 있다.
엔트로피 부호화부(150)는, 양자화부(140)에서 산출된 값들 또는 부호화 과정에서 산출된 부호화 파라미터(Coding Parameter) 값들 등에 대하여 확률 분포에 따른 엔트로피 부호화를 수행함으로써 비트스트림(bitstream)을 생성할 수 있고, 비트스트림을 출력할 수 있다. 엔트로피 부호화부(150)는 영상의 픽셀의 정보 외에 영상의 복호화를 위한 정보에 대한 엔트로피 부호화를 수행할 수 있다. 예를 들면, 영상의 복호화를 위한 정보는 구문 요소(syntax element) 등을 포함할 수 있다.
엔트로피 부호화가 적용되는 경우, 높은 발생 확률을 갖는 심볼(symbol)에 적은 수의 비트가 할당되고 낮은 발생 확률을 갖는 심볼에 많은 수의 비트가 할당되어 심볼이 표현됨으로써, 부호화 대상 심볼들에 대한 비트열의 크기가 감소될 수 있다. 따라서 엔트로피 부호화를 통해서 영상 부호화의 압축 효율이 높아질 수 있다. 엔트로피 부호화부(150)는 엔트로피 부호화를 위해 지수 골롬(exponential golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 부호화 방법을 사용할 수 있다. 예를 들면, 엔트로피 부호화부(150)는 가변 길이 부호화(Variable Lenghth Coding/Code; VLC) 테이블을 이용하여 엔트로피 부호화를 수행할 수 있다. 또한 엔트로피 부호화부(150)는 대상 심볼의 이진화(binarization) 방법 및 대상 심볼/빈(bin)의 확률 모델(probability model)을 도출한 후, 도출된 이진화 방법 또는 확률 모델을 사용하여 산술 부호화를 수행할 수도 있다.
엔트로피 부호화부(150)는 변환 계수 레벨을 부호화하기 위해 변환 계수 스캐닝(Transform Coefficient Scanning) 방법을 통해 2차원의 블록 형태 계수를 1차원의 벡터 형태로 변경할 수 있다. 예를 들어, 업라이트(up right) 스캐닝을 이용하여 블록의 계수를 스캔함으로써 1차원 벡터 형태로 변경시킬 수 있다. 변환 유닛의 크기 및 화면 내 예측 모드에 따라 업라이트 스캔 대신 2차원의 블록 형태 계수를 열 방향으로 스캔하는 수직 스캔, 2차원의 블록 형태 계수를 행 방향으로 스캔하는 수평 스캔이 사용될 수도 있다. 즉, 변환 유닛의 크기 및 화면 내 예측 모드에 따라 업라이트 스캔, 수직 방향 스캔 및 수평 방향 스캔 중 어떠한 스캔 방법이 사용될지 여부를 결정할 수 있다.
부호화 파라미터(Coding Parameter)는 구문 요소와 같이 부호화기에서 부호화되어 복호화기로 전송되는 정보뿐만 아니라, 부호화 혹은 복호화 과정에서 유도되는 정보를 포함할 수 있으며, 영상을 부호화하거나 복호화할 때 필요한 정보를 의미할 수 있다. 예를 들어, 블록 크기, 블록 깊이, 블록 분할 정보, 유닛 크기, 유닛 깊이, 유닛 분할 정보, 쿼드트리 형태의 분할 플래그, 이진트리 형태의 분할 플래그, 이진트리 형태의 분할 방향, 화면 내 예측 모드, 화면 내 예측 방향, 참조 샘플 필터링 방법, 예측 블록 경계 필터링 방법, 필터 탭, 필터 계수, 화면 간 예측 모드, 움직임 정보, 움직임 벡터, 참조 영상 색인, 화면 간 예측 방향, 화면 간 예측 지시자, 참조 영상 리스트, 움직임 벡터 예측기, 움직임 벡터 후보 리스트, 움직임 병합 모드(motion merge mode) 사용 여부, 움직임 병합 후보, 움직임 병합 후보 리스트, 스킵(skip) 모드 사용 여부, 보간 필터 종류, 움직임 벡터 크기, 움직임 벡터 표현 정확도, 변환 종류, 변환 크기, 추가(2차) 변환 사용 여부 정보, 잔여 신호 유무 정보, 부호화 블록 패턴(Coded Block Pattern), 부호화 블록 플래그(Coded Block Flag), 양자화 매개변수, 양자화 행렬, 루프 내 필터 정보, 루프 내 필터 적용 여부 정보, 루프 내 필터 계수, 이진화/역이진화 방법, 문맥 모델, 문맥 빈, 바이패스 빈, 변환 계수, 변환 계수 레벨, 변환 계수 레벨 스캐닝 방법, 영상 디스플레이/출력 순서, 슬라이스 식별 정보, 슬라이스 타입, 슬라이스 분할 정보, 타일 식별 정보, 타일 타입, 타일 분할 정보, 픽처 타입, 비트 심도, 휘도 신호 혹은 색차 신호에 대한 정보 중 적어도 하나 이상의 값 또는 조합된 형태가 부호화 파라미터에 포함될 수 있다.
잔여 신호는 원 신호 및 예측 신호 간의 차이(difference)를 의미할 수 있다. 또는, 잔여 신호는 원신호 및 예측 신호 간의 차이를 변환(transform) 함으로써 생성된 신호일 수 있다. 또는, 잔여 신호는 원 신호 및 예측 신호 간의 차이를 변환 및 양자화함으로써 생성된 신호일 수 있다. 잔여 블록은 블록 단위의 잔여 신호일 수 있다.
부호화 장치(100)가 인터 예측을 통한 부호화를 수행할 경우, 부호화된 현재 영상은 이후에 처리되는 다른 영상(들)에 대하여 참조 영상으로서 사용될 수 있다. 따라서, 부호화 장치(100)는 부호화된 현재 영상을 다시 복호화할 수 있고, 복호화된 영상을 참조 영상으로 저장할 수 있다. 복호화를 위해 부호화된 현재 영상에 대한 역양자화 및 역변환이 처리될 수 있다.
양자화된 계수는 역양자화부(160)에서 역양자화(dequantization)될 수 있고. 역변환부(170)에서 역변환(inverse transform)될 수 있다. 역양자화 및 역변환된 계수는 가산기(175)를 통해 예측 블록과 합해질 수 있다, 역양자화 및 역변환된 계수 및 예측 블록을 합함으로써 복원 블록(reconstructed block) 이 생성될 수 있다.
복원 블록은 필터부(180)를 거칠 수 있다. 필터부(180)는 디블록킹 필터(deblocking filter), 샘플 적응적 오프셋(Sample Adaptive Offset; SAO), 적응적 루프 필터(Adaptive Loop Filter; ALF) 중 적어도 하나 이상을 복원 블록 또는 복원 영상에 적용할 수 있다. 필터부(180)는 인루프 필터(in-loop filter)로 칭해질 수도 있다.
디블록킹 필터는 블록들 간의 경계에 생긴 블록 왜곡을 제거할 수 있다. 디블록킹 필터를 수행할지 여부를 판단하기 위해 블록에 포함된 몇 개의 열 또는 행에 포함된 픽셀을 기초로 현재 블록에 디블록킹 필터 적용할지 여부를 판단할 수 있다. 블록에 디블록킹 필터를 적용하는 경우 필요한 디블록킹 필터링 강도에 따라 강한 필터(Strong Filter) 또는 약한 필터(Weak Filter)를 적용할 수 있다. 또한 디블록킹 필터를 적용함에 있어 수직 필터링 및 수평 필터링 수행시 수평 방향 필터링 및 수직 방향 필터링이 병행 처리되도록 할 수 있다.
샘플 적응적 오프셋은 부호화 에러를 보상하기 위해 픽셀 값에 적정 오프셋(offset) 값을 더할 수 있다. 샘플 적응적 오프셋은 디블록킹을 수행한 영상에 대해 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽처에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다.
적응적 루프 필터는 복원 영상 및 원래의 영상을 비교한 값에 기반하여 필터링을 수행할 수 있다. 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. 적응적 루프 필터를 적용할지 여부에 관련된 정보는 휘도 신호는 부호화 유닛(Coding Unit, CU) 별로 전송될 수 있고, 각각의 블록에 따라 적용될 적응적 루프 필터의 모양 및 필터 계수는 달라질 수 있다. 또한, 적용 대상 블록의 특성에 상관없이 동일한 형태(고정된 형태)의 적응적 루프 필터가 적용될 수도 있다.
필터부(180)를 거친 복원 블록은 참조 픽처 버퍼(190)에 저장될 수 있다. 
도 2는 본 발명이 적용되는 복호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.
복호화 장치(200)는 비디오 복호화 장치 또는 영상 복호화 장치일 수 있다.
도 2를 참조하면, 복호화 장치(200)는 엔트로피 복호화부(210), 역양자화부(220), 역변환부(230), 인트라 예측부(240), 움직임 보상부(250), 가산기(255), 필터부(260) 및 참조 픽처 버퍼(270)를 포함할 수 있다.
복호화 장치(200)는 부호화 장치(100)에서 출력된 비트스트림을 수신할 수 있다. 복호화 장치(200)는 비트스트림에 대하여 인트라 모드 또는 인터 모드로 복호화를 수행할 수 있다. 또한, 복호화 장치(200)는 복호화를 통해 복원 영상을 생성할 수 있고, 복원 영상을 출력할 수 있다.
복호화에 사용되는 예측 모드가 인트라 모드인 경우 스위치가 인트라로 전환될 수 있다. 복호화에 사용되는 예측 모드가 인터 모드인 경우 스위치가 인터로 전환될 수 있다.
복호화 장치(200)는 입력된 비트스트림으로부터 복원된 잔여 블록(reconstructed residual block)을 획득할 수 있고, 예측 블록을 생성할 수 있다. 복원된 잔여 블록 및 예측 블록이 획득되면, 복호화 장치(200)는 복원된 잔여 블록과 및 예측 블록을 더함으로써 복호화 대상 블록인 복원 블록을 생성할 수 있다. 복호화 대상 블록은 현재 블록으로 칭해질 수 있다.
엔트로피 복호화부(210)는 비트스트림에 대한 확률 분포에 따른 엔트로피 복호화를 수행함으로써 심볼들을 생성할 수 있다. 생성된 심볼들은 양자화된 변환 계수 레벨(transform coefficient level) 형태의 심볼을 포함할 수 있다. 여기에서, 엔트로피 복호화 방법은 상술된 엔트로피 부호화 방법과 유사할 수 있다. 예를 들면, 엔트로피 복호화 방법은 상술된 엔트로피 부호화 방법의 역과정일 수 있다.
엔트로피 복호화부(210)는 변환 계수 레벨을 복호화하기 위해 변환 계수 스캐닝(Transform Coefficient Scanning) 방법을 통해 1차원의 벡터 형태 계수를 2차원의 블록 형태로 변경할 수 있다. 예를 들어, 업라이트(up right) 스캐닝을 이용하여 블록의 계수를 스캔함으로써 2차원 블록 형태로 변경시킬 수 있다. 변환 유닛의 크기 및 화면 내 예측 모드에 따라 업라이트 스캔 대신 수직 스캔, 수평 스캔이 사용될 수도 있다. 즉, 변환 유닛의 크기 및 화면 내 예측 모드에 따라 업라이트 스캔, 수직 방향 스캔 및 수평 방향 스캔 중 어떠한 스캔 방법이 사용될지 여부를 결정할 수 있다.
양자화된 변환 계수 레벨은 역양자화부(220)에서 역양자화될 수 있고, 역변환부(230)에서 역변환될 수 있다. 양자화된 변환 계수 레벨이 역양자화 및 역변환 된 결과로서, 복원된 잔여 블록이 생성될 수 있다. 이때, 역양자화부(220)는 양자화된 변환 계수 레벨에 양자화 행렬을 적용할 수 있다.
인트라 모드가 사용되는 경우, 인트라 예측부(240)는 복호화 대상 블록 주변의 이미 복호화된 블록의 픽셀 값을 이용하는 공간적 예측을 수행함으로써 예측 블록을 생성할 수 있다.
인터 모드가 사용되는 경우, 움직임 보상부(250)는 움직임 벡터 및 참조 픽처 버퍼(270)에 저장되어 있는 참조 영상을 이용하는 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다. 상기 움직임 보상부(250)는 움직임 벡터의 값이 정수 값을 가지지 않을 경우에 참조 영상 내의 일부 영역에 대해 보간 필터(Interpolation Filter)를 적용하여 예측 블록을 생성할 수 있다. 움직임 보상을 수행하기 위해 부호화 유닛을 기준으로 해당 부호화 유닛에 포함된 예측 유닛의 움직임 보상 방법이 스킵 모드(Skip Mode), 머지 모드(Merge mode), AMVP 모드(AMVP Mode), 현재 픽처 참조 모드 중 어떠한 방법인지 여부를 판단할 수 있고, 각 모드에 따라 움직임 보상을 수행할 수 있다. 여기서, 현재 픽처 참조 모드는 복호화 대상 블록이 속한 현재 픽처 내의 기-복원된 영역을 이용한 예측 모드를 의미할 수 있다. 상기 기-복원된 영역을 특정하기 위해 현재 픽처 참조 모드를 위한 움직임 벡터가 이용될 수 있다. 복호화 대상 블록이 현재 픽처 참조 모드로 부호화된 블록인지 여부를 나타내는 플래그 혹은 인덱스가 시그널링(signaling)될 수도 있고, 복호화 대상 블록의 참조 영상 색인을 통해 유추될 수도 있다. 현재 픽처 참조 모드를 현재 픽처는 복호화 대상 블록을 위한 참조 영상 리스트 내에서 고정된 위치(예를 들어, 참조 영상 색인이 0인 위치 또는 가장 마지막 위치)에 존재할 수 있다. 또는, 참조 영상 리스트 내에 가변적으로 위치할 수도 있으며, 이를 위해 현재 픽처의 위치를 나타내는 별도의 참조 영상 색인이 시그널링될 수도 있다. 여기서, 플래그 혹은 인덱스를 시그널링한다는 것은 인코더에서는 해당 플래그 혹은 인덱스를 엔트로피 부호화(Entropy Encoding)하여 비트스트림(Bitstream)에 포함하는 것을 의미할 수 있고, 디코더에서는 비트스트림으로부터 해당 플래그 혹은 인덱스를 엔트로피 복호화(Entropy Decoding)하는 것을 의미할 수 있다.
복원된 잔여 블록 및 예측 블록은 가산기(255)를 통해 더해질 수 있다. 복원된 잔여 블록 및 예측 블록이 더해짐에 따라 생성된 블록은 필터부(260)를 거칠 수 있다. 필터부(260)는 디블록킹 필터, 샘플 적응적 오프셋 및 적응적 루프 필터 중 적어도 하나 이상을 복원 블록 또는 복원 영상에 적용할 수 있다. 필터부(260)는 복원 영상을 출력할 수 있다. 복원 영상은 참조 픽처 버퍼(270)에 저장되어 인터 예측에 사용될 수 있다.
도 3은 영상을 부호화 및 복호화할 때의 영상의 분할 구조를 개략적으로 나타내는 도면이다. 도 3은 하나의 유닛이 복수의 하위 유닛으로 분할되는 실시예를 개략적으로 나타낸다.
영상을 효율적으로 분할하기 위해, 부호화 및 복호화에 있어서, 부호화 유닛(Coding Unit; CU)이 사용될 수 있다. 여기서 부호화 유닛은 코딩 유닛을 의미할 수 있다. 유닛은 1) 구문 요소(syntax element) 및 2) 영상 샘플들을 포함하는 블록을 합쳐서 지칭하는 용어일 수 있다. 예를 들면, "유닛의 분할"은 "유닛에 해당하는 블록의 분할"을 의미할 수 있다. 블록 분할 정보에는 유닛의 깊이(depth)에 관한 정보가 포함될 수 있다. 깊이 정보는 유닛이 분할되는 회수 및/또는 정도를 나타낼 수 있다.
도 3을 참조하면, 영상(300)은 최대 부호화 유닛(Largest Coding Unit; LCU) 단위로 순차적으로 분할되고, LCU 단위로 분할 구조가 결정된다. 여기서, LCU는 부호화 트리 유닛(Coding Tree Unit; CTU)과 동일한 의미로 사용될 수 있다. 하나의 유닛은 트리 구조(tree structure)를 기초로 깊이 정보(depth)를 가지고 계층적으로 분할될 수 있다. 각각의 분할된 하위 유닛은 깊이 정보를 가질 수 있다. 상기 깊이 정보는 유닛이 분할된 회수 및/또는 정도를 나타내므로, 상기 하위 유닛의 크기에 관한 정보를 포함할 수도 있다.
분할 구조는 LCU(310) 내에서의 부호화 유닛(Coding Unit; CU)의 분포를 의미할 수 있다. CU는 영상을 효율적으로 부호화/복호화하기 위한 유닛일 수 있다. 이러한 분포는 하나의 CU를 복수(2, 4, 8, 16 등을 포함하는 2 이상의 양의 정수)의 CU들로 분할할지 여부에 따라 결정할 수 있다. 분할에 의해 생성된 CU의 가로 크기 및 세로 크기는 각각 분할 전의 CU의 가로 크기의 절반 및 세로 크기의 절반이거나, 분할된 개수에 따라 분할 전의 CU의 가로 크기보다 작은 크기 및 세로 크기보다 작은 크기를 가질 수 있다. 분할된 CU는 동일한 방식으로 가로 크기 및 세로 크기가 감소된 복수의 CU로 재귀적으로 분할될 수 있다.
이때, CU의 분할은 기정의된 깊이까지 재귀적으로 이루어질 수 있다. 깊이 정보는 CU의 크기를 나타내는 정보일 수 있고, 각 CU마다 저장될 수 있다. 예컨대, LCU의 깊이는 0일 수 있고, 최소 부호화 유닛(Smallest Coding Unit; SCU)의 깊이는 기정의된 최대 깊이일 수 있다. 여기서, LCU는 상술된 것과 같이 최대의 부호화 유닛 크기를 가지는 부호화 유닛일 수 있고, SCU는 최소의 부호화 유닛 크기를 가지는 부호화 유닛일 수 있다.
LCU(310)로부터 분할이 시작되고, 분할에 의해 CU의 가로 크기 및 세로 크기가 줄어들 때마다 CU의 깊이는 1씩 증가한다. 각각의 깊이 별로, 분할되지 않는 CU는 2Nx2N 크기를 가질 수 있다. 분할되는 CU의 경우, 2Nx2N 크기의 CU가 NxN 크기를 가지는 복수의 CU들로 분할될 수 있다. N의 크기는 깊이가 1씩 증가할 때마다 절반으로 감소한다.
예를 들어, 하나의 부호화 유닛이 4개의 부호화 유닛으로 분할 될 경우, 분할된 4개의 부호화 유닛의 가로 및 세로 크기는 분할되기 전 부호화 유닛의 가로 및 세로 크기와 비교하여 각각 절반의 크기를 가질 수 있다. 일 예로, 32x32 크기의 부호화 유닛이 4개의 부호화 유닛으로 분할 될 경우, 분할된 4개의 부호화 유닛은 각각 16x16의 크기를 가질 수 있다. 하나의 부호화 유닛이 4개의 부호화 유닛으로 분할 될 경우, 부호화 유닛은 쿼드트리(quad-tree) 형태로 분할되었다고 할 수 있다.
예를 들어, 하나의 부호화 유닛이 2개의 부호화 유닛으로 분할 될 경우, 분할된 2개의 부호화 유닛의 가로 혹은 세로 크기는 분할되기 전 부호화 유닛의 가로 혹은 세로 크기와 비교하여 절반의 크기를 가질 수 있다. 일 예로, 32x32 크기의 부호화 유닛이 2개의 부호화 유닛으로 세로로 분할 될 경우, 분할된 2개의 부호화 유닛은 각각 16x32의 크기를 가질 수 있다. 일 예로, 32x32 크기의 부호화 유닛이 2개의 부호화 유닛으로 가로로 분할 될 경우, 분할된 2개의 부호화 유닛은 각각 32x16의 크기를 가질 수 있다. 하나의 부호화 유닛이 2개의 부호화 유닛으로 분할 될 경우, 부호화 유닛은 이진트리(binary-tree) 형태로 분할되었다고 할 수 있다.
도 3을 참조하면, 깊이가 0인 LCU는 64x64 화소들일 수 있다. 0은 최소 깊이일 수 있다. 깊이가 3인 SCU는 8x8 화소들일 수 있다. 3은 최대 깊이일 수 있다. 이때, LCU인 64x64 화소들의 CU는 깊이 0으로 표현될 수 있다. 32x32 화소들의 CU는 깊이 1로 표현될 수 있다. 16x16 화소들의 CU는 깊이 2로 표현될 수 있다. SCU인 8x8 화소들의 CU는 깊이 3으로 표현될 수 있다.
또한, CU가 분할되는지 여부에 대한 정보는 CU의 분할 정보를 통해 표현될 수 있다. 분할 정보는 1비트의 정보일 수 있다. SCU를 제외한 모든 CU는 분할 정보를 포함할 수 있다. 예를 들면, 분할 정보의 값이 0이면, CU가 분할되지 않을 수 있고, 분할 정보의 값이 1이면, CU가 분할될 수 있다.
도 4는 부호화 유닛(CU)이 포함할 수 있는 예측 유닛(PU)의 형태를 도시한 도면이다.
LCU로부터 분할된 CU 중 더 이상 분할되지 않는 CU는 하나 이상의 예측 유닛(Prediction Unit; PU)들로 나뉘어질 수 있다. 이러한 처리 또한 분할로 칭해질 수 있다.
PU는 예측에 대한 기본 단위일 수 있다. PU는 스킵(skip) 모드, 화면 간 모드 및 화면 내 모드 중 어느 하나로 부호화 및 복호화될 수 있다. PU는 모드에 따라서 다양한 형태로 분할될 수 있다.
또한, 부호화 유닛은 예측 유닛으로 분할되지 않고, 부호화 유닛과 예측 유닛은 동일한 크기를 가질 수 있다.
도 4에서 도시된 것과 같이, 스킵 모드에서는, CU 내에 분할이 존재하지 않을 수 있다. 스킵 모드에서는 분할 없이 CU와 동일한 크기를 갖는 2Nx2N 모드(410)가 지원될 수 있다.
화면 간 모드에서는, CU 내에서 8가지로 분할된 형태들이 지원될 수 있다. 예를 들면, 화면 간 모드에서는 2Nx2N 모드(410), 2NxN 모드(415), Nx2N 모드(420), NxN 모드(425), 2NxnU 모드(430), 2NxnD 모드(435), nLx2N 모드(440) 및 nRx2N 모드(445)가 지원될 수 있다. 화면 내 모드에서는, 2Nx2N 모드(410) 및 NxN 모드(425)가 지원될 수 있다.
하나의 부호화 유닛은 하나 이상의 예측 유닛으로 분할될 수 있고, 하나의 예측 유닛도 하나 이상의 예측 유닛으로 분할 될 수 있다.
예를 들어, 하나의 예측 유닛이 4개의 예측 유닛으로 분할 될 경우, 분할된 4개의 예측 유닛의 가로 및 세로 크기는 분할되기 전 예측 유닛의 가로 및 세로 크기와 비교하여 각각 절반의 크기를 가질 수 있다. 일 예로, 32x32 크기의 예측 유닛이 4개의 예측 유닛으로 분할 될 경우, 분할된 4개의 예측 유닛은 각각 16x16의 크기를 가질 수 있다. 하나의 예측 유닛이 4개의 예측 유닛으로 분할 될 경우, 예측 유닛은 쿼드트리(quad-tree) 형태로 분할되었다고 할 수 있다.
예를 들어, 하나의 예측 유닛이 2개의 예측 유닛으로 분할 될 경우, 분할된 2개의 예측 유닛의 가로 혹은 세로 크기는 분할되기 전 예측 유닛의 가로 혹은 세로 크기와 비교하여 절반의 크기를 가질 수 있다. 일 예로, 32x32 크기의 예측 유닛이 2개의 예측 유닛으로 세로로 분할 될 경우, 분할된 2개의 예측 유닛은 각각 16x32의 크기를 가질 수 있다. 일 예로, 32x32 크기의 예측 유닛이 2개의 예측 유닛으로 가로로 분할 될 경우, 분할된 2개의 예측 유닛은 각각 32x16의 크기를 가질 수 있다. 하나의 예측 유닛이 2개의 예측 유닛으로 분할 될 경우, 예측 유닛은 이진트리(binary-tree) 형태로 분할되었다고 할 수 있다.
도 5는 부호화 유닛(CU)이 포함할 수 있는 변환 유닛(TU)의 형태를 도시한 도면이다.
변환 유닛(Transform Unit; TU)은 CU 내에서 변환, 양자화, 역변환 및 역양자화의 과정을 위해 사용되는 기본 단위일 수 있다. TU는 정사각형 형태 또는 직사각형 등의 형태를 가질 수 있다. TU는 CU의 크기 및/또는 형태에 의존적으로(dependent) 결정될 수도 있다.
LCU로부터 분할된 CU 중, 더 이상 CU들로 분할되지 않는 CU는 하나 이상의 TU들로 분할될 수 있다. 이때, TU의 분할 구조는 쿼드트리(quad-tree) 구조일 수 있다. 예컨대, 도 5에서 도시된 것과 같이, 하나의 CU(510)가 쿼드트리 구조에 따라서 한 번 혹은 그 이상 분할될 수 있다. 하나의 CU가 한 번 이상으로 분할 될 경우 재귀적으로 분할된다고 할 수 있다. 분할을 통해, 하나의 CU(510)는 다양한 크기의 TU들로 구성될 수 있다. 또는, CU를 분할하는 수직 선(vertical line) 및/또는 수평 선(horizontal line)의 개수에 기초하여 하나 이상의 TU로 분할될 수도 있다. CU는 대칭형의 TU로 분할될 수도 있고, 비대칭형의 TU로 분할될 수도 있다. 비대칭형의 TU로의 분할을 위해 TU의 크기/형태에 관한 정보가 시그널링될 수도 있고, CU의 크기/형태에 관한 정보로부터 유도될 수도 있다.
또한, 부호화 유닛은 변환 유닛으로 분할되지 않고, 부호화 유닛과 변환 유닛은 동일한 크기를 가질 수 있다.
하나의 부호화 유닛은 하나 이상의 변환 유닛으로 분할될 수 있고, 하나의 변환 유닛도 하나 이상의 변환 유닛으로 분할 될 수 있다.
예를 들어, 하나의 변환 유닛이 4개의 변환 유닛으로 분할 될 경우, 분할된 4개의 변환 유닛의 가로 및 세로 크기는 분할되기 전 변환 유닛의 가로 및 세로 크기와 비교하여 각각 절반의 크기를 가질 수 있다. 일 예로, 32x32 크기의 변환 유닛이 4개의 변환 유닛으로 분할 될 경우, 분할된 4개의 변환 유닛은 각각 16x16의 크기를 가질 수 있다. 하나의 변환 유닛이 4개의 변환 유닛으로 분할 될 경우, 변환 유닛은 쿼드트리(quad-tree) 형태로 분할되었다고 할 수 있다.
예를 들어, 하나의 변환 유닛이 2개의 변환 유닛으로 분할 될 경우, 분할된 2개의 변환 유닛의 가로 혹은 세로 크기는 분할되기 전 변환 유닛의 가로 혹은 세로 크기와 비교하여 절반의 크기를 가질 수 있다. 일 예로, 32x32 크기의 변환 유닛이 2개의 변환 유닛으로 세로로 분할 될 경우, 분할된 2개의 변환 유닛은 각각 16x32의 크기를 가질 수 있다. 일 예로, 32x32 크기의 변환 유닛이 2개의 변환 유닛으로 가로로 분할 될 경우, 분할된 2개의 변환 유닛은 각각 32x16의 크기를 가질 수 있다. 하나의 변환 유닛이 2개의 변환 유닛으로 분할 될 경우, 변환 유닛은 이진트리(binary-tree) 형태로 분할되었다고 할 수 있다.
변환 수행 시 잔여 블록을 기-정의된 복수의 변환 방법 중 적어도 하나를 사용하여 변환 시킬 수 있다. 일예로, 기-정의된 복수의 변환 방법으로 DCT(Discrete Cosine Transform), DST(Discrete Sine Transform) 또는 KLT 등이 이용될 수 있다. 잔여 블록을 변환하기 위해 어떤 변환 방법이 적용되는지는 예측 유닛의 화면 간 예측 모드 정보, 화면 내 예측 모드 정보, 변환 블록의 크기/형태 중 적어도 하나를 이용하여 결정될 수도 있고, 일정한 경우 변환 방법을 지시하는 정보가 시그널링될 수도 있다.
도 6은 화면 내 예측 과정의 실시예를 설명하기 위한 도면이다.
화면내 예측 모드는 비방향성 모드 또는 방향성 모드일 수 있다. 비방향성 모드는 DC 모드 또는 Planar 모드일 수 있으며, 방향성 모드는 특정한 방향 또는 각도를 가지는 예측 모드로 개수는 하나 이상의 M개 일 수 있다. 상기 방향성 모드는 모드 번호, 모드 값, 모드 숫자, 모드 각도 중 적어도 하나로 표현될 수 있다.
화면내 예측 모드의 개수는 상기 비방향성 및 방향성 모드를 포함하는 하나 이상의 N개 일 수 있다.
화면내 예측 모드의 개수는 블록의 크기에 따라 다를 수 있다. 예를 들어, 블록의 크기가 4x4 또는 8x8 인 경우에는 67개, 16x16인 경우에는 35개, 32x32인 경우에는 19개, 64x64인 경우에는 7개 일 수 있다.
화면내 예측 모드의 개수는 블록의 크기에 관계없이 N개로 고정될 수 있다. 예를 들어, 블록의 크기에 관계없이 35개 또는 67개 중 적어도 하나로 고정될 수 있다.
화면내 예측 모드의 개수는 색 성분(color component)의 타입에 따라 상이할 수 있다. 예를 들면, 색 성분이 휘도(luma) 신호인지 아니면 색차(chroma) 신호인지에 따라 예측 모드의 개수가 다를 수 있다.
화면 내 부호화 및/또는 복호화는 주변의 복원된 블록에 포함되는 샘플 값 또는 부호화 파라미터를 이용하여 수행될 수 있다.
현재 블록을 화면 내 예측으로 부호화/복호화 하기 위해 주변의 복원된 블록에 포함되는 샘플들이 부호화/복호화 대상 블록의 참조 샘플로 이용 가능한지 여부를 검사하는 단계가 수행될 수 있다. 부호화/복호화 대상 블록의 참조 샘플로 이용할 수 없는 샘플들이 존재할 경우, 주변의 복원된 블록에 포함된 샘플들 중 적어도 하나 이상을 이용하여 참조 샘플로 이용할 수 없는 샘플들에 샘플 값을 복사 및/또는 보간(interpolation)하여 부호화/복호화 대상 블록의 참조 샘플로 이용할 수 있다.
화면 내 예측 시 화면 내 예측 모드 및 부호화/복호화 대상 블록의 크기 중 적어도 하나 이상에 기반하여 참조 샘플 또는 예측 샘플 중 적어도 하나에 필터를 적용할 수 있다. 이때, 부호화/복호화 대상 블록은 현재 블록을 의미할 수 있으며, 부호화 블록, 예측 블록, 변환 블록 중 적어도 하나 이상을 의미할 수 있다. 참조 샘플 또는 예측 샘플에 적용되는 필터의 종류는 현재 블록의 화면내 예측 모드 또는 크기/형태 중 적어도 하나 이상에 따라 상이할 수 있다. 상기 필터의 종류는 필터 탭 수, 필터 계수 값 또는 필터 강도 중 적어도 하나 이상에 따라 다를 수 있다.
화면 내 예측 모드 중 비방향성 플래너(Planar) 모드는 대상 부호화/복호화 블록의 예측 블록을 생성할 때, 예측 블록 내 샘플값을 샘플 위치에 따라 현재 샘플의 상단 참조 샘플, 현재 샘플의 좌측 참조 샘플, 현재 블록의 우상단 참조 샘플 현재 블록의 좌하단 참조 샘플의 가중치 합으로 생성할 수 있다.
화면 내 예측 모드 중 비방향성 DC 모드는 대상 부호화/복호화 블록의 예측 블록을 생성할 때, 현재 블록의 상단 참조 샘플들과 현재 블록의 좌측 참조 샘플들의 평균 값으로 생성 할 수 있다. 또한, 부호화/복호화 블록 내 참조 샘플과 인접한 하나 또는 그 이상의 상단 행들 및 하나 또는 그 이상의 왼쪽 열들에 대해서는 참조 샘플 값들을 이용하여 필터링을 수행 할 수도 있다.
화면 내 예측 모드 중 복수개의 방향성 모드(angular mode)들의 경우 우상단 및/또는 좌하단 참조 샘플을 이용하여 예측 블록을 생성 할 수 있으며 방향성 모드는 서로 다른 방향성을 가질 수 있다. 예측 샘플 값 생성을 위해 실수 단위의 보간(interpolation)을 수행 할 수도 있다.
화면 내 예측 방법을 수행하기 위해 현재 예측 블록의 화면 내 예측 모드는 현재 예측 블록의 주변에 존재하는 예측 블록의 화면 내 예측 모드로부터 예측할 수 있다. 주변 화면 내 예측 모드로부터 예측된 모드 정보를 이용하여 현재 예측 블록의 화면 내 예측 모드를 예측하는 경우, 현재 예측 블록과 주변 예측 블록의 화면 내 예측 모드가 동일하면 소정의 플래그 정보를 이용하여 현재 예측 블록과 주변 예측 블록의 화면 내 예측 모드가 동일하다는 정보를 전송할 수 있고, 만약 현재 예측 블록과 주변 예측 블록의 화면 내 예측 모드가 상이하면 엔트로피 부호화를 수행하여 부호화/복호화 대상 블록의 화면 내 예측 모드 정보를 부호화할 수 있다.
도 7은 화면 간 예측 과정의 실시예를 설명하기 위한 도면이다.
도 7에 도시된 사각형은 영상(또는, 픽처)를 나타낼 수 있다. 또한, 도 7에서 화살표는 예측 방향을 나타낼 수 있다. 즉, 영상은 예측 방향에 따라 부호화 및/또는 복호화될 수 있다. 각 영상은 부호화 타입에 따라 I 픽처(Intra Picture), P 픽처(Uni-predictive Picture), B 픽처(Bi-predictive Picture) 등으로 분류될 수 있다. 각 픽처는 각 픽처의 부호화 타입에 따라 부호화되고 복호화될 수 있다.
부호화의 대상인 영상이 I 픽처인 경우, 영상은 화면 간 예측 없이 영상 자체에 대해 화면 내 부호화될 수 있다. 부호화의 대상인 영상이 P 픽처인 경우, 영상은 순방향으로만 참조 영상을 이용하는 화면 간 예측 혹은 움직임 보상을 통해 부호화될 수 있다. 부호화의 대상인 영상이 B 픽처인 경우, 순방향 및 역방향의 양측으로 참조 픽처들을 이용하는 화면 간 예측 혹은 움직임 보상을 통해 부호화될 수 있으며, 순방향 및 역방향 중 하나의 방향으로 참조 픽처를 이용하는 화면 간 예측 혹은 움직임 보상을 통해 부호화될 수 있다. 여기서, 화면 간 예측 모드가 사용되는 경우, 부호화기에서는 화면 간 예측 혹은 움직임 보상을 수행할 수 있고, 복호화기에서는 그에 대응하는 움직임 보상을 수행할 수 있다. 참조 영상을 이용하여 부호화 및/또는 복호화되는 P 픽처 및 B 픽처의 영상은 화면 간 예측이 사용되는 영상으로 간주될 수 있다.
아래에서, 실시예에 따른 화면 간 예측에 대해 구체적으로 설명된다.
화면 간 예측 혹은 움직임 보상은 참조 픽처 및 움직임 정보를 이용하여 수행될 수 있다. 또한, 화면 간 예측은 상술된 스킵 모드를 이용할 수도 있다.
참조 픽처(reference picture)는 현재 픽처의 이전 픽처 또는 현재 픽처의 이후 픽처 중 적어도 하나일 수 있다. 이때, 화면 간 예측은 참조 픽처에 기반하여 현재 픽처의 블록에 대한 예측을 수행할 수 있다. 여기에서, 참조 픽처는 블록의 예측에 이용되는 영상을 의미할 수 있다. 이때, 참조 픽처 내의 영역은 참조 픽처를 지시하는 참조 영상 색인(reference picture index; refIdx) 및 후술될 움직임 벡터(motion vector) 등을 이용함으로써 특정될 수 있다.
화면 간 예측은 참조 픽처 및 참조 픽처 내에서 현재 블록에 대응하는 참조 블록을 선택할 수 있고, 선택된 참조 블록을 사용하여 현재 블록에 대한 예측 블록을 생성할 수 있다. 현재 블록은 현재 픽처의 블록들 중 현재 부호화 또는 복호화의 대상인 블록일 수 있다.
움직임 정보는 부호화 장치(100) 및 복호화 장치(200)의 각각에 의해 화면 간 예측 중 도출될 수 있다. 또한, 도출된 움직임 정보는 화면 간 예측을 수행하는데 사용될 수 있다. 이때, 부호화 장치(100) 및 복호화 장치(200)는 복원된 주변 블록(reconstructed neighboring block)의 움직임 정보 및/또는 콜 블록(collocated block; col block)의 움직임 정보를 이용함으로써 부호화 및/또는 복호화 효율을 향상시킬 수 있다. 콜 블록은 이미 복원된 콜 픽처(collocated picture; col picture) 내에서 부호화/복호화 대상 블록의 공간적 위치에 대응하는 블록일 수 있다. 복원된 주변 블록은 현재 픽처 내의 블록이면서, 이미 부호화 및/또는 복호화를 통해 복원된 블록일 수 있다. 또한, 복원 블록은 부호화/복호화 대상 블록에 인접한 이웃 블록 및/또는 부호화/복호화 대상 블록의 외부 코너에 위치한 블록일 수 있다. 여기에서, 부호화/복호화 대상 블록의 외부 코너에 위치한 블록이란, 부호화/복호화 대상 블록에 가로로 인접한 이웃 블록에 세로로 인접한 블록 또는 부호화/복호화 대상 블록에 세로로 인접한 이웃 블록에 가로로 인접한 블록일 수 있다.
부호화 장치(100) 및 복호화 장치(200)의 각각은 콜 픽처 내에서 공간적으로 부호화/복호화 대상 블록에 대응하는 위치에 존재하는 블록을 결정할 수 있고, 결정된 블록을 기준으로 기정의된 상대적인 위치를 결정할 수 있다. 기정의된 상대적인 위치는 공간적으로 부호화/복호화 대상 블록에 대응하는 위치에 존재하는 블록의 내부 및/또는 외부의 위치일 수 있다. 또한, 부호화 장치(100) 및 복호화 장치(200)의 각각은 결정된 기정의된 상대적인 위치에 기반하여 콜 블록을 도출할 수 있다. 여기서, 콜 픽처는 참조 픽처 리스트에 포함된 적어도 하나의 참조 픽처 중에서 하나의 픽처일 수 있다.
움직임 정보의 도출 방식은 부호화/복호화 대상 블록의 예측 모드에 따라 변할 수 있다. 예를 들면, 화면 간 예측을 위해 적용되는 예측 모드로서, 향상된 움직임 벡터 예측(Advanced Motion Vector Prediction; AMVP) 및 머지 모드(merge mode) 등이 있을 수 있다. 여기서 머지 모드를 움직임 병합 모드(motion merge mode)라고 지칭할 수 있다.
예를 들면, 예측 모드로서, AMVP가 적용되는 경우, 부호화 장치(100) 및 복호화 장치(200)의 각각은 복원된 주변 블록의 움직임 벡터 및/또는 콜 블록의 움직임 벡터를 이용하여 움직임 벡터 후보 리스트(motion vector candidate list)를 생성할 수 있다. 복원된 주변 블록의 움직임 벡터 및/또는 콜 블록의 움직임 벡터는 움직임 벡터 후보로 사용될 수 있다. 여기서, 콜 블록의 움직임 벡터를 시간적 움직임 벡터 후보(temporal motion vector candidate)라 지칭할 수 있고, 복원된 주변 블록의 움직임 벡터를 공간적 움직임 벡터 후보(spatial motion vector candidate)라 지칭할 수 있다.
부호화 장치(100)에 의해 생성된 비트스트림은 움직임 벡터 후보 색인(motion vector candidate index)를 포함할 수 있다. 즉, 부호화 장치(100)은 움직임 벡터 후보 색인을 엔트로피 부호화하여 비트스트림을 생성할 수 있다. 움직임 벡터 후보 색인은 움직임 벡터 후보 리스트에 포함된 움직임 벡터 후보 중에서 선택된 최적의 움직임 벡터 후보를 지시할 수 있다. 움직임 벡터 후보 색인은 비트스트림을 통해 부호화 장치(100)로부터 복호화 장치(200)로 전송될 수 있다.
복호화 장치(200)는 움직임 벡터 후보 색인을 비트스트림으로부터 엔트로피 복호화하고, 엔트로피 복호화된 움직임 벡터 후보 색인을 이용하여 움직임 벡터 후보 리스트에 포함된 움직임 벡터 후보 중에서 복호화 대상 블록의 움직임 벡터 후보를 선택할 수 있다.
부호화 장치(100)는 부호화 대상 블록의 움직임 벡터 및 움직임 벡터 후보 간의 움직임 벡터 차분(MVD: Motion Vector Difference)을 계산할 수 있고, MVD를 엔트로피 부호화할 수 있다. 비트스트림은 엔트로피 부호화된 MVD를 포함할 수 있다. MVD는 비트스트림을 통해 부호화 장치(100)로부터 복호화 장치(200)로 전송될 수 있다. 이 때, 복호화 장치(200)는 수신된 MVD를 비트스트림으로부터 엔트로피 복호화할 수 있다. 복호화 장치(200)는 복호화된 MVD 및 움직임 벡터 후보의 합을 통해 복호화 대상 블록의 움직임 벡터를 도출할 수 있다.
비트스트림은 참조 픽처를 지시하는 참조 영상 색인 등을 포함할 수 있다. 참조 영상 색인은 엔트로피 부호화되어 비트스트림을 통해 부호화 장치(100)로부터 복호화 장치(200)로 전송될 수 있다. 복호화 장치(200)는 주변 블록의 움직임 정보들을 이용하여 복호화 대상 블록의 움직임 벡터를 예측할 수 있고, 예측된 움직임 벡터 및 움직임 벡터 차분을 이용하여 복호화 대상 블록의 움직임 벡터를 유도할 수 있다. 복호화 장치(200)는 유도된 움직임 벡터와 참조 영상 색인 정보에 기반하여 복호화 대상 블록에 대한 예측 블록을 생성할 수 있다.
움직임 정보의 도출 방식의 다른 예로, 머지 모드(merge mode)가 있다. 머지 모드란 복수의 블록들에 대한 움직임의 병합을 의미할 수 있다. 머지 모드는 하나의 블록의 움직임 정보를 다른 블록에도 함께 적용시키는 것을 의미할 수 있다. 머지 모드가 적용되는 경우, 부호화 장치(100) 및 복호화 장치(200)의 각각은 복원된 주변 블록의 움직임 정보 및/또는 콜 블록의 움직임 정보를 이용하여 머지 후보 리스트(merge candidate list)를 생성할 수 있다. 움직임 정보는 1) 움직임 벡터, 2) 참조 영상 색인, 및 3) 화면 간 예측 지시자 중 적어도 하나를 포함할 수 있다. 예측 지시자는 단방향 (L0 예측, L1 예측) 또는 쌍방향일 수 있다.
이때, 머지 모드는 CU 단위 또는 PU 단위로 적용될 수 있다. CU 단위 또는 PU 단위로 머지 모드가 수행되는 경우, 부호화 장치(100)는 기정의된 정보를 엔트로피 부호화하여 비트스트림을 생성한 후 복호화 장치(200)로 전송할 수 있다. 비트스트림은 기정의된 정보를 포함할 수 있다. 기정의된 정보는, 1) 블록 파티션(partition)별로 머지 모드를 수행할지 여부를 나타내는 정보인 머지 플래그(merge flag), 2) 부호화 대상 블록에 인접한 주변 블록들 중 어떤 블록과 머지를 할 것인가에 대한 정보인 머지 인덱스(merge index)를 포함할 수 있다. 예를 들면, 부호화 대상 블록의 주변 블록들은 부호화 대상 블록의 좌측 인접 블록, 부호화 대상 블록의 상단 인접 블록 및 부호화 대상 블록의 시간적(temporal) 인접 블록 등을 포함할 수 있다.
머지 후보 리스트는 움직임 정보들이 저장된 리스트를 나타낼 수 있다. 또한, 머지 후보 리스트는 머지 모드가 수행되기 전에 생성될 수 있다. 머지 후보 리스트에 저장되는 움직임 정보는, 부호화/복호화 대상 블록에 인접한 주변 블록의 움직임 정보 및 참조 영상에서 부호화/복호화 대상 블록에 대응되는(collocated) 블록의 움직임 정보, 이미 머지 후보 리스트에 존재하는 움직임 정보들의 조합에 의해 생성된 새로운 움직임 정보 및 제로 머지 후보 중 적어도 하나 이상일 수 있다. 여기서, 부호화/복호화 대상 블록에 인접한 주변 블록의 움직임 정보는 공간적 머지 후보(spatial merge candidate) 및 참조 영상에서 부호화/복호화 대상 블록에 대응되는(collocated) 블록의 움직임 정보는 시간적 머지 후보(temporal merge candidate)라 지칭할 수 있다.
스킵 모드는 주변 블록의 움직임 정보를 그대로 부호화/복호화 대상 블록에 적용하는 모드일 수 있다. 스킵 모드는 화면 간 예측에 이용되는 모드 중 하나일 수 있다. 스킵 모드가 사용되는 경우, 부호화 장치(100)는 어떤 블록의 움직임 정보를 부호화 대상 블록의 움직임 정보로서 이용할 것인지에 대한 정보를 엔트로피 부호화하여 비트스트림을 통해 복호화 장치(200)에 전송할 수 있다. 부호화 장치(100)는 다른 정보는 복호화 장치(200)에 전송하지 않을 수 있다. 예를 들면, 다른 정보는 구문 요소(syntax element) 정보일 수 있다. 구문 요소 정보는 움직임 벡터 차분 정보, 부호화 블록 플래그 및 변환 계수 레벨 중 적어도 하나 이상을 포함할 수 있다.
화면내 또는 화면간 예측 이후 생성된 잔여 신호는 양자화 과정의 일환으로 변환 과정을 통해 주파수 도메인으로 변환할 수 있다. 이때 수행하는 1차 변환은 DCT type 2 (DCT-II)외에 다양한 DCT, DST 커널을 사용할 수 있으며, 이러한 변환 커널들은 잔여 신호에 대해 수평 및/또는 수직방향에 대해 1차원 변환(1D transform)을 각각 수행하는 분리 변환(Separable transform)으로 변환이 수행될 수도 있고, 또는 2차원 비분리 변환(2D Non-separable transform)으로 변환이 수행될 수 있다.
일예로 변환에 사용되는 DCT, DST type은 아래 표에서와 같이 DCT-II 외에 DCT-V, DCT-VIII, DST-I, DST-VII 를 1D 변환 시 적응적으로 사용할 수 있으며, 예를 들어, 표 1 내지 표 2의 예와 같이 변환 세트(Transform set)을 구성하여 변환에 사용된 DCT 또는 DST 타입을 유도할 수 있다.
변환세트 변환
0 DST_VII, DCT-VIII
1 DST-VII, DST-I
2 DST-VII, DCT-V
변환세트 변환
0 DST_VII, DCT-VIII, DST-I
1 DST-VII, DST-I, DCT-VIII
2 DST-VII, DCT-V, DST-I
예를 들어,도 8과 같이 화면내 예측모드에 따라 수평 또는 수직방향에 대해 서로 다른 변환 세트(Transform set)를 정의한 후, 부/복호화기에서 현재 부호화/복호화 대상 블록의 화면내 예측 모드 및 이에 대응하는 변환 세트에 포함된 변환을 이용하여 변환 및/또는 역변환을 수행할 수 있다. 이 경우, 변환 세트는 엔트로피 부호화/복호화되는 것이 아니라 부/복호화기에서 동일한 규칙에 따라 정의될 수 있다. 이 경우, 해당 변환 세트에 속한 변환들 중에서 어떤 변환이 사용되었는지를 지시하는 엔트로피 부호화/복호화될 수 있다. 예를 들어, 블록의 크기가 64x64 이하인 경우, 화면 내 예측 모드에 따라 표 2의 예와 같이 총 3가지의 변환 세트를 구성하고, 수평 방향 변환과 수직 방향 변환으로 각 3가지의 변환을 이용해서 총 9개의 다중 변환 방법을 조합해서 수행한 후 최적의 변환 방법으로 잔여 신호를 부호화/복호화함으로써 부호화 효율을 향상시킬 수 있다. 이때, 하나의 변환 세트에 속한 3가지의 변환들 중 어떤 변환이 사용되었는지에 대한 정보를 엔트로피 부호화/복호화하기 위해 절삭된 단항(Truncated Unary) 이진화(Binarization)를 사용할 수도 있다. 이때, 수직 변환 및 수평 변환 중 적어도 하나 이상에 대해 변환 세트에 속한 변환들 중 어떤 변환이 사용되었는지를 지시하는 정보가 엔트로피 부호화/복호화될 수 있다.
부호화기에서는 상기 전술한 1차 변환이 완료된 이후, 도 9의 예와 같이 변환 계수 (Transformed coefficients)에 대한 에너지 집중도를 높이기 위해 2차 변환 (Secondary transform)을 수행할 수 있다. 2차 변환 역시 수평 및/또는 수직방향에 대해 1차원 변환을 각각 수행하는 분리 변환을 수행할 수도 있고, 또는 2차원 비분리 변환을 수행할 수 있으며, 사용된 변환 정보가 전송되거나 또는 현재 및 주변 부호화 정보에 따라 부호화기/복호화기에서 묵시적으로 유도될 수 있다. 예를 들어, 1차 변환과 같이 2차 변환에 대한 변환 세트를 정의할 수 있으며, 변환 세트는 엔트로피 부호화/복호화되는 것이 아니라 부호화기/복호화기에서 동일한 규칙에 따라 정의될 수 있다. 이 경우, 해당 변환 세트에 속한 변환 중에서 어떤 변환이 사용되었는지를 지시하는 정보가 전송될 수 있으며, 화면내 또는 화면간 예측을 통한 잔여 신호 중 적어도 하나 이상에 적용될 수 있다.
변환 세트 별로 변환 후보(transform candidate)의 개수 또는 종류 중 적어도 하나는 상이하며, 변환 후보의 개수 또는 종류 중 적어도 하나는 블록(CU, PU, TU 등)의 위치, 크기, 분할 형태, 예측 모드(intra/inter mode) 또는 화면내 예측 모드의 방향성/비방향성 중 적어도 하나를 고려하여 가변적으로 결정될 수도 있다.
복호화기에서는 2차 역변환 수행 여부에 따라 2차 역변환을 수행할 수 있고, 2차 역변환이 수행된 결과에 1차 역변환 수행 여부에 따라 1차 역변환을 수행할 수 있다.
상기 전술한 1차 변환 및 2차 변환은 휘도/색차 성분 중 적어도 하나 이상의 신호 성분에 적용되거나 임의의 부호화 블록 크기/형태에 따라 적용될 수 있으며, 임의의 부호화 블록에서 사용여부 및 사용된 1차 변환/2차 변환을 가르키는 인덱스를 엔트로피 부호화/복호화하거나 또는 현재/주변 부호화 정보 중 적어도 하나 이상에 따라 부호화기/복호화기에서 묵시적으로 유도할 수 있다.
화면내 또는 화면간 예측 이후 생성된 잔여 신호는 1차 및/또는 2차 변환 완료 후, 양자화 과정을 거친 후 양자화된 변환 계수는 엔트로피 부호화 과정을 수행하게 되며, 이때 양자화된 변환 계수는 도 10과 같이 화면내 예측 모드 또는 최소 블록 크기/형태 중 적어도 하나 이상을 기준으로 대각선, 수직, 수평 방향에 따라 스캐닝(scanning) 될 수 있다.
또한, 엔트로피 복호화된 양자화된 변환 계수는 역 스캐닝(Inverse Scanning)되어 블록 형태로 정렬될 수 있으며, 해당 블록에 역양자화 또는 역 변환 중 적어도 하나 이상이 수행될 수 있다. 이때, 역 스캐닝의 방법으로 대각(Diagonal) 스캔, 수평(Horizontal) 스캔, 수직(Vertical) 스캔 중 적어도 하나가 수행될 수 있다.
일예로, 현재 부호화 블록의 크기가 8x8일 때, 8x8 블록에 대한 잔여 신호는 1차, 2차 변환 및 양자화 이후, 4개의 4x4 서브 블록별로 도 10에 도시된 3가지 스캐닝 순서(Scanning order) 방법 중 적어도 하나에 따라 양자화된 변환 계수들을 스캐닝하면서 엔트로피 부호화할 수 있다. 또한 양자화된 변환 계수를 역 스캐닝하면서 엔트로피 복호화할 수 있다. 역 스캐닝된 양자화된 변환 계수는 역양자화 이후 변환 계수가 되고, 2차 역변환 또는 1차 역변환 중 적어도 하나가 수행되어 복원된 잔여 신호가 생성될 수 있다.
비디오 부호화 과정에서 도 11과 같이 하나의 블록이 분할될 수 있으며 분할 정보에 해당하는 지시자가 시그널링 될 수 있다. 이때, 상기 분할 정보는 분할 플래그(split_flag), 쿼드/이진트리 플래그(QB_flag), 쿼드트리 분할 플래그(quadtree_flag), 이진트리 분할 플래그(binarytree_flag), 이진트리 분할 유형 플래그(Btype_flag) 중 적어도 하나 이상일 수 있다. 여기서, split_flag 는 블록이 분할되었는지 여부를 나타내는 플래그, QB_flag 는 블록이 쿼드트리 형태로 분할되었지는 이진트리 형태로 분할되었는지 여부를 나타내는 플래그, quadtree_flag 는 블록이 쿼드트리 형태로 분할되었는지 여부를 나타내는 플래그, binarytree_flag 는 블록이 이진트리 형태로 분할되었는지 여부를 나타내는 플래그, Btype_flag 는 블록이 이진트리 형태로 분할하는 경우 수직 또는 수평 분할임을 나타내는 플래그일 수 있다.
상기 분할 플래그가 1이면 분할되었음을 0이면 분할되지 않았음을 나타낼 수 있으며 상기 쿼드/이진트리 플래그의 경우 0이면 쿼드트리 분할, 1이면 이진트리 분할을 나타낼 수 있으며, 반대로 0이면 이진트리 분할, 1이면 쿼드트리 분할을 나타낼 수 있다. 상기 이진트리 분할 유형 플래그의 경우, 0이면 수평 방향 분할, 1이면 수직 방향 분할을 나타낼 수 있으며, 반대로 0이면 수직 방향 분할, 1이면 수평 방향 분할을 나타낼 수 있다.
예를 들어, 도 11에 대한 분할 정보는 다음 표 3과 같이 quadtree_flag, binarytree_flag, Btype_flag 중 적어도 하나를 시그널링 하여 유도할 수 있다.
quadtree_flag 1 0 1 0 0 0 0 0 0
binarytree_flag 1 0 0 1 0 0 0 0 0 1 1 0 0 0 0
Btype_flag 1 0 0 1
예를 들어, 도 11에 대한 분할 정보는 다음 표 2와 같이 split_flag, QB_flag, Btype_flag 중 적어도 하나를 시그널링 하여 유도할 수 있다.
split_flag 1 1 0 0 1 1 0 0 0 0 0 1 1 0 0 0 0
QB_flag 0 1 0 1 1
Btype_flag 1 0 0 1
상기분할 방법은 블록의 크기/형태에 따라 쿼드트리로만 분할이 가능할 수 있으며 또는 이진트리로만 가능할 수 있다. 이러한 경우, 상기 split_flag는 쿼드트리 또는 이진트리 분할 여부를 나타내는 플래그를 의미할 수 있다. 상기 블록의 크기/형태는 블록의 깊이 정보에 따라 유도될 수 있으며, 깊이 정보는 시그널링 될 수 있다.
상기 블록의 크기가 소정의 범위 내에 속하는 경우에는 쿼드트리로만 분할이 가능할 수 있다. 여기서, 소정의 범위는 쿼드트리만으로 분할이 가능한 최대 블록의 크기 또는 최소 블록의 크기 중 적어도 하나로 정의될 수 있다. 상기 쿼드트리 형태의 분할이 허용되는 최대/최소 블록의 크기를 나타내는 정보는 비트스트림을 통해 시그널링될 수 있고, 해당 정보는 시퀀스, 픽쳐 파라미터, 또는 슬라이스(세그먼트) 중 적어도 하나의 단위로 시그널링될 수 있다. 또는, 상기 최대/최소 블록의 크기는 부호화기/복호화기에 기-설정된 고정된 크기일 수도 있다. 예를 들어, 상기 블록의 크기가 256x256 ~ 64x64 에 해당하는 경우에는 쿼드트리로만 분할이 가능할 수 있다. 이러한 경우에 상기 split_flag는 쿼드트리 분할 여부를 나타내는 플래그 일 수 있다.
상기 블록의 크기가 소정의 범위 내에 속하는 경우에는 이진트리로만 분할이 가능할 수 있다. 여기서, 소정의 범위는 이진트리만으로 분할이 가능한 최대 블록의 크기 또는 최소 블록의 크기 중 적어도 하나로 정의될 수 있다. 상기 이진트리 형태의 분할이 허용되는 최대/최소 블록의 크기를 나타내는 정보는 비트스트림을 통해 시그널링될 수 있고, 해당 정보는 시퀀스, 픽쳐 파라미터, 또는 슬라이스(세그먼트) 중 적어도 하나의 단위로 시그널링될 수 있다. 또는, 상기 최대/최소 블록의 크기는 부호화기/복호화기에 기-설정된 고정된 크기일 수도 있다. 예를 들어, 상기 블록의 크기가 16x16 ~ 8x8 에 해당하는 경우에는 이진트리로만 분할이 가능할 수 있다. 이러한 경우에 상기 split_flag는 이진트리 분할 여부를 나타내는 플래그 일 수 있다.
상기 하나의 블록이 이진트리로 분할된 이후, 상기 분할된 블록이 더 분할될 경우에는 이진트리로만 분할될 수 있다.
상기 분할된 블록의 가로 또는 세로의 크기가 더 이상 분할될 수 없는 크기인 경우에는 상기 하나 이상의 지시자를 시그널링 하지 않을 수 있다.
상기 쿼드트리 기반 하의 이진트리 분할 외에 이진트리 분할 후, 쿼드트리 기반 분할이 가능할 수 있다.
이하에서는 비디오 코딩 과정 중 하나인 변환(transform) 방법 개선을 통한 비디오 압축 효율 향상 벙법에 대해 설명하도록 한다. 좀 더 구체적으로 기존 비디오 코딩의 부호화(encoding)는 크게 현재 원본 영상의 일부분인 원본 블록을 예측하는 화면내(intra)/화면간(inter) 예측 단계, 예측된 예측 블록(prediction block)과 원본 블록의 차이인 잔여 블록(residual block)의 변환 및 양자화(quantization) 단계, 변환 및 양자화된 블록의 계수와 앞 단에서 얻어진 압축 정보에 대한 확률 기반 무손실 압축 방법인 엔트로피 코딩(entropy coding)을 거쳐 원본 영상의 압축 형태인 비트스트림(bitstream)을 형성하고, 이를 복호화기(decoder)로 전송하거나 기록매체에 저장한다. 이 중 본 명세서에서 설명할 Shuffling and Discrete Sine Transform (이하, SDST)는 변환 방법의 효율성을 증가시켜 압축 효율의 향상을 목적으로 할 수 있다.
본 발명에 따른 SDST 방법은 비디오 코딩에서 널리 이용하는 변환 커널(transform kernel)인 Discrete Cosine Transform type-2 또는 DCT-II (이하, DCT-2)가 아닌 Discrete Sine Transform type-7 또는 DST-VII (이하, DST-7)을 사용함으로써 영상들이 공통적으로 갖는 주파수 특성을 더 잘 반영할 수 있도록 할 수 있다.
본 발명에 따른 변환 방법을 통해 기존의 비디오 코딩 방법 대비 비교적 낮은 비트량에서도 높은 객관적 비디오 화질을 얻을 수 있다.
DST-7은 잔여 블록(residual block)의 데이터에 적용될 수 있다. 잔여 블록에 대한 DST-7 적용은 잔여 블록에 대응하는 예측 모드에 기반하여 수행될 수 있다. 예를 들어, 인터 모드로 부호화된 잔여 블록에 적용될 수 있다. 본 발명의 일 실시 예에 따라 DST-7은 잔여 블록의 데이터를 재배열 혹은 셔플링(shuffling) 이후에 적용될 수 있다. 여기서, 셔플링은 영상 데이터의 재배열을 의미하며, 동등한 의미로 잔여 신호 재배열(rearrangement)이라고 할 수 있다. 여기서, 잔여 블록은 레지듀얼(residual), 잔차 블록, 잔차 신호, 잔여 신호, 잔차 데이터, 잔여 데이터와 동일한 의미를 가질 수 있다. 또한, 잔여 블록은 잔여 블록이 부호화기와 복호화기에서 복원된 형태인 복원된 레지듀얼(reconstructed residual), 복원된 잔차 블록, 복원된 잔차 신호, 복원된 잔여 신호, 복원된 잔차 데이터, 복원된 잔여 데이터와 동일한 의미를 가질 수도 있다.
본 발명의 일 실시 예에 따른 SDST는 DST-7을 변환 커널로 사용할 수 있다. 이때, SDST의 변환 커널은 DST-7에 한정되는 것은 아니고, Discrete Sine Transform type-1(DST-1), Discrete Sine Transform type-2(DST-2), Discrete Sine Transform type-3(DST-3), …, Discrete Sine Transform type-n(DST-n) 등 DST의 여러 타입 중 적어도 하나를 이용할 수 있다. (여기서, n은 1 이상의 양의 정수)
아래와 같은 수학식 1은 본 발명의 일 실시 예에 따른 1차원 DCT-2의 수행 방법를 나타낼 수 있다. 여기서, N은 블록의 크기, k는 주파수 성분의 위치, xn은 공간 도메인에서 n번째 계수의 값을 나타낼 수 있다.
Figure PCTKR2017007363-appb-M000001
2차원 도메인의 DCT-2는, 상기 수학식 1을 이용하여 잔여 블록에 대해 수평(horizontal transform) 및 수직 변환(vertical transform)을 수행함으로써 가능할 수 있다.
DCT-2 변환 커널은 아래와 같은 수학식 2로 정의될 수 있다. 여기서, Xk 는 주파수 도메인에서 위치에 따른 기저 벡터(basis vector), N은 주파수 도메인의 크기를 나타낼 수 있다.
Figure PCTKR2017007363-appb-M000002
한편, 도 12는 본 발명에 따른 DCT-2 주파수 도메인에서 기저 벡터(basis vector)를 나타낸다. 도 12를 참고하면, 주파수 도메인에서 DCT-2의 주파수 특성을 보여준다. 여기서, DCT-2의 X0 기저 벡터를 통해 계산된 값은 DC성분을 의미할 수 있다.
DCT-2는 4x4, 8x8, 16x16, 32x32 크기 등의 잔여 블록에 대한 변환 과정에 이용될 수 있다.
한편, DCT-2는 잔여 블록의 크기, 잔여 블록의 색 성분(예를 들어, 휘도 성분, 색차 성분) 또는 잔여 블록에 대응하는 예측 모드 중 적어도 하나에 기초하여 선택적으로 이용될 수 있다. 예를 들어, 인트라 모드로 부호화된 4x4 크기의 잔여 블록이고 해당 잔여 블록의 성분이 휘도 성분인 경우, DCT-2가 이용되지 않을 수 있다. 여기서, 예측 모드는 화면 간(inter) 예측 혹은 화면 내(intra) 예측을 의미할 수 있다. 또한, 예측 모드는 화면 내 예측일 경우 화면내 예측 모드 혹은 화면내 예측 방향을 의미할 수 있다.
DCT-2 변환 커널을 통한 변환은 영상의 배경과 같은 주변 화소(pixel) 간의 변화가 적은 특성의 블록에서 높은 압축 효율을 보일 수 있다. 하지만, 영상의 텍스쳐(texture)처럼 복잡한 패턴(pattern)을 갖는 영역에 대한 변환 커널로는 적합하지 않을 수 있다. 주변 화소(pixel) 간의 상관 관계(correlation)가 낮은 블록을 DCT-2를 통해 변환할 경우 주파수 도메인의 고주파 성분에 많은 변환 계수가 나타날 수 있기 때문이다. 비디오 압축에서 고주파 영역에서의 빈번한 변환 계수 발생은 압축 효율을 감소시킬 수 있다. 압축 효율 향상을 위해서는 저주파수 성분 근처에서 큰 계수값을 갖고, 고주파 성분에서는 되도록 계수가 0에 가까워야 한다.
아래와 같은 수학식 3은 본 발명의 일 실시 예에 따른 1차원 DST-7의 수행 방법를 나타낼 수 있다. 여기서, N은 블록의 크기, k는 주파수 성분의 위치, xn은 공간 도메인에서 n번째 계수의 값을 의미할 수 있다.
Figure PCTKR2017007363-appb-M000003
2차원 도메인의 DST-7은, 상기 수학식 3을 이용하여 잔여 블록에 대해 수평(horizontal transform) 및 수직 변환(vertical transform)을 수행함으로써 가능할 수 있다.
DST-7 변환 커널은 아래와 같은 수학식 4로 정의될 수 있다. 여기서, Xk는 DST-7의 K번째 기저 벡터를, i는 주파수 도메인에서의 위치를, N은 주파수 도메인의 크기를 나타낼 수 있다.
Figure PCTKR2017007363-appb-M000004
DST-7은 2x2, 4x4, 8x8, 16x16, 32x32, 64x64, 128x128 등 중 적어도 하나 이상의 크기의 잔여 블록에 대한 변환 과정에 이용될 수 있다.
한편, DST-7은 정사각형(square) 블록이 아닌 직사각형(rectangular) 블록에 적용될 수 있다. 예를 들어, 8x4, 16x8, 32x4, 64x16 등 가로 크기와 세로 크기가 서로 다른 직사각형 블록의 수직 변환 및 수평 변환 중 적어도 하나 이상에 DST-7이 적용될 수 있다.
또한, DST-7는 잔여 블록의 크기, 잔여 블록의 색 성분(예를 들어, 휘도 성분, 색차 성분) 또는 잔여 블록에 대응하는 예측 모드 중 적어도 하나에 기초하여 선택적으로 이용될 수 있다. 예를 들어, 인트라 모드로 부호화된 4x4 크기의 잔여 블록이고 해당 잔여 블록의 성분이 휘도 성분인 경우, DST-7가 이용될 수 있다. 이때, 예측 모드는 화면 간(inter) 예측 혹은 화면 내(intra) 예측을 의미할 수 있다. 또한, 예측 모드는 화면 내 예측일 경우 화면내 예측 모드 혹은 화면내 예측 방향을 의미할 수 있다.
한편, 도 13은 본 발명에 따른 DST-7의 각 주파수 도메인에서 기저 벡터(basis vector)를 나타낸다. 도 13을 참고하면, DST-7의 첫번째 기저 벡터(x0)는 곡선의 형태를 띠고 있다. 이를 통해 DST-7는 DCT-2에 비해 영상에서 공간적 변화가 큰 블록에 대해 더 높은 변환 성능을 보일 것으로 예측 가능하다.
화면내(intra) 예측된 코딩 유닛(CU) 내 4x4 변환 유닛(TU)에 대한 변환 시 DST-7을 사용할 수 있다. 이는 intra 예측 특성상 참조 샘플(reference sample)에서 거리가 멀어질수록 에러(error)량이 증가하는 것을 반영하여 더 높은 변환 효율을 보이는 DST-7을 사용할 수 있다. 즉, 공간 도메인에서 블록 내 (0, 0) 위치를 기준으로 거리가 멀어질수록 잔여 신호의 양이 증가하는 블록의 경우, DST-7을 이용해서 해당 블록을 효율적으로 압축 가능할 수 있다.
상술한 바와 같이, 변환 효율 증대를 위해서 영상의 주파수 특성에 알맞는 변환 커널을 사용하는 것이 중요할 수 있다. 특히 변환은 원본 블록에 대한 잔여 블록에 수행되기 때문에 CU 또는 PU 또는 TU 블록 내 잔여 신호의 분포 특성을 알아봄으로써 DST-7 과 DCT-2 의 변환 효율을 알 수 있다.
도 14는 “Cactus” sequence를 Low Delay-P profile환경에서 실험하여 구한 인터 모드(inter mode)로 예측된 8x8 코딩 유닛(CU)의 2Nx2N 예측 유닛(PU) 내 위치에 따른 평균 잔여(residual) 값의 분포를 나타낸다.
도 14를 참조하면, 도 14의 좌측 도면은 블록 내 평균 잔여 신호 값들 중 상대적으로 큰 상위 30%의 값을 별도로 표시한 것이고, 우측 도면은 좌측 도면과 같은 블록 내 평균 잔여 신호 값들 중 상대적으로 값이 큰 상위 70%의 값을 별도로 표시하고 있다.
도 14를 통해 인터 모드(inter mode)로 예측된 8x8 CU의 2Nx2N PU 내 잔여 신호 분포는 잔여 신호 값의 크기가 작은 값들이 주로 블록의 가운데 부근에 밀집되고, 블록의 중간 지점에서 멀어질수록 잔여 신호 값이 커지는 특성을 보임을 알 수 있다. 즉, 블록 경계에서 잔여 신호 값이 커지는 것을 알 수 있다. 이와 같은 잔여 신호 분포 특성은 CU 크기와 inter 예측된 CU가 가능한 PU 분할 모드(2Nx2N, 2NxN, Nx2N, NxN, nRx2N, nLx2N, 2NxnU, 2NxnD)에 상관없이 PU 내 잔여 신호가 갖는 공통적인 특징이다.
도 15는 본 발명에 따른 화면간 예측 모드(inter mode)로 예측된 8x8 코딩 유닛(CU)의 2Nx2N 예측 유닛(PU) 내 잔여 신호 분포 특성을 나타내는 3차원 그래프이다.
도 15를 참조하면, 블록 내 중앙 근처에는 값이 작은 잔여 신호 분포가 집중되고, 블록 경계에 가까운 잔여 신호일수록 상대적으로 더 큰 값을 가짐을 확인할 수 있다.
도 14 및 도 15에 따른 잔여 신호 분포 특성을 바탕으로 인터 모드로 예측된 CU의 PU 내 잔여 신호의 변환은 DCT-2가 아닌 DST-7을 이용시 더 효율적일 것으로 볼 수 있다.
이하에서는, DST-7을 변환 커널로 사용하는 변환 방법 중 하나인 SDST에 대해 설명하도록 한다.
본 발명의 따른 SDST는 두 단계로 수행될 수 있다. 첫번째 단계는 인터 모드 혹은 인트라 모드로 예측된 CU의 PU 내 잔여 신호를 셔플링하는 단계이다. 두번째 단계는 셔플링된 블록 내 잔여 신호에 DST-7을 적용하는 단계이다.
현재 블록(예컨데, CU, PU 또는 TU) 내에 배열된 잔여 신호를 제1 방향에 따라 스캔하고, 이를 제2 방향에 따라 재배열할 수 있다. 즉, 현재 블록 내에 배열된 잔여 신호를 제1 방향에 따라 스캔하고, 이를 제2 방향에 따라 재배열하여 셔플링을 수행할 수 있다. 이때, 잔여 신호는 원본 신호와 예측 신호 사이의 차분 신호를 나타내는 신호를 의미할 수 있다. 즉, 잔여 신호는 변환과 양자화 중 적어도 하나를 수행하기 전인 신호를 의미할 수 있다. 또는, 잔여 신호는 변환과 양자화 중 적어도 하나 이상이 수행된 신호 형태를 의미할 수 있다.
또한, 잔여 신호는 복원된 잔여 신호를 의미할 수 있다. 즉, 잔여 신호는 역변환과 역양자화 중 적어도 하나 이상이 수행된 신호를 의미할 수 있다. 또한, 잔여 신호는 역변환과 역양자화 중 적어도 하나를 수행하기 전인 신호를 의미할 수 있다.
한편, 제1 방향(또는 스캔 방향)은 래스터 스캔 순서(Raster scan order), 위-오른쪽 대각선 스캔 순서(Up-Right Digonal scan order), 수평 스캔 순서(Horizontal scan order), 수직 스캔 순서(Vertical scan order) 중 어느 하나일 수 있다. 또한, 제1 방향은 아래와 같이 정의될 수 있다.
(1) 상단 행(row)에서 하단 행으로 스캔하되, 하나의 행에서는 좌측에서 우측으로 스캔
(2) 상단 행(row)에서 하단 행으로 스캔하되, 하나의 행에서는 우측에서 좌측으로 스캔
(3) 하단 행(row)에서 상단 행으로 스캔하되, 하나의 행에서는 좌측에서 우측으로 스캔
(4) 하단 행(row)에서 상단 행으로 스캔하되, 하나의 행에서는 우측에서 좌측으로 스캔
(5) 좌측 열(column)에서 우측 열로 스캔하되, 하나의 열에서는 상단에서 하단으로 스캔
(6) 좌측 열(column)에서 우측 열로 스캔하되, 하나의 열에서는 하단에서 상단으로 스캔
(7) 우측 열(column)에서 좌측 열로 스캔하되, 하나의 열에서는 상단에서 하단으로 스캔
(8) 우측 열(column)에서 좌측 열로 스캔하되, 하나의 열에서는 하단에서 상단으로 스캔
(9) 나선 형태로 스캔: 블록 내부(또는 외부)에서 블록 외부(또는 내부)로, 시계/반시계 방향으로 스캔
(10) 대각 스캔: 블록 내 하나의 꼭지점에서 시작하여, 좌상단, 우상단, 좌하단 또는 우하단 방향으로 대각 스캔
한편, 제2 방향(또는 재배열 방향)으로 상술한 스캔 방향 중 어느 하나가 선택적으로 이용될 수 있다. 제1 방향과 제2 방향은 동일할 수도 있고, 서로 상이할 수도 있다.
잔여 신호에 대한 스캔 및 재배열 과정은 현재 블록 단위로 수행될 수 있다.
여기서, 재배열은 블록 내에서 제1 방향대로 스캔한 잔여 신호를 동일한 크기의 블록에 제2 방향대로 배열하는 것을 의미할 수 있다. 또한, 제1 방향대로 스캔한 블록의 크기와 제2 방향대로 재배열한 블록의 크기는 서로 상이할 수 있다.
또한, 여기서 스캔과 재배열은 각각 제1 방향 및 제2 방향에 따라 별도로 수행되는 것으로 표현했지만, 스캔과 재배열은 제1 방향에 대해서 하나의 과정으로 수행될 수 있다. 예를 들어, 블록 내 잔여 신호에 대해서 상단 행에서 하단 행으로 스캔하되, 하나의 행에서는 우측에서 좌측으로 스캔하여 블록에 저장(재배열)할 수 있다.
한편, 잔여 신호에 대한 스캔 및 재배열 과정은 현재 블록 내 소정의 서브블록(sub-block) 단위로 수행될 수 있다. 여기서, 서브블록은 현재 블록과 같거나 작은 블록일 수 있다.
서브블록 단위는 고정된 크기/형태(예를 들어, 4x4, 4x8, 8x8, … NxM, 여기서, N과 M은 양의 정수)를 가질 수 있다. 또한, 서브블록 단위의 크기 및/또는 형태는 가변적으로 유도될 수도 있다. 일 예로, 현재 블록의 크기, 형태, 및/또는 예측 모드(인터, 인트라)에 종속적(dependent)으로 서브블록 단위의 크기 및/또는 형태가 결정될 수 있다.
서브블록의 위치에 따라 스캔 방향 및/또는 재배열 방향이 적응적으로 결정될 수 있다. 이 경우, 서브블록 별로 서로 상이한 스캔 방향 및/또는 재배열 방향을 사용할 수도 있고, 현재 블록에 속한 서브블록들 전부 또는 일부는 동일한 스캔 방향 및/또는 재배열 방향을 사용할 수도 있다.
도 16은 본 발명에 따른 코딩 유닛(CU)의 2Nx2N 예측 유닛(PU) 모드에서 잔여 신호 분포 특징을 도시한 도면이다.
도 16를 참조하면, PU가 쿼드트리 구조로 4개의 서브블록으로 분할되어 있고, 각 서브블록의 화살표 진행 방향은 잔여 신호 분포의 특성을 나타낸다. 구체적으로, 각 서브블록의 화살표 진행 방향은 잔여 신호가 커지는 방향을 나타낸다. 이는 PU 분할 모드(PU partitioning mode)에 상관없이 PU 내 잔여 신호가 공통적으로 가지는 분포 특성 때문이다. 따라서, DST-7 변환에 적합한 분포 특성을 갖도록 각 서브블록의 잔여 신호를 재배열하는 셔플링 작업을 수행할 수 있다.
도 17은 본 발명에 따른 2Nx2N 예측 유닛(PU)의 셔플링(shuffling) 전후의 잔여 신호 분포 특징을 도시한 도면이다.
도 17을 참조하면, 상단 블록은 인터 모드로 예측된 8x8 CU의 2Nx2N PU 내 잔여 신호의 셔플링 이전 분포를 보여준다. 아래의 수학식 5는 도 17의 상단 블록 내 각 잔여 신호의 위치에 따른 값을 나타낸다.
Figure PCTKR2017007363-appb-M000005
인터 모드로 예측된 CU의 PU 내 잔여 신호 분포 특성에 의해, 도 17의 상단 블록 내 중앙 영역에서는 비교적 작은 값을 갖는 잔여 신호가 많이 분포하고, 상단 블록의 경계로 진행할수록 큰 값을 갖는 잔여 신호가 많이 분포한다.
도 17의 하단 블록은 셔플링을 수행한 이후의 2Nx2N PU 내 잔여 신호 분포 특성을 보여준다. 이는 셔플링을 수행한 PU의 서브블록 별 잔여 신호 분포가 DST-7의 첫번째 기저 벡터에 적합한 잔여 신호 분포임을 보여준다. 즉, 각 서브블록 내 잔여 신호가 (0, 0) 위치에서 멀어질수록 더 큰 값을 갖기 때문에 변환 수행 시, DST-7를 통해 주파수 변환된 변환 계수 값들이 저주파수 영역에 집중되어 나타날 수 있다.
아래와 같은 수학식 6은 PU에서 쿼드트리 구조로 분할된 4개의 서브블록에서 각각의 서브블록의 PU 내의 위치에 따른 셔플링 수행 방법을 나타낸다.
Figure PCTKR2017007363-appb-M000006
여기서, Wk, Hk는 각각 PU에서 k번째 서브블록(k ∈{blk0,blk1,blk2,blk3})의 너비 또는 높이를 의미하고, blk0~blk3은 PU에서 쿼드트리 구조로 분할된 각 서브블록을 의미한다. 그리고, x, y 는 각 서브블록 내에서 가로, 세로 위치를 의미하고, a(x,y), b(x,y), c(x,y), d(x,y)는 도 17의 상단 블록과 같이 각 잔여 신호의 셔플링 수행 전 위치를, a'(x,y), b'(x,y), c'(x,y), d'(x,y)는 도 17의 하단 블록과 같이 셔플링을 통해 변경된 잔여 신호의 위치를 나타낸다.
도 18은 본 발명에 따른 서브 블록의 4x4 잔여 데이터 재배열의 일 예를 도시한 도면이다.
도 18을 참조하면, 서브 블록은 8x8 예측 블록에 속한 복수의 서브 블록 중 어느 하나를 의미한다. 도 18(a)는 재배열 전 원본 잔여 데이터의 위치를, 도 18(b)는 잔여 데이터의 재배열된 위치를 나타낸다.
도 18(c)을 참조하면, 잔여 데이터의 값은 (0,0) 위치에서 (3,3)의 위치로 갈수록 점진적으로 증가될 수 있다. 여기서, 각 서브 블록 내 수평 및/또는 수직 1차원의 잔여 데이터는 도 13에서 도시한 기저 벡터의 형태로 데이터 분포를 가질 수 있다.
즉, 본 발명에 따른 셔플링은 잔여 데이터 분포가 전술한 DST-7 기저 벡터의 형태에 적합하도록 각 서브 블록의 잔여 데이터를 재배열할 수 있다.
각 서브 블록에 대한 셔플링 이후에 DST-7 변환이 각 서브 블록 단위로 재배열된 데이터에 적용될 수 있다.
한편, TU의 뎁스(depth, 깊이)에 기반하여, 서브 블록은 추가적으로 쿼드트리 구조로 분할(partitioning)되거나, 재배열 과정이 선택적으로 수행될 수 있다. 예를 들어, TU의 뎁스가 2인 경우, 2Nx2N PU에 속한 NxN 서브 블록은 N/2xN/2 블록으로 분할될 수 있고, 재배열 과정이 각 N/2xN/2 블록에 적용될 수 있다. 여기서, 쿼드트리 기반의 TU 분할은 최소 TU 크기가 될 때까지 반복적으로 수행될 수 있다.
또한, TU의 뎁스가 0인 경우, 2Nx2N 블록에 DCT-2 변환이 적용될 수 있다. 이때 잔여 데이터의 재배열은 수행하지 않을 수 있다.
한편, 본 발명에 따른 SDST 방법은 PU 블록 내 잔여 신호의 분포 특징을 이용하기 때문에 SDST를 수행하는 TU의 분할 구조는 PU를 기준으로 쿼드트리 구조로 분할되는 것으로 정의될 수 있다.
도 19(a) 및 도 19(b)는 본 발명에 따른 코딩 유닛(CU)의 예측 유닛(PU) 모드에 따른 변환 유닛(TU) 분할 구조와 변환 유닛(TU)의 셔플링(shuffling) 방법을 도시한 도면이다. 도 19(a) 및 도 19(b)에서는 인터 예측된 PU의 비대칭 분할 모드(2NxnU, 2NxnD, nRx2N, nLx2N)별 TU 깊이에 따른 TU의 쿼드트리 분할 구조를 보여준다.
도 19(a) 및 도 19(b)를 참조하면, 각 블록의 굵은 실선은 CU 내 PU를 나타내고, 얇은 실선은 TU를 나타낸다. 그리고, 각 TU 내 S0, S1, S2, S3는 상술한 수학식 6에 정의된 TU 내 잔여 신호의 셔플링 방법을 나타낸다.
한편, 도 19(a) 및 도 19(b)에서 각 PU의 깊이 0 TU는 해당 PU와 블록 크기가 같다(예컨데, 2Nx2N PU 에서 깊이 0 TU의 크기는 PU의 크기와 같다). 여기서, 깊이 0 TU 내 잔여 신호에 대한 셔플링은 도 23의 설명과 같이 후술하도록 한다.
또한, CU, PU, TU 중 적어도 하나 이상이 직사각형 형태(예컨대, 2NxnU, 2NxnD, nRx2N, nLx2N)를 가질 경우에, 잔여 신호 재배열 전에 CU, PU, TU 중 적어도 하나 이상을 2개, 4개, 6개, 8개, 16개 등 N개의 서브블록으로 분할하고, 분할된 서브블록에 잔여 신호 재배열을 적용할 수 있다.
또한, CU, PU, TU 중 적어도 하나 이상이 정사각형 형태(예컨대, 2Nx2N, NxN)를 가질 경우에, 잔여 신호 재배열 전에 CU, PU, TU 중 적어도 하나 이상을 4개, 8개, 16개 등 N개의 서브블록으로 분할하고, 분할된 서브블록에 잔여 신호 재배열을 적용할 수 있다.
또한, 상기 TU가 CU 혹은 PU로부터 분할될 경우, TU가 최상위 깊이인 경우(분할되지 않는 경우), TU를 2개, 4개, 6개, 8개, 16개 등 N개의 서브블록으로 분할한 후, 분할된 서브블록 단위로 잔여 신호 재배열을 수행할 수 있다.
상기 예에서 CU, PU, TU는 각각 다른 형태 혹은 크기를 가질 경우에 잔여 신호 재배열을 수행하는 예를 나타냈지만, 상기 잔여 신호 재배열은 CU, PU, TU 중 적어도 2개 이상이 같은 형태 혹은 크기를 가질 경우에도 적용될 수 있다.
한편, 도 19에서는 인터 예측된 PU의 비대칭 분할 모드에 대해 설명하지만 이에 한정되지 않고, PU의 대칭 분할 모드(2NxN, Nx2N)에도 상기 TU의 분할 및 TU의 셔플링을 적용할 수 있다.
셔플링이 수행 된 PU 내 각 TU에 대하여 DST-7 변환을 수행할 수 있다. 이때, CU, PU, TU는 모두 동일한 크기와 형태를 가질 경우에 하나의 블록에 대해서 DST-7 변환을 수행할 수 있다.
인터 예측 된 PU 블록의 잔여 신호 분포 특징을 고려하면, CU의 크기와 PU 분할 모드에 상관없이 DCT-2 변환을 수행하는 것보다 셔플링 이후 DST-7 변환을 수행하는 것이 더 효율적인 변환 방법일 수 있다.
변환 이후 변환 계수들의 분포가 저주파수 성분(특히, DC 성분) 근처에 더욱 많이 분포한다는 것은, i) 양자화 이후 에너지 손실의 최소화, ii) 엔트로피 코딩 과정에서 bit 사용량 절감 관점에서 잔여 신호 분포가 그렇지 않은 경우보다 높은 압축 효율을 보임을 알 수 있다.
도 20은 본 발명에 따른 2Nx2N 예측 유닛(PU)의 잔여 신호 분포에 따른 DCT-2 변환과 SDST 변환 수행 결과를 도시한 도면이다.
도 20의 좌측에 도시된 도면은 CU의 PU 분할 모드가 2Nx2N일 때 잔여 신호가 중앙에서 경계로 갈수록 증가하는 분포를 나타낸다. 또한, 도 20의 중간에 도시된 도면은 PU 내 깊이 1의 TU에 대하여 DCT-2 변환을 수행한 잔여 신호의 분포를 보여주고, 도 20의 우측에 도시된 도면은 PU 내 깊이 1의 TU에 대하여 셔플링 수행 후 DST-7 변환(SDST)을 수행한 잔여 신호 분포를 보여준다.
도 20을 참조하면, 위에서 언급한 잔여 신호 분포 특성을 갖는 PU의 TU에 SDST를 수행하였을 때의 계수 분포가 DCT-2를 수행하였을 때의 계수 분포에 비해 좀 더 많은 계수들이 저주파수 성분 근처에 밀집하고, 고주파 성분 쪽에서는 더 작은 계수 값이 발생하는 것을 알 수 있다. 이러한 변환 특성에 근거하여 인터 예측 된 PU의 잔여 신호를 변환 수행 시 DCT-2 대신 SDST를 수행함으로써 더 높은 압축 효율을 보임을 알 수 있다.
DST-7 변환이 수행되는 블록의 단위는 PU에서 정의된 TU 단위로 SDST를 수행하며, TU의 분할 구조는 상술한 도 19과 같이 PU 단위에서 최대 깊이까지 쿼드트리 분할 혹은 이진트리 분할이 가능하다. 이는 DST-7 변환이 정사각형 블록에 대하여 수행 될 뿐만 아니라, 직사각형 블록에 대하여도 셔플링 후 수행 될 수 있음을 의미할 수 있다.
도 21은 본 발명에 따른 SDST 과정을 도시한 도면이다. TU의 잔여 신호 변환에 있어서(S2110), 먼저 예측 모드가 인터 모드인 PU에 대하여 PU 내 분할된 TU에 대한 셔플링을 수행할 수 있다(S2120). 그리고, 셔플링 된 TU에 대하여 DST-7 변환을 수행하고(S2130), 양자화(quantization, S2140) 및 일련의 이후 과정을 수행하는 순서로 SDST 과정이 진행될 수 있다.
한편, 예측 모드가 인트라 모드인 블록에 대해서도 셔플링 및 DST-7 변환을 수행할 수 있다.
이하에서는, 부호화기에서 SDST 변환을 구현하는 일 실시 예로, i)인터 예측된 PU 내 모든 TU에 대해 SDST를 수행하는 방법 및 ii)율-왜곡 최적화(Rate-Distortion Optimization)을 통해 SDST 또는 DCT-2를 선택적으로 수행하는 방법에 대하여 설명하도록 한다. 이하의 방법에서는 인터 예측된 블록에 대해서 설명하고 있지만, 이에 한정되는 것은 아니며 인트라 예측된 블록에도 하기의 방법이 적용될 수 있다.
도 22는 본 발명에 따른 화면 간 예측된 코딩 유닛(CU)의 예측 유닛(PU) 분할 모드(partition mode)에 따른 변환 유닛(TU) 분할 및 잔여 절대값의 크기분포 특성을 도시한 도면이다.
도 22를 참조하면, 인터 예측 모드에서 TU는 CU로부터 최대 뎁스까지 쿼드트리 분할 혹은 이진트리 분할이 가능하고, PU의 partition mode는 총 K가지 경우가 존재할 수 있다. 여기서, K는 양의 정수이며, 도 22에서 K는 8이다.
본 발명에 따른 SDST는 도 15에서 설명한 바와 같이 인터 예측된 CU 내 PU에서의 잔여 신호 분포 특성을 이용한다. 또한, TU는 PU를 기준으로 쿼드트리 구조 혹은 이진트리 구조로 분할될 수 있으며, 이는 깊이가 0인 TU는 PU에 대응될 수 있고, 깊이가 1인 TU는 PU를 한번 쿼드트리 구조 혹은 이진트리 구조로 분할한 각 서브블록에 대응될 수 있다.
도 22의 각 블록은 인터 예측된 CU의 각 PU 분할 모드에 따라 TU 깊이 2까지 분할되는 형태를 보여준다. 여기서, 굵은 실선은 PU을 나타내며, 얇은 실선은 TU를 나타내고, 각 TU의 화살표 방향은 해당 TU 내 잔여 신호 값이 화살표의 머리 방향으로 향할수록 커지는 것을 나타낼 수 있다. 각 TU는 PU 내 위치에 따라 상기 셔플링 단계에 관한 상기 설명에서 언급된 셔플링을 수행할 수 있다.
특히 TU 깊이 0인 블록의 경우, 셔플링 단계에 관하여 상기에서 제시한 방법 이외에도 다양한 방법으로 셔플링을 수행할 수 있다.
그 중 하나는 PU 블록의 가운데 위치의 잔여 신호부터 스캐닝하기 시작하여 원을 그리며 넓어지는 방향으로 주위의 잔여 신호를 스캐닝하고, 스캐닝한 잔여 신호를 다시 PU의 (0,0) 위치부터 지그재그(zig-zag) 스캐닝 순으로 재배치하는 방법이다.
도 23은 위와 같은 예측 유닛(PU) 내 깊이(depth)값이 0인 변환 유닛(TU)의 잔여 신호 스캐닝(scanning) 순서와 재배치 순서를 보여준다.
도 23(a)와 도 23(b)는 셔플링을 위한 스캐닝 순서를 도시하고, 도 23(c)는 SDST를 위한 재배열 순서를 도시한다.
셔플링된 각 TU 내 잔여 신호는 DST-7 변환이 수행되고, 양자화 및 엔트로피 부호화 등이 수행될 수 있다. 이와 같은 셔플링 방법은 PU 분할 모드에 따른 TU 내 잔여 신호 분포 특성을 이용한 것으로, 다음 단계인 DST-7 변환의 효율 증대를 위해 잔여 신호 분포를 최적화할 수 있다.
인코더에서 인터 예측된 PU 내 모든 TU에 대해 SDST 수행은 상술한 도 21의 SDST 과정에 따라 수행될 수 있다. 인터 예측된 CU의 PU 분할 모드에 따라 도 22와 같은 형태로 PU에서 최대 깊이 2까지 TU 분할이 수행될 수 있고, 각 TU 내 잔여 신호는 도 22의 TU 내 잔여 신호 분포 특성을 이용하여 셔플링을 수행할 수 있다. 이후 DST-7 변환 커널을 이용한 변환 수행 후 양자화 및 엔트로피 부호화 등을 수행할 수 있다.
디코더는 인터 예측된 PU 내 TU의 잔여 신호 복원 수행 시, 인터 예측된 PU의 각 TU에 대하여 DST-7 역변환을 수행하고, 복원된 잔여 신호를 역 셔플링(inverse shuffling)하여 복원된 잔여 신호를 얻을 수 있다. 이러한 SDST 방법은 인터 예측된 PU 내 모든 TU의 변환 방법에 SDST를 적용하기 때문에 추가적으로 디코더에 전송해야 하는 플래그(flag) 또는 정보가 없다는 장점이 있다. 즉, SDST 방법에 대한 별도의 시그널링 없이 상기 SDST 방법이 수행될 수 있다.
한편, 인터 예측된 PU 내 모든 TU에 대해 SDST 수행하는 경우라도 셔플링 단계에 관하여 상기에서 설명한 잔여 신호의 재배열 방법 중 일부를 최적의 재배열 방법으로 부호화기에서 결정하여 결정된 재배열 방법에 대한 정보를 복호화기로 전송할 수 있다.
다른 실시예로서, SDST 수행 방법으로 RDO를 통하여 해당 PU의 변환 방법을 DCT-2와 SDST 중 어느 하나를 선택하여 적용하는 방법에 대해 설명하도록 한다. 이 방법은 전술한 인터 예측된 PU 내 모든 TU에 대해 SDST 수행하는 실시예에 비해 부호화기에서 연산량은 증가할 수 있지만, DCT-2와 SDST 중 더 효율적인 변환 방법을 선택하기 때문에 앞의 방법보다 높은 압축 효율을 보일 수 있다.
도 24는 본 발명에 따른 율-왜곡 최적화(RDO)를 통한 DCT-2 또는 SDST 선택 인코딩 과정을 나타내는 순서도이다.
도 24를 참조하면, TU의 잔여 신호 변환에 있어서(S2410), 인터 모드로 예측을 수행하는 PU 내 각 TU에 DCT-2를 수행하여 얻어진 TU의 cost(S2420)와 SDST를 수행(S2430 및 S2440)하여 얻어진 TU의 cost를 비교하여 해당 TU의 최적의 변환 모드(DCT-7 혹은 SDST)를 율-왜곡 관점에서 결정할 수 있다(S2450). 그리고, 결정된 변환 모드(transform mode)에 따라 변환된 TU에 양자화(S2460) 및 엔트로피 부호화 등이 진행될 수 있다.
한편, SDST 또는 DCT-2를 적용하는 TU는 아래 조건들 중 어느 하나를 만족하는 경우에만 RDO를 통해 최적의 변환 모드를 선택할 수 있다.
i) DCT-2 및 SDST를 수행하는 TU는 PU 분할 모드와 상관없이 CU를 기준으로 쿼드트리 형태 또는 이진트리 형태 또는 CU 크기로 분할되어야 한다.
ii) DCT-2 및 SDST를 수행하는 TU는 PU 분할 모드에 따라 PU로부터 쿼드트리 형태 또는 이진트리 형태 또는 PU 크기로 분할되어야 한다.
iii) DCT-2 및 SDST를 수행하는 TU는 PU 분할 모드와 상관없이 CU를 기준으로 분할되지 않는다.
조건 i)는 PU 분할 모드에 상관없이 CU에서 쿼드트리 형태 또는 이진트리 형태 또는 CU 크기로 분할 된 TU에 대하여 율-왜곡 최적화 관점에서 DCT-2 혹은 SDST를 변환 모드로 선택하는 방법이다.
조건 ii)는 전술한 인터 예측된 PU 내 모든 TU에 대해 SDST 수행하는 실시 예에서 언급한 PU 분할 모드에 따라 쿼드트리 형태 또는 이진트리 형태 또는 PU 크기로 분할된 TU에 DCT-2 및 SDST를 수행하고, 이를 통한 cost를 이용하여 TU의 변환 모드를 결정한다.
조건 iii)는 PU 분할 모드에 관계 없이, TU와 동일한 크기를 가지는 CU 단위에서 CU 혹은 TU를 분할하지 않고, DCT-2 및 SDST를 수행하여 TU의 변환 모드로 결정한다.
특정 PU 분할 모드의 깊이 0 TU 블록에 대한 RD cost를 비교할 때, 깊이 0 TU에 대한 SDST를 수행한 결과에 대한 cost의 총합과, 깊이 0 TU에 대한 DCT-2를 수행한 결과에 대한 cost 비교를 통해, 깊이 0 TU의 변환 모드를 선택할 수 있다.
도 25는 본 발명에 따른 DCT-2 또는 SDST 를 선택하여 디코딩하는 과정을 나타내는 순서도이다.
도 25를 참조하면, 전송된 SDST flag를 TU마다 참조할 수 있다(S2510). 여기서, SDST flag는 변환 모드로 SDST를 사용하는지 여부를 지시하는 플래그일 수 있다.
SDST flag가 true인 경우(S2520-Yes), TU의 변환 모드는 SDST mode로 결정되고, TU 내 잔여 신호에 DST-7 역 변환을 수행하고(S2530), DST-7 역 변환이 수행된 TU 내 잔여 신호에 대해 TU 내 PU의 위치에 따라 상술한 수학식 6을 이용한 역 셔플링을 수행하여(S2540) 최종적으로 복원된 잔여 신호를 획득할 수 있다(S2560).
한편, SDST flag가 true가 아닌 경우(S2520-No), TU의 변환 모드는 DCT-2 mode로 결정되고, TU 내 잔여 신호에 DCT-2 역 변환을 수행하여(S2550) 복원된 잔여 신호를 획득할 수 있다(S2560).
SDST 방법이 사용되는 경우, 잔여 데이터가 재배열될 수 있다. 여기서, 잔여 데이터는 인터 예측된 PU에 대응되는 잔여 데이터를 의미할 수 있다. 분리 속성(separable property)을 사용하여 DST-7으로부터 유도된 정수 변환을 SDST의 방법으로 사용할 수 있다.
한편, DCT-2 또는 DST-7의 선택적 이용을 위해 sdst_flag가 시그널링(signaling)될 수 있다. sdst_flag는 TU 단위로 시그널링될 수 있다. sdst_flag는 SDST 수행 여부를 식별하기 위해 요구됨을 나타낼 수 있다.
도 26은 본 발명에 따른 SDST를 이용한 디코딩 과정을 나타내는 순서도이다.
도 26을 참조하면, sdst_flag는 TU 단위로 시그널링엔트로피 복호화될 수 있다(S2610).
우선, TU의 뎁스가 0인 경우(S2620-Yes), SDST는 사용되지 않고, DCT-2 사용되어 TU를 복원할 수 있다(S2670 및 S2680). 이는 SDST는 TU의 뎁스가 1에서 최대 TU 뎁스값 사이에서 수행될 수 있기 때문이다.
또한, TU의 뎁스가 0이 아니라도(S2620-No) TU의 변환 모드가 변환 스킵 모드인 경우 및/또는 TU의 부호화 블록 플래그(cbf,coded block flag) 값이 0인 경우(S2630-Yes), 역변환을 수행하지 않고 TU를 복원할 수 있다(S2680).
한편, TU의 뎁스가 0이 아니고(S2620-No), TU의 변환 모드가 변환 스킵 모드가 아닌 경우 및 TU의 cbf 값이 0이 아닌 경우(S2630-No), sdst_flag 값을 확인할 수 있다(S2640).
여기서, sdst_flag의 값이 1인 경우(S2640-Yes), DST-7 기반의 역변환이 수행되고(S2650), TU의 잔여 데이터에 대한 역 셔플링을 통해(S2660) TU를 복원할 수 있다(S2680). 반면, sdst_flag의 값이 0인 경우(S2640-No), DCT-2 기반의 역변환을 수행하여(S2670) TU를 복원할 수 있다(S2680).
여기서, 셔플링 혹은 재배열의 대상이 되는 신호는 역변환 전 잔여 신호, 역양자화 전 잔여 신호, 역변환 이후 잔여 신호, 역양자화 이후 잔여 신호, 복원된 잔여 신호, 복원된 블록 신호 중 적어도 하나 이상일 수 있다.
한편, 도 26에서는 sdst_flag를 TU 단위로 시그널링한다고 설명하였으나, sdst_flag는 TU의 변환 모드 또는 TU의 cbf 값 중 적어도 하나에 기초하여 선택적으로 시그널링될 수 있다. 예를 들어, TU의 변환 모드가 변환 스킵 모드인 경우 및/또는 TU의 cbf 값이 0인 경우, sdst_flag는 시그널링되지 않을 수 있다. 또한, TU의 뎁스가 0인 경우에도 sdst_flag는 시그널링되지 않을 수 있다.
한편, sdst_flag를 TU 단위로 시그널링한다고 설명하였으나, 소정의 단위로 시그널링 될 수 있다. 예컨대, 비디오, 시퀀스, 픽쳐, 슬라이스, 타일, 부호화 트리 유닛, 부호화 유닛, 예측 유닛, 변환 유닛 중 적어도 하나 이상의 단위로 sdst_flag를 시그널링할 수 있다.
도 25의 SDST flag, 도 26의 sdst_flag의 실시 예처럼 선택된 변환 모드(transform mode) 정보는 TU 단위에서 n-bit 플래그(n은 1이상의 양의 정수)를 통해 엔트로피 부호화/복호화될 수 있다. 변환 모드 정보는 TU가 DCT-2를 통해 변환을 수행하였는지, SDST를 통해 변환을 수행하였는지, DST-7을 통해 변환을 수행하였는지 등 적어도 하나 이상을 지시할 수 있다.
인터 예측 된 PU 내 TU일 경우에만 해당 변환 모드 정보를 bypass mode로 엔트로피 부호화/복호화를 수행할 수 있다. 또한 transform skip mode이거나 RDPCM(Residual Differential PCM) mode, lossless mode 인 경우 중 적어도 하나 이상의 경우에도 변환 모드 정보의 엔트로피 부호화/복호화는 생략되고, 시그널링되지 않을 수 있다.
또한, 블록의 부호화 블록 플래그(coded block flag)가 0인 경우에도 변환 모드 정보의 엔트로피 부호화/복호화는 생략되고, 시그널링되지 않을 수 있다. 부호화 블록 플래그가 0인 경우 디코더에서 역변환 과정이 생략되므로 변환 모드 정보가 디코더에서 존재하지 않아도 해당 블록의 복원이 가능하다.
다만, 변환 모드 정보는 플래그를 통해서 변환 모드를 나타내는 것으로 한정되지 아니하며, 기-정의된 테이블과 인덱스의 형태로 구현될 수도 있다. 여기서, 기-정의된 테이블은 인덱스 별로 이용 가능한 변환 모드가 정의된 것일 수 있다.
또한, DCT 혹은 SDST의 변환은 가로 방향과 세로 방향으로 분리되어 수행될 수 있다. 가로 방향과 세로 방향에 대해서 서로 동일한 변환 모드가 이용될 수도 있고, 서로 상이한 변환 모드가 이용될 수도 있다.
또한, 가로 방향과 세로 방향 각각에 대해 DCT-2를 사용했는지, SDST를 사용했는지, DST-7를 사용했는지에 대한 변환 모드 정보를 각각 엔트로피 부호화/복호화할 수 있다.
또한, 변환 모드 정보는 CU, PU, TU 단위 중 적어도 하나 이상의 단위에서 엔트로피 부호화/복호화될 수 있다.
또한, 변환 모드 정보는 휘도 성분 혹은 색차 성분에 따라 전송될 수 있다. 다시 말하여, 변환 모드 정보는 Y 성분 혹은 Cb 성분 혹은 Cr 성분에 따라 전송될 수 있다. 예를 들어, Y 성분에 대해서 DCT-2를 수행했는지, SDST를 수행했는지에 대한 변환 모드 정보가 시그널링되는 경우, Cb 성분 및 Cr 성분 중 적어도 하나 이상에서 별도의 변환 모드 정보 시그널링 없이 Y 성분에서 시그널링되는 변환 모드 정보를 해당 블록의 변환 모드로 이용할 수 있다.
여기서, 변환 모드 정보는 문맥 모델(context model)을 이용하는 산술 부호화 방법으로 엔트로피 부호화/복호화될 수 있다. 만약, 변환 모드 정보가 기-정의된 테이블과 인덱스의 형태로 구현될 경우, 여러 개의 빈(bin)들 중 전부 혹은 일부 빈들에 대해서만 문맥 모델을 이용하는 산술 부호화 방법으로 엔트로피 부호화/복호화될 수 있다.
또한, 변환 모드 정보는 블록 크기에 따라 선택적으로 엔트로피 부호화/복호화될 수 있다. 예를 들어, 현재 블록의 크기가 64x64 이상일 경우 변환 모드 정보는 엔트로피 부호화/복호화되지 않고, 32x32 이하일 경우에 변환 모드 정보는가 엔트로피 부호화/복호화될 수 있다.
또한, 현재 블록 내에 0이 아닌 변환 계수 혹은 양자화 레벨이 1개 존재할 경우, 변환 모드 정보를 엔트로피 부호화/복호화하지 않고, DCT-2 혹은 DST-7 혹은 SDST 방법 중 한가지 방법을 수행할 수 있다. 이때, 상기 0이 아닌 변환 계수 혹은 양자화 레벨에 대한 블록 내의 위치에 상관 없이 변환 모드 정보를 엔트로피 부호화/복호화하지 않을 수 있다. 또한, 상기 0이 아닌 변환 계수 혹은 양자화 레벨이 블록 내 좌상단 위치에 존재할 경우에만 변환 모드 정보를 엔트로피 부호화/복호화하지 않을 수 있다.
또한, 현재 블록 내에 0이 아닌 변환 계수 혹은 양자화 레벨이 J개 이상 존재할 경우, 변환 모드 정보를 엔트로피 부호화/복호화할 수 있다. 이때, J는 양의 정수이다.
또한, 변환 모드 정보는 콜 블록(Collocated Block)의 변환 모드에 따라 일부 변환 모드의 사용이 제한되거나, 변환 정보의 이진화(Binarization) 방법이 콜 블록의 변환 모드를 보다 적은 비트로 표현하는 방식으로 달라질 수 있다.
상술한 SDST는 현재 블록의 예측 모드, TU 뎁스(깊이), 크기 또는 형태 중 적어도 하나에 기초하여 제한적으로 이용될 수도 있다.
예를 들어, SDST는 현재 블록이 인터 모드로 부호화된 경우에 이용될 수 있다.
SDST가 허용되는 최소/최대 뎁스가 정의될 수 있다. 이 경우, 현재 블록의 뎁스가 최소 뎁스와 같거나 큰 경우에 SDST가 이용될 수 있고, 또는 현재 블록의 뎁스가 최대 뎁스와 같거나 작은 경우에 SDST가 이용될 수도 있다. 여기서, 최소/최대 뎁스는 고정된 값일 수도 있고, 최소/최대 뎁스를 나타내는 정보에 기초하여 가변적으로 결정될 수도 있다. 최소/최대 뎁스를 나타내는 정보는 인코더로부터 시그널링될 수도 있고, 현재/주변 블록의 속성(예컨대, 크기, 뎁스 및/또는 형태)에 기초하여 디코더에서 유도될 수도 있다.
SDST가 허용되는 최소/최대 크기가 정의될 수도 있다. 마찬가지로, 현재 블록의 크기가 최소 크기와 같거나 큰 경우에 SDST가 이용될 수 있고, 또는 현재 블록의 크기가 최대 크기와 같거나 작은 경우에 SDST가 이용될 수도 있다. 여기서, 최소/최대 크기는 고정된 값일 수도 있고, 최소/최대 크기를 나타내는 정보에 기초하여 가변적으로 결정될 수도 있다. 최소/최대 크기를 나타내는 정보는 인코더로부터 시그널링될 수도 있고, 현재/주변 블록의 속성(예컨대, 크기, 뎁스 및/또는 형태)에 기초하여 디코더에서 유도될 수도 있다. 예를 들어, 현재 블록이 4x4인 경우 DCT-2를 변환 방법으로 사용하고, DCT-2를 사용했는지 SDST를 사용했는지에 대한 변환 모드 정보를 엔트로피 부호화/복호화하지 않을 수 있다.
SDST가 허용되는 블록의 형태가 정의될 수도 있다. 이 경우, 현재 블록의 형태가 정의된 블록의 형태인 경우에 SDST가 이용될 수 있다. 또는 SDST가 허용되지 않는 블록의 형태가 정의될 수 있다. 이 경우, 현재 블록의 형태가 정의된 블록의 형태인 경우에 SDST가 이용되지 않을 수 있다. SDST가 허용되는 또는 허용되지 않는 블록의 형태는 고정된 것일 수도 있고, 이에 관한 정보가 인코더로부터 시그널링 될 수도 있다. 또는 현재/주변 블록의 속성(예컨대, 크기, 뎁스 및/또는 형태)에 기초하여 디코더에서 유도될 수도 있다. SDST가 허용되는 또는 허용되지 않는 블록의 형태는 예컨대, MxN 블록에 있어서, M, N 및/또는 M과 N의 비율을 의미할 수 있다.
또한, TU의 깊이가 0인 경우에는 변환 방법으로 DCT-2 혹은 DST-7을 사용하고, 어떤 변환 방법을 사용했는지에 대한 변환 모드 정보를 엔트로피 부호화/복호화할 수 있다. 만약, DST-7을 변환 방법으로 사용할 경우, 잔여 신호의 재배열 과정을 수행할 수 있다. 또한, TU의 깊이가 1이상인 경우에는 변환 방법으로 DCT-2 혹은 SDST를 사용하고, 어떤 변환 방법을 사용했는지에 대한 변환 모드 정보를 엔트로피 부호화/복호화할 수 있다.
또한, CU 및 PU의 분할 형태 혹은 현재 블록의 형태에 따라 변환 방법을 선택적으로 사용할 수 있다.
일 실시 예에 따르면, CU 및 PU의 분할 형태 혹은 현재 블록의 형태가 2Nx2N인 경우 DCT-2를 사용하고, 나머지 분할 및 블록 형태에 대해서는 DCT-2 또는 SDST를 선택적으로 사용할 수 있다.
그리고, CU 및 PU의 분할 형태 혹은 현재 블록의 형태가 2NxN 혹은 Nx2N인 경우 DCT-2를 사용하고, 나머지 분할 및 블록 형태에 대해서는 DCT-2 또는 SDST를 선택적으로 사용할 수 있다.
그리고, CU 및 PU의 분할 형태 혹은 현재 블록의 형태가 nRx2N 혹은 nLx2N 혹은 2NxnU 혹은 2NxnD인 경우 DCT-2를 사용하고, 나머지 분할 및 블록 형태에 대해서는 DCT-2 또는 SDST를 선택적으로 사용할 수 있다.
한편, 현재 블록에서 분할된 블록 단위로 SDST 혹은 DST-7가 수행될 때, 분할된 블록 단위로 변환 계수(양자화 레벨)에 대한 스캐닝 및 역스캐닝이 수행될 수 있다. 또한, 현재 블록에서 분할된 블록 단위로 SDST 혹은 DST-7가 수행될 때, 분할되지 않은 현재 블록 단위로 변환 계수(양자화 레벨)에 대한 스캐닝 및 역스캐닝이 수행될 수 있다.
또한, 상기 SDST 혹은 DST-7을 이용한 변환/역변환은 현재 블록의 화면 내 예측 모드(방향), 현재 블록의 크기, 현재 블록의 성분(휘도 성분인지 색차 성분인지) 중 적어도 하나 이상에 따라 수행될 수 있다.
그리고, 상기 SDST 혹은 DST-7을 이용한 변환/역변환 시에 DST-7 대신 DST-1을 이용할 수 있다. 또한, 상기 SDST 혹은 DST-7을 이용한 변환/역변환 시에 DST-7 대신 DCT-4를 이용할 수 있다.
또한, 상기 DCT-2를 이용한 변환/역변환 시에 SDST 혹은 DST-7의 잔여 신호의 재배열에서 이용한 재배열 방법을 적용할 수 있다. 즉, DCT-2를 이용할 경우에도 잔여 신호의 재배열 혹은 소정의 각도를 이용한 잔여 신호의 회전을 수행할 수 있다.
이하에서, 셔플링 방법 및 시그널링 방법에 관한 다양한 변형례 및 실시예를 설명한다.
본 발명의 SDST는 변환 방법의 변경을 통한 영상 압축 효율 향상을 목적으로 한다. 잔여 신호의 셔플링을 통한 DST-7 수행은 PU 내 잔여 신호 분포 특성을 효과적으로 반영하기 때문에 높은 압축 효율을 보일 수 있다.
셔플링 단계에 관한 상기 설명에서 잔여 신호 재배열 방법에 대해 알아보았다. 아래에서는 상술한 잔여 신호 재배열을 위한 셔플링 방법 외에 다른 구현 방법에 대해 알아보도록 한다.
잔여 신호 재배열을 구현하는데 있어서 하드웨어 복잡도를 최소화하기 위하여 가로 플리핑(flipping)과 세로 플리핑 방법으로 잔여 신호 재배열 과정을 구현할 수 있다. 잔여 신호 재배열 방법 (1)~(4)은 다음과 같이 플리핑을 통해 구현될 수 있다.
(1) : r'(x,y)=r(x,y) ; 플리핑 수행 안함 (no flipping)
(2) : r'(x,y)=r(w-1-x,y) ; 가로 방향 플리핑
(3) : r'(x,y)=r(x,h-1-y) ; 세로 방향 플리핑
(4) : r'(x,y)=r(w-1-x,h-1-y) ; 가로 방향 및 세로 방향 플리핑
r'(x,y)는 재배열 후 잔여 신호며, r(x,y)는 재배열 이전 잔여 신호다. w와 h는 각각 블록의 너비와 높이를 의미하며, x,y는 블록에서의 잔여 신호 위치를 나타낸다. 플리핑을 사용하는 재배열 방법의 역 재배열 방법은 재배열 방법과 동일한 과정으로 수행될 수 있다. 즉, 가로 방향 플리핑을 사용하여 재배열된 잔여 신호는 다시 한번 가로 방향 플리핑을 수행함으로써 원래의 잔여 신호 배열로 복원될 수 있다. 부호화기에서 수행하는 재배열 방법과 복호화기에서 수행하는 역 재배열 방법은 서로 동일한 플리핑 방법일 수 있다.
상기 플리핑을 이용하는 잔여 신호 셔플링/재배열 방법은 현재 블록을 분할하지 않은 채로 사용할 수 있다. 즉, 상기 SDST 방법에서는 현재 블록(TU 등)을 서브블록(sub-block)으로 분할하고 서브블록 별로 DST-7을 사용하는 것을 설명하였지만, 플리핑을 이용하는 잔여 신호 셔플링/재배열 방법을 사용할 경우에는 현재 블록을 서브블록으로 분할하지 않고 현재 블록 전체 혹은 일부에 대해서 플리핑을 수행한 후 DST-7을 사용할 수 있다.
변환 모드 정보를 이용하여 플리핑을 이용하는 잔여 신호 셔플링/재배열 방법 사용 유무를 엔트로피 부호화/복호화할 수 있다. 예를 들어, 변환 모드 정보를 지시하는 플래그 비트가 제1 값을 가질 경우 플리핑을 이용하는 잔여 신호 셔플링/재배열 방법과 DST-7을 변환/역변환 방법으로 사용할 수 있고, 상기 플래그 비트가 제2 값을 가질 경우, 플리핑을 이용하는 잔여 신호 셔플링/재배열 방법이 아닌 다른 변환/역변환 방법을 사용할 수 있다. 이때, 변환 모드 정보는 블록 별로 엔트로피 부호화/복호화될 수 있다.
또한, 플리핑 방법 정보를 이용하여 상기 4가지 플리핑 방법들 (no flipping, 가로 방향 플리핑, 세로 방향 플리핑, 가로 방향 및 세로 방향 플리핑) 중 적어도 하나 이상은 플래그 혹은 인덱스 형태로 엔트로피 부호화/복호화될 수 있다. 즉, 플리핑 방법 정보에 대한 시그널링을 통해서 부호화기에서 수행한 플리핑 방법과 동일한 플리핑 방법을 복호화기에서 수행할 수 있다. 상기 변환 모드 정보는 플리핑 방법 정보를 포함할 수 있다.
또한, 잔여 신호 재배열 방법은 이전에 상술한 잔여 신호 재배열에 한정되지 아니하며, 블록 내 잔여 신호를 소정의 각도로 회전하여 셔플링을 구현할 수도 있다. 여기서의 소정의 각도는 0도, 90도, 180도, -90도, -180도, 270도, -270도, 45도, -45도, 135도, -135도 등을 의미할 수 있다. 이때, 각도에 대한 정보는 플래그 형태 혹은 인덱스 형태로 엔트로피 부호화/복호화될 수 있고, 상기 변환 모드 정보(transform mode)에 대한 시그널링 방법과 유사하게 수행될 수 있다.
또한, 상기 각도 정보는 엔트로피 부호화/복호화 시 현재 블록의 주변에 복원된 블록의 각도 정보로부터 예측 부호화/복호화될 수 있다. 각도 정보를 이용하여 재배열할 경우 현재 블록에 대해 분할 후 SDST 혹은 DST-7를 수행할 수도 있지만, 현재 블록에 대한 분할 없이 현재 블록 단위로 SDST 혹은 DST-7를 수행할 수 있다.
소정의 각도는 서브블록의 위치에 따라 상이하게 결정될 수 있다. 서브블록들 중 특정 위치(예를 들어, 첫번째 서브블록)의 서브블록에 대해서만 회전을 통해 재배열하는 방식을 제한적으로 이용할 수도 있다. 또한, 소정의 각도를 이용한 재배열은 현재 블록 전체에 대해 적용될 수 있다. 이때, 재배열의 대상이 되는 현재 블록은 역변환 전 잔여 블록, 역양자화 전 잔여 블록, 역변환 이후 잔여 블록, 역양자화 이후 잔여 블록, 복원된 잔여 블록, 복원된 블록 중 적어도 하나 이상일 수 있다.
한편, 잔여 신호 재배열 또는 회전과 동일한 효과가 나타나도록 변환을 위한 변환 매트릭스의 계수를 재배열하거나 회전하고, 이를 기-배열된 잔여 신호에 적용하여 변환을 수행할 수도 있다. 즉, 잔여 신호 재배열 대신 변환 매트릭스(행렬)에 대한 재배열을 이용해서 변환을 수행하여, 잔여 신호 재배열과 변환을 수행하는 방법과 동일한 효과를 얻을 수 있다. 이때, 변환 매트릭스의 계수의 재배열은 상술한 잔여 신호 재배열 방법들과 동일한 방법으로 수행될 수 있으며, 이에 필요한 정보들의 시그널링 방법도 상술한 잔여 신호 재배열 방법에 필요한 정보들의 시그널링 방법과 동일하게 수행될 수 있다.
한편, 셔플링 단계에 관한 상기 설명에서 언급된 잔여 신호 재배열 방법 중 일부를 최적의 재배열 방법으로 부호화기에서 결정하여 결정된 재배열 방법에 대한 정보를 복호화기로 전송할 수 있다. 일 예로, 4가지 재배열 방법을 사용한다면 부호화기는 잔여 신호 재배열 방법에 대한 정보를 2bit 만큼 복호화기로 전송할 수 있다.
또한, 사용하는 재배열 방법들 각각의 발생확률이 서로 다른 경우 발생확률이 높은 재배열 방법은 적은 비트를 사용하여 부호화 하고 발생확률이 낮은 재배열 방법은 상대적으로 많은 비트를 사용하여 부호화 할 수 있다. 일 예로, 4가지 재배열 방법을 발생확률이 높은 순서로 하여 truncated unary code로 부호화 할 수 있다 (0, 10, 110, 111).
그리고, 현재 CU의 예측 모드, PU의 화면내 예측 모드(방향), 주변 블록의 움직임 벡터 등 부호화 파라미터에 따라서 재배열 방법의 발생확률이 변할 수 있기 때문에, 부호화 파라미터에 따라 재배열 방법에 대한 정보의 부호화 방법을 다르게 사용할 수 있다. 일 예로, 화면 내 예측의 예측 모드에 따라서 재배열 방법의 발생확률이 다를 수 있기 때문에 각각의 인트라 모드에 대해 발생확률이 높은 재배열 방법에 적은 비트를 할당하고 발생확률이 낮은 재배열 방법에 높은 비트를 할당하거나, 경우에 따라 발생확률이 매우 적은 재배열 방법은 사용하지 않고 비트도 할당하지 않을 수 있다.
아래의 표 5는 CU의 예측 모드 및 PU의 화면내 예측 모드(방향)에 따라 잔여 신호 재배열 방법을 부호화 하는 방법에 대한 예시를 보인다.
예측 모드 화면내 예측 방향 잔여 신호 재배열 방법
(1) (2) (3) (4)
화면 내 Planar/DC 0 110 10 111
화면 내 수평 방향 혹은 수평 방향에 가까운 모드 0 - 1 -
화면 내 수직 방향 혹은 수직 방향에 가까운 모드 0 1 - -
화면 내 짝수 0 10 11 -
화면 내 홀수 0 - 10 11
화면 내 Otherwise 0 10 11 -
화면 간 - 00 01 10 11
표 5의 잔여 신호 재배열 방법 (1)~(4)는 이전에 설명한 잔여 신호 재배열을 위한 스캐닝/재배열 순서에 대한 인덱스, 소정의 각도 값에 대한 인덱스 혹은 소정의 플리핑 방법에 대한 인덱스 등 잔여 신호 재배열 방법을 특정할 수 있다.
상기 표 5와 같이, 현재 블록이 각 예측 모드 및 각 화면내 예측 모드(방향) 중 적어도 하나 이상에 해당할 경우, 적어도 한가지 이상의 재배열 방법이 인코더 및 디코더에서 사용될 수 있다.
예를 들어, 현재 블록이 인트라 모드며 화면내 예측 방향이 짝수일 경우, 잔여 신호 재배열 방법으로 no flipping, 가로 방향 플리핑, 세로 방향 플리핑 방법 중 적어도 하나 이상을 사용할 수 있다. 또한, 현재 블록이 인트라 모드며 화면내 예측 방향이 홀수일 경우, 잔여 신호 재배열 방법으로 no flipping, 세로 방향 플리핑, 가로 방향 및 세로 방향 플리핑 방법 중 적어도 하나 이상을 사용할 수 있다.
화면 내 예측의 Planar/DC 예측인 경우 4가지 방법을 발생 빈도에 근거하여 truncated unary code로 재배열 방법에 대한 정보를 엔트로피 부호화/복호화 할 수 있다.
화면 내 예측 방향이 수평 방향 혹은 수평 방향에 가까운 모드인 경우 (1), (3) 재배열 방법의 확률이 높을 수 있다. 이러한 경우 상기 두 개의 재배열 방법에 각각 1비트를 사용하여 재배열 방법에 대한 정보를 엔트로피 부호화/복호화할 수 있다.
화면 내 예측 방향이 수직 방향 혹은 수직 방향에 가까운 모드인 경우 (1), (2) 재배열 방법의 확률이 높을 수 있다. 이러한 경우 상기 두 방법에 각각 1비트를 사용하여 재배열 방법에 대한 정보를 엔트로피 부호화/복호화 할 수 있다.
화면 내 예측 방향이 짝수인 경우, (1), (2), (3) 재배열 방법에 대해서만 truncated unary code로 재배열 방법에 대한 정보를 엔트로피 부호화/복호화 할 수 있다.
화면 내 예측 방향이 홀수인 경우, (1), (3), (4) 재배열 방법에 대해서만 truncated unary code로 재배열 방법에 대한 정보를 엔트로피 부호화/복호화 할 수 있다.
기타 화면 내 예측 방향에 대해서는 (4)번 재배열 방법의 발생확률이 낮을 수 있으므로 (1),(2),(3) 재배열 방법에 대해서만 truncated unary code로 재배열 방법에 대한 정보를 엔트로피 부호화/복호화 할 수 있다.
화면 간 예측인 경우 (1)~(4) 재배열 방법의 발생확률을 동등하게 볼 수 있으며, 2bit의 fixed length code로 재배열 방법에 대한 정보를 엔트로피 부호화/복호화 할 수 있다.
이때, 각각의 부호화 빈값들은 산술 부호화/복호화를 사용할 수 있다. 또한, 각각의 부호화 빈값들은 산술 부호화를 사용하지 않고 bypass 모드로 엔트로피 부호화/복호화 될 수 있다.
도 27 및 도 28은 각각 본 발명에 따른 인코더 및 디코더에서 잔여 신호 재배열(residual rearrangement)이 수행되는 위치를 나타낸다.
도 27을 참조하면, 인코더에서는 DST-7 변환 과정 수행 전에 잔여 신호 재배열이 수행될 수 있다. 도 27에는 도시하지 않았지만, 인코더에서는 변환 과정과 양자화 과정 사이에 잔여 신호 재배열이 수행될 수 있으며, 양자화 과정 수행 후에 잔여 신호 재배열이 수행될 수 있다.
도 28을 참조하면, 디코더에서는 DST-7 역변환 과정 수행 후에 잔여 신호 재배열이 수행될 수 있다. 도 28에는 도시하지 않았지만, 디코더에서는 역양자화 과정과 역변환 과정 사이에 잔여 신호 재배열이 수행될 수 있으며 역양자화 과정 수행 전에 잔여 신호 재배열이 수행될 수 있다.
이상에서는 도 12 내지 도 28을 참조하여 본 발명에 따른 SDST 방법에 대해 설명하였다. 이하에서는 도 29 및 도 30을 참조하여 본 발명에 따른 SDST 방법이 적용된 복호화 방법, 부호화 방법, 복호화기, 부호화기 및 비트스트림에 대해 구체적으로 설명하도록 한다.
도 29는 본 발명에 따른 SDST 방법을 이용한 복호화 방법을 설명하기 위한 도면이다.
도 29를 참조하면, 먼저 현재 블록의 변환 모드를 결정하고(S2910), 현재 블록의 변환 모드에 따라 현재 블록의 잔여 데이터들을 역변환할 수 있다(S2920).
그리고, 현재 블록의 변환 모드에 따라 역변환된 현재 블록의 잔여 데이터들을 재배열할 수 있다(S2930).
여기서, 변환 모드는 SDST(Shuffling Discrete Sine Transform), SDCT(Shuffling Discrete cosine Transform), DST(Discrete Sine Transform) 및 DCT(Discrete Cosine Transform) 중 적어도 하나를 포함할 수 있다.
SDST 모드는 DST-7 변환 모드로 역변환을 수행하고, 역변환된 잔여 데이터들의 재배열을 수행하는 모드를 지시할 수 있다.
SDCT 모드는 DCT-2 변환 모드로 역변환을 수행하고, 역변환된 잔여 데이터들의 재배열을 수행하는 모드를 지시할 수 있다.
DST 모드는 DST-7 변환 모드로 역변환을 수행하고, 역변환된 잔여 데이터들의 재배열은 수행하지 않는 모드를 지시할 수 있다.
DCT 모드는 DCT-2 변환 모드로 역변환을 수행하고, 역변환된 잔여 데이터들의 재배열은 수행하지 않는 모드를 지시할 수 있다.
따라서, 현재 블록의 변환 모드가 SDST 및 SDCT 중 어느 하나인 경우에만, 상기 잔여 데이터들을 재배열하는 단계을 수행할 수 있다.
상술한 SDST 및 DST 모드에 대해 DST-7 변환 모드로 역변환을 수행한다고 설명하였으나, DST-1, DST-2 등 다른 DST 기반의 변환 모드를 이용할 수도 있다.
한편, 현재 블록의 변환 모드를 결정하는 단계(S2910)는 현재 블록의 변환 모드 정보를 비트스트림으로부터 획득하는 단계 및 변환 모드 정보에 기초하여 상기 현재 블록의 변환 모드를 결정하는 단계를 포함할 수 있다.
또한, 현재 블록의 변환 모드를 결정하는 단계(S2910)는 현재 블록의 예측 모드, 상기 현재 블록의 깊이 정보, 상기 현재 블록의 크기 및 상기 현재 블록의 형태 중 적어도 하나에 기초하여 결정할 수 있다.
구체적으로, 현재 블록의 예측 모드가 인터 예측 모드인 경우, 현재 블록의 변환 모드는 SDST 및 SDCT 중 어느 하나로 결정될 수 있다.
한편, 역변환된 현재 블록의 잔여 데이터들을 재배열하는 단계(S2930)는, 역변환된 현재 블록내에 배열된 잔여 데이터들을 제1 방향 순서대로 스캐닝하는 단계 및 제1 방향으로 스캐닝한 잔여 데이터들을 제2 방향 순서대로 상기 역변환된 현재 블록내에 재배열하는 단계를 포함할 수 있다. 여기서, 제1 방향 순서는 래스터 스캔 순서(Raster scan order), 위-오른쪽 대각선 스캔 순서(Up-Right Digonal scan order), 수평 스캔 순서(Horizontal scan order), 수직 스캔 순서(Vertical scan order) 중 어느 하나일 수 있다. 또한, 제1 방향 순서는 아래와 같이 정의될 수 있다.
(1) 상단 행(row)에서 하단 행으로 스캔하되, 하나의 행에서는 좌측에서 우측으로 스캔
(2) 상단 행(row)에서 하단 행으로 스캔하되, 하나의 행에서는 우측에서 좌측으로 스캔
(3) 하단 행(row)에서 상단 행으로 스캔하되, 하나의 행에서는 좌측에서 우측으로 스캔
(4) 하단 행(row)에서 상단 행으로 스캔하되, 하나의 행에서는 우측에서 좌측으로 스캔
(5) 좌측 열(column)에서 우측 열로 스캔하되, 하나의 열에서는 상단에서 하단으로 스캔
(6) 좌측 열(column)에서 우측 열로 스캔하되, 하나의 열에서는 하단에서 상단으로 스캔
(7) 우측 열(column)에서 좌측 열로 스캔하되, 하나의 열에서는 상단에서 하단으로 스캔
(8) 우측 열(column)에서 좌측 열로 스캔하되, 하나의 열에서는 하단에서 상단으로 스캔
(9) 나선 형태로 스캔: 블록 내부(또는 외부)에서 블록 외부(또는 내부)로, 시계/반시계 방향으로 스캔
한편, 제2 방향 순서는 상술한 방향 중 어느 하나가 선택적으로 이용될 수 있다. 제1 방향과 제2 방향은 동일할 수도 있고, 서로 상이할 수도 있다.
또한, 역변환된 현재 블록의 잔여 데이터들을 재배열하는 단계(S2930)는, 현재 블록 내 서브 블록 단위로 재배열할 수 있다. 이 경우, 현재 블록 내의 서브 블록의 위치에 기초하여 잔여 데이터들을 재배열할 수 있다. 서브 블록의 위치에 기초하여 잔여 데이터들을 재배열하는 것은 상술한 수학식 6에서 자세히 설명하였는바 중복설명은 피하도록 한다.
또한, 역변환된 현재 블록의 잔여 데이터들을 재배열하는 단계(S2930)는, 역변환된 현재 블록내에 배열된 잔여 데이터들을 기정의된 각도로 회전하여 재배열할 수 있다.
또한, 역변환된 현재 블록의 잔여 데이터들을 재배열하는 단계(S2930)는, 역변환된 현재 블록내에 배열된 잔여 데이터들을 플리핑(flipping) 방법대로 플리핑하여 재배열할 수 있다. 이 경우, 현재 블록의 변환 모드를 결정하는 단계(S2910)는 플리핑 방법 정보를 비트스트림으로부터 획득하는 단계 및 플리핑 방법 정보에 기초하여 상기 현재 블록의 플리핑 방법을 결정하는 단계를 포함할 수 있다.
도 30은 본 발명에 따른 SDST 방법을 이용한 부호화 방법을 설명하기 위한 도면이다.
도 30을 참조하면, 현재 블록의 변환 모드를 결정할 수 있다(S3010).
그리고, 현재 블록의 변환 모드에 따라 현재 블록의 잔여 데이터들을 재배열할 수 있다(S3020).
그리고, 현재 블록의 변환 모드에 따라 재배열된 현재 블록의 잔여 데이터들을 변환할 수 있다(S3030).
여기서, 변환 모드는 SDST(Shuffling Discrete Sine Transform), SDCT(Shuffling Discrete cosine Transform), DST(Discrete Sine Transform) 및 DCT(Discrete Cosine Transform) 중 적어도 하나를 포함할 수 있다. SDST, SDCT, DST 및 DCT 모드에 대한 설명은 도 29에서 하였는 바 중복설명은 피하도록 한다.
한편, 현재 블록의 변환 모드가 SDST 및 SDCT 중 어느 하나인 경우에만, 잔여 데이터를 재배열하는 단계들을 수행할 수 있다.
또한, 현재 블록의 변환 모드를 결정하는 단계(S3010)는, 현재 블록의 예측 모드, 현재 블록의 깊이 정보, 현재 블록의 크기 및 현재 블록의 형태 중 적어도 하나에 기초하여 결정할 수 있다.
여기서, 현재 블록의 예측 모드가 인터 예측 모드인 경우, 현재 블록의 변환 모드는 SDST 및 SDCT 중 어느 하나로 결정될 수 있다.
한편, 현재 블록의 잔여 데이터들을 재배열하는 단계(S3020)는, 현재 블록내에 배열된 잔여 데이터들을 제1 방향 순서대로 스캐닝하는 단계 및 제1 방향으로 스캐닝한 잔여 데이터들을 제2 방향 순서대로 상기 현재 블록내에 재배열하는 단계를 할 수 있디.
또한, 현재 블록의 잔여 데이터들을 재배열하는 단계(S3020)는, 현재 블록 내 서브 블록 단위로 재배열할 수 있다.
이 경우, 현재 블록의 잔여 데이터들을 재배열하는 단계(S3020)는, 현재 블록 내의 서브 블록의 위치에 기초하여 잔여 데이터들을 재배열할 수 있다.
한편, 현재 블록의 잔여 데이터들을 재배열하는 단계(S3020)는, 현재 블록내에 배열된 잔여 데이터들을 기정의된 각도로 회전하여 재배열할 수 있다.
한편, 현재 블록의 잔여 데이터들을 재배열하는 단계(S3020)는, 현재 블록내에 현재 블록내에 배열된 잔여 데이터들을 플리핑(flipping) 방법대로 플리핑하여 재배열할 수 있다.
본 발명에 따른 SDST 방법을 이용한 영상 복호화기는 현재 블록의 변환 모드를 결정하여, 현재 블록의 변환 모드에 따라 상기 현재 블록의 잔여 데이터들을 역변환하고, 현재 블록의 변환 모드에 따라 상기 역변환된 현재 블록의 잔여 데이터들을 재배열하는 역변환부를 포함할 수 있다. 여기서, 변환 모드는 SDST(Shuffling Discrete Sine Transform), SDCT(Shuffling Discrete cosine Transform), DST(Discrete Sine Transform) 및 DCT(Discrete Cosine Transform) 중 적어도 하나를 포함할 수 있다.
본 발명에 따른 SDST 방법을 이용한 영상 복호화기는 현재 블록의 변환 모드를 결정하여, 현재 블록의 변환 모드에 따라 현재 블록의 잔여 데이터들을 재배열하고, 현재 블록의 변환 모드에 따라 상기 재배열된 현재 블록의 잔여 데이터들을 역변환하는 역변환부를 포함할 수 있다. 여기서, 변환 모드는 SDST(Shuffling Discrete Sine Transform), SDCT(Shuffling Discrete cosine Transform), DST(Discrete Sine Transform) 및 DCT(Discrete Cosine Transform) 중 적어도 하나를 포함할 수 있다.
본 발명에 따른 SDST 방법을 이용한 영상 부호화기는 현재 블록의 변환 모드를 결정하여, 현재 블록의 변환 모드에 따라 상기 현재 블록의 잔여 데이터들을 재배열하고, 현재 블록의 변환 모드에 따라 재배열된 현재 블록의 잔여 데이터들을 변환하는 변환부를 포함할 수 있다. 여기서, 변환 모드는 SDST(Shuffling Discrete Sine Transform), SDCT(Shuffling Discrete cosine Transform), DST(Discrete Sine Transform) 및 DCT(Discrete Cosine Transform) 중 적어도 하나를 포함할 수 있다.
본 발명에 따른 SDST 방법을 이용한 영상 부호화기는 현재 블록의 변환 모드를 결정하여, 현재 블록의 변환 모드에 따라 현재 블록의 잔여 데이터들을 변환하고, 현재 블록의 변환 모드에 따라 상기 변환된 현재 블록의 잔여 데이터들을 재배열하는 변환부를 포함할 수 있다. 여기서, 변환 모드는 SDST(Shuffling Discrete Sine Transform), SDCT(Shuffling Discrete cosine Transform), DST(Discrete Sine Transform) 및 DCT(Discrete Cosine Transform) 중 적어도 하나를 포함할 수 있다.
본 발명에 따른 SDST 방법을 이용한 부호화 방법에 의해 생성된 비트스트림은 현재 블록의 변환 모드를 결정하는 단계, 현재 블록의 변환 모드에 따라 현재 블록의 잔여 데이터들을 재배열하는 단계 및 현재 블록의 변환 모드에 따라 재배열된 현재 블록의 잔여 데이터를 변환하는 단계를 포함하고, 변환 모드는 SDST(Shuffling Discrete Sine Transform), SDCT(Shuffling Discrete cosine Transform), DST(Discrete Sine Transform) 및 DCT(Discrete Cosine Transform) 중 적어도 하나를 포함할 수 있다.
본 발명의 일 실시예에 따르면, 변환 및/또는 양자화된 계수의 스캐닝(Scanning) 및/또는 그룹핑(Grouping) 방법을 변경함으로써, 압축 효율을 향상시킬 수 있다.
구체적으로, 비디오 부호화 과정은 크게 화면 내 예측 또는 화면 간 예측을 통해 원본 블록을 예측하는 단계, 예측 블록과 원본 블록 간의 차인 잔여 블록 내 잔여 화소들에 대해 변환 또는 양자화 중 적어도 하나 이상을 적용하는 단계, 변환 또는 양자화 중 적어도 하나 이상이 적용된 블록 내 계수와 부호화 정보를 확률 기반 무손실 압축 방법인 엔트로피 부호화(Entropy Coding)하는 단계를 거쳐 원본 영상의 압축 형태인 비트스트림(BitStream)을 생성할 수 있다. 생성된 비트스트림은 복호화기로 전송되거나 기록 매체에 저장될 수 있다.
본 발명의 일 실시예에 따르면, 특히 TU가 소정의 예측 모드로 예측된 경우, 변환 및/또는 양자화가 적용된 TU 내 계수들을 엔트로피 부호화/복호화하기 위해, 본 발명에 따른 스캐닝 및/또는 그룹핑 방법을 적용할 수 있다. 아래에서 언급되는 부호화/복호화는 엔트로피 부호화/복호화를 의미할 수 있다. 또한, 아래에서 언급되는 TU는 CU, PU, 블록, 서브 블록 등 샘플이 하나 이상 존재하는 샘플 배열을 의미할 수 있다. 즉, TU는 CU, PU, 블록, 서브 블록 중 적어도 하나 이상의 의미할 수 있다. 또한, 아래에서 언급되는 계수는 변환 및/또는 양자화된 계수를 의미할 수 있다. 이때, 변환은 1차 변환 및 2차 변환 중 적어도 하나 이상을 포함할 수 있다. 여기서, 2차 변환은 1차 변환된 계수들 전체 혹은 일부에 추가적으로 변환을 1회 더 수행하는 하는 방법을 의미할 수 있다.
상기 소정의 예측 모드는 화면 간 예측 모드 또는 화면 내 예측 모드일 수도 있다. 상기 화면 내 예측 모드는 기-정의된 방향성 모드 또는 비-방향성 모드 중 어느 하나일 수 있다. 상기 소정의 예측 모드로 예측된 TU에서의 변환 및/또는 양자화 계수들의 분포 특성을 반영하여, 본 발명에 따른 스캐닝 방법을 적용함으로써 TU 내 계수들을 부호화/복호화할 수 있다. 또한, 소정의 그룹핑 방법을 통해 TU를 1개 이상의 서브 블록으로 분할하고, 각 서브 블록에 속하는 계수들에 대해 상기 스캐닝 방법을 적용하여 부호화/복호화할 수도 있다.
본 발명에 따른 스캐닝 및/또는 그룹핑은 TU 내에서의 변환 및/또는 양자화된 계수들의 분포 특성을 고려할 수 있다. 따라서, 본 발명에 따르면, 0이 아닌 계수들 또는 0인 계수들이 같은 그룹(Group)으로 분류될 수 있는 확률이 높아질 수 있다. 본 발명에 따르면, TU 내 계수들을 부호화/복호화하는데 필요한 비트(Bit) 수를 줄일 수 있으므로, 동일 화질 대비 더 많은 비트량을 절약할 수 있다.
변환 및/또는 양자화된 TU 내 계수들을 부호화/복호화하기 위해 TU 내의 N 개의 계수들을 하나의 그룹으로 하는 계수 그룹(Coefficient Group, CG)을 정의할 수 있다. 이때, N은 0 이상의 양의 정수일 수 있다. 예컨대, N은 16일 수 있다. 상기 그룹핑은 변환 및/또는 양자화가 적용된 TU 내 계수를 상기 계수 그룹 단위로 할당하는 것을 의미할 수 있다. 아래에서 언급되는 그룹은 계수 그룹을 의미할 수 있다.
도 31은 16x16 크기의 TU 내 변환 및/또는 양자화된 계수들이 CG 단위로 그룹핑된 예를 설명하기 위한 도면이다.
TU 내 고정된 4x4 정사각형 서브 블록에 속하는 계수들은 하나의 CG로 그룹핑될 수 있다. 각 CG 단위에 대해서 변환 및/또는 양자화된 계수들을 부호화/복호화하기 위한 플래그(Flag) 및/또는 구문 요소(Syntax element)가 결정될 수 있다. 상기 플래그 및/또는 구문 요소는 예컨대, coded_sub_block_flag (이하, CSBF), sig_coeff_flag, coeff_abs_level_greater1_flag, coeff_abs_level_greater2_flag, coeff_sign_flag, coeff_abs_level_remaining_value 중 적어도 하나를 포함할 수 있다. 여기서, coded_sub_block_flag은 각 CG에 0이 아닌 변환 및/또는 양자화된 계수가 하나라도 존재하는지에 대해 지시하는 구문 요소일 수 있다. 또한, sig_coeff_flag는 변환 및/또는 양자화된 계수가 0인지 아닌지를 지시하는 구문 요소일 수 있다. 또한, coeff_abs_level_greater1_flag는 변환 및/또는 양자화된 계수의 절대값이 1보다 큰지 아닌지를 지시하는 구문 요소일 수 있다. 또한, coeff_abs_level_greater2_flag 는 변환 및/또는 양자화된 계수의 절대값이 2보다 큰지 아닌지를 지시하는 구문 요소일 수 있다. 또한, coeff_sign_flag는 변환 및/또는 양자화된 계수의 부호값을 지시하는 구문 요소일 수 있다. 또한, coeff_abs_level_remaining_value는 변환 및/또는 양자화된 계수의 절대값이 3보다 클 경우 변환 및/또는 양자화된 계수의 절대값에서 3을 뺀 값을 지시하는 구문 요소일 수 있다. 즉, 상기 변환 및/또는 양자화된 계수에 대한 구문 요소 중 적어도 하나 이상은 상기 CG 단위로 부호화/복호화될 수 있다.
화면 내 예측인지 화면 간 예측인지에 대한 예측 모드 및/또는 화면 내 예측의 예측 방향에 기초하여 특정 스캐닝 방법이 선택될 수 있다. 선택된 스캐닝 방법을 이용하여 TU의 각 CG 내 변환 및/또는 양자화된 계수들을 스캐닝하면서 상기 플래그 및 구문 요소들 중 적어도 하나 이상이 결정될 수 있다. 또한, 선택된 스캐닝 방법을 이용하여 TU의 각 CG 내 변환 및/또는 양자화된 계수들을 스캐닝하면서 상기 플래그 및 구문 요소들 중 적어도 하나 이상이 부호화/복호화될 수 있다.
표 6은 TU 내 각 CG의 계수들을 스캐닝하는 방법을 예시적으로 나타낸다. 표 6에 나타낸 바와 같이, 스캐닝 방법은 예측 모드, 화면 내 예측 방향 및/또는 블록 크기에 따라 결정될 수 있다. 스캐닝 방법 및 그 결정 조건은 표 6에 나타낸 예에 한정되지 않는다. 예컨대, TU의 예측 모드, 화면 내 예측 방향 및 TU의 크기 중 적어도 하나 이상에 기초하여 스캐닝 방법을 결정할 수 있다. 또한, 표 6에 나타낸 스캐닝 방법과는 다른 스캐닝 방법이 수행될 수도 있다. 또한, 스캐닝의 대상이 되는 변환 및/또는 양자화된 계수는 양자화된 변환 계수 레벨(Quantized Transformed Coefficient Level), 변환 계수(Transform Coefficient), 양자화된 레벨(Quantized Level), 잔여 신호 계수 중 적어도 하나 이상을 의미할 수 있다.
TU size 예측 모드
Intra Inter
0~5 6~14 15~21 22~30 31~34
4x4 diagonal vertical diagonal horizontal diagonal diagonal
8x8
16x16 diagonal
32x32 diagonal
표 6에 나타낸 스캐닝 방법(diagonal, horizontal 또는 vertical)의 각각은 도 10에 도시된 스캐닝 방법의 각각에 대응될 수 있다.
도 32는 16x16 크기의 TU 내 전체 계수의 스캐닝 순서를 예시적으로 도시한 도면이다.
TU의 계수는 화면 간 예측 또는 화면 내 예측을 통해 생성된 예측 블록과 원본 블록의 차분을 통해 생성된 잔여 블록에 대해 변환 및/또는 양자화 중 적어도 하나 이상을 수행한 것일 수 있다. 도 32에서, 굵은 선은 각 CG의 경계를 나타내며, 실선 화살표는 각 CG내 계수의 스캐닝 순서를 나타내고, 점선 화살표는 각 CG 내 마지막 계수의 스캐닝이 끝난 후, 다음으로 스캐닝될 CG를 나타낸다. 즉, 점선 화살표는 CG 간의 스캐닝 순서를 나타낸다.
화면 내 예측된 TU의 전체 TU 혹은 각 CG에서는 예측 방향 및 TU 크기 중 적어도 하나 이상에 기초하여 기-정의된 복수의 스캐닝 방법 중 어느 하나를 선택적으로 사용할 수 있다. 화면 간 예측된 TU의 각 CG 내 계수들은 좌하단 대각(down-left diagonal) 방향의 스캐닝 순서를 사용할 수 있다. 이때, 도 32에서 화살표가 지나가는 위치에 있는 계수들이 스캐닝될 수 있다. 또한, 좌하단 대각 방향의 스캐닝 대신에 우상단 대각(up-right diagonal) 스캐닝이 적용될 수 있다.
본 발명에 따른 스캐닝 방법은 좌하단 대각 스캐닝 또는 우상단 대각 스캐닝 중 어느 것을 적용해도 동일 결과를 기대할 수 있다. 이하에서 대각 스캐닝은 스캐닝 방향에 따라 좌하단 대각 스캐닝 또는 우상단 대각 스캐닝을 의미할 수 있다.
전술한 바와 같이, 화면 간 예측 모드로 예측된 TU 내 CG의 계수들에 대해 좌하단 대각 방향의 스캐닝이 적용될 수 있다. CG는 TU 내 NxN 크기의 정사각형일 수도 있고, NxM 크기의 직사각형일 수도 있다. CG의 크기는 부호화기/복호화기에 기-설정된 고정된 크기일 수도 있고, TU의 크기/형태에 따라 가변적으로 결정될 수도 있다. 또는, CG의 크기에 관한 정보가 시그널링되고, 해당 정보에 기반하여 CG의 크기가 가변적으로 결정될 수 있다. 상기 CG의 크기에 관한 정보는 너비/높이, 뎁스, 분할 여부를 나타내는 플래그, TU를 구성하는 CG의 개수 등으로 다양하게 부호화/복호화될 수 있다.
도 33은 TU 내 계수의 분포 특성, 효율적인 스캐닝 및 CG의 구성의 필요성을 설명하기 위한 도면이다.
도 33의 (a)는 16x16 크기의 TU 내 변환 및/또는 양자화된 계수의 발생 빈도를 예시적으로 도시한 도면이다. 또한 도 33의 (b)는 8x8 크기의 TU 내 변환 및/또는 양자화된 계수의 발생 빈도를 예시적으로 도시한 도면이다.
도 33에 있어서, 계수의 발생 빈도가 높은 위치일수록 더 진한 색으로 표시된다. 도 33에 도시된 TU 내 계수 분포 특성에 따르면, DC 계수 위치에서 멀어질수록 계수의 발생 빈도가 낮다. 이는 TU의 크기에 상관없이 화면 간 예측 모드로 예측된 모든 TU에서 나타나는 공통적인 특징일 수 있다. 그 이유는 비디오 압축에서 변환 및/또는 양자화된 계수들을 저주파 대역에서 계수가 발생하도록 해야 높은 압축 성능을 얻을 수 있기 때문이다.
본 발명의 일 실시예에 따르면, TU 내 변환 및/또는 양자화된 계수의 분포 특성을 고려하여 TU 내 변환 및/또는 양자화된 계수를 부호화/복호화하기 위한 보다 효율적인 스캐닝 및/또는 그룹핑 방법이 제공될 수 있다.
이하에서, TU 내 계수 분포 특성을 효율적으로 반영한 스캐닝 및/또는 그룹핑 방법을 설명한다. 본 발명에 따른 스캐닝의 목적은 엔트로피 부호화 효율을 향상시키기 위해 TU 내 계수들의 정렬을 최적화하는 것이다.
스캐닝은 2차원 블록 내 계수들을 1차원 배열로 표현하기 위해 수행될 수 있다. 또는 반대로, 1차원 배열의 계수들을 2차원 블록에 표현하기 위해 스캐닝이 수행될 수 있다. 엔트로피 부호화의 효율은 스캐닝된 계수들의 배열 내에서 어떻게 분포하는가에 따라 달라질 수 있다. 예컨대, 배열 내의 계수들이 낮은 주파수 영역에 집중되는 것이 부호화 효율 측면에서 바람직하다. 본 발명에 따른 스캐닝은 TU 내 계수의 분포 특성을 반영하므로, 데이터가 점진적으로 증가하는 방향으로 계수들을 정렬할 수 있다. 그럼으로써, 엔트로피 부호화 효율을 향상시킬 수 있다.
또한, 본 발명에 따른 그룹핑은, 변환 및/또는 양자화된 계수들이 모두 0인 CG의 수를 늘리기 위해, 변환 및/또는 양자화된 계수가 0일 확률이 큰 TU 내 변환 및/또는 양자화된 계수들을 하나의 CG로 그룹핑하는 것이다.
본 발명은 비디오 부호화/복호화의 압축률 향상을 위하여 분리 특성을 갖는 수평 및/또는 수직 변환(Transform)을 수행할 수 있다. 예컨대, 수평 및 수직 변환 중 적어도 하나 이상에 DST-7을 이용할 수 있고, 수평 및 수직 변환 중 적어도 하나 이상에 DCT-2를 이용할 수 있다. 또는, 수평 변환에서는 수직 변환에서와 상이한 변환 타입을 이용할 수도 있다. 수평 변환은 DST-7 (또는 DST-4)을, 수직 변환은 DCT-2을 이용할 수도 있다. 또는 수평 변환은 DCT-2, 수직 변환은 DST-7 (또는 DST-4)를 이용할 수도 있다. 전술한 바와 같이, 수평 및 수직 변환을 위해 동일한 변환 방법을 이용하거나 또는 서로 다른 변환 방법을 이용함으로써 블록 내 계수의 분포를 저주파수(DC 성분 근처) 성분에 보다 더 밀집시킬 수 있다.
본 발명에 따른 그룹핑 방법은 전술한 계수 분포 특성을 반영함으로써, 그룹 내 속하는 모든 계수가 0인 그룹의 수를 증가시킬 수 있다. 특정 그룹에 속하는 모든 계수가 0일 경우, 해당 그룹 내 계수들의 부호화에 필요한 구문 요소(예컨대, 플래그들)를 절약할 수 있다. 본 발명에서 부호화는 엔트로피 부호화를 의미할 수 있다. 예를 들어, 부호화기는 4x4 CG 내 계수가 모두 0인 경우, CSBF를 0으로 설정할 수 있다. 복호화기는 CSBF가 0인 경우, 해당 CG 내 계수를 복원하기 위한 추가적인 구문 요소(예컨대, 플래그)를 참조 혹은 복호화하지 않을 수 있다. 본 발명에서 복호화는 엔트로피 복호화를 의미할 수 있다.
4x4 CG 내 0이 아닌 계수가 하나라도 존재하면, 부호화기는 CSBF와 계수의 정보를 표현하는 추가적인 플래그 또는 구문 요소 중 적어도 하나 이상 (sig_coeff_flag, coeff_abs_level_greater1_flag, coeff_abs_level_greater2_flag, coeff_sign_flag, coeff_abs_level_remaining_value)을 부호화함으로써 해당 CG 내 계수들을 부호화할 수 있다. 복호화기 또한 상기 플래그 혹은 구문 요소 중 적어도 하나 이상을 복호화함으로써 해당 CG 내 계수들의 값을 복호화할 수 있다. 따라서, 0인 계수가 발생할 확률이 큰 TU 내 위치의 계수들을 하나의 그룹으로 그룹핑함으로써 그룹 내 계수들을 부호화/복호화하는데 필요한 구문 요소 및/또는 플래그를 절약할 수 있다.
본 발명에 따른 스캐닝 및/또는 그룹핑 방법은 MxN TU에 적용될 수 있다. M 및 N은 각각 0 이상의 양의 정수일 수 있다. 예컨대, M 및 N은 각각 2, 4, 8, 16, 32, 48 또는 64 이상 등의 값을 가질 수 있다. M과 N은 동일하거나 상이할 수 있다.
변환 및/또는 양자화를 수행하게 되면 TU의 고주파 영역에 발생하는 계수는 값의 크기 및/또는 발생 빈도가 적어질 수 있다. 또한, HVS(Human Visual System)를 고려하면, 고주파 영역의 계수를 버림으로써 얻는 압축 효율의 증대가 주관적 및 객관적 화질 저하에 따른 손실보다 크다. 따라서, TU 내 좌상단의 일부 영역에만 본 발명에 따른 스캐닝 및/또는 그룹핑을 적용할 수 있다. 또한, TU 내 좌상단의 일부 영역 이외의 영역에 대해서는 본 발명에 따른 그룹에 대한 정보 및/또는 양자화된 계수 레벨에 대한 정보를 부호화/복호화하지 않을 수 있다. 예컨대, 도 35에 있어서, 검은색 영역에 대해서는 부호화/복호화가 수행되지 않을 수 있다.
본 발명에 따른 스캐닝 및/또는 그룹핑 방법의 다양한 실시예에 대해 구체적으로 후술한다. 이하의 설명에서 스캐닝 및/또는 그룹핑의 기준이 TU인 경우, TU는 변환 유닛 또는 변환 블록과 같은 의미일 수 있다.
본 발명의 일 실시예에 따른 스캐닝 및/또는 그룹핑은 TU 기준 대각 스캐닝 및/또는 그룹핑일 수 있다. TU 기준 대각 스캐닝 및/또는 그룹핑에 따르면, TU의 우하단 AC 위치의 계수부터 좌상단 DC 위치의 계수까지 좌하단 대각 방향으로 연속되는 N개의 계수들을 하나의 그룹(CG)로 구성할 수 있다. N은 0보다 큰 양의 정수일 수 있다. 복수의 CG의 각각은 동일한 개수(N개)의 계수로 구성될 수 있다. 또는 복수의 CG의 전부 또는 일부는 서로 상이한 개수의 계수로 구성될 수 있다. 각 그룹 내 계수들은 좌하단 대각 방향으로 가장 큰 주파수 영역부터 DC 위치로 계수들을 순서대로 스캐닝할 수 있다.
도 34는 본 발명의 일 실시예에 따른 TU 기준 대각 스캐닝 및/또는 그룹핑을 설명하기 위한 도면이다.
도 34의 (a)는 4X4 TU에 대한 스캐닝 및 그룹핑을 설명하기 위한 도면이다.
도 34의 (b)는 8X8 TU에 대한 스캐닝 및 그룹핑을 설명하기 위한 도면이다.
도 34의 (c)는 16X16 TU에 대한 스캐닝 및 그룹핑을 설명하기 위한 도면이다.
도 34에 있어서, 화살표는 각 CG 내 계수를 스캐닝하는 순서를 나타낸다. 또한, 동일하게 음영 처리된 연속되는 영역은 하나의 CG를 나타낸다. 하나의 CG는 우하단 AC 위치의 계수부터 좌하단 대각 방향으로 연속된 16개의 계수를 포함한다. 즉, 도 34에 도시된 예에서는, 복수의 CG의 각각은 동일한 개수(16개)의 계수를 포함한다.
도 34에 도시된 바와 같이, 각 CG 내 계수들은 화살표가 나타내는 방향과 순서로 스캐닝될 수 있다. 또한 각 CG 내 마지막 계수의 스캐닝이 끝나면, 좌하단 대각 스캐닝 순서 상 마지막 계수 다음의 계수를 포함하는 CG에 대해 스캐닝이 수행될 수 있다. 이러한 방식으로 TU 내 모든 계수들을 스캐닝할 수 있다.
도 34에는 도시하지 않았지만, 대각 스캐닝 방법으로 좌하단 대각 스캔 대신 우상단 대각 스캔을 사용할 수 있다.
도 35는 32x32 TU의 부호화/복호화 영역을 예시적으로 설명하기 위한 도면이다.
도 35에 있어서, 그룹에 대한 정보, 변환 및/또는 양자화된 계수 레벨에 대한 정보 중 적어도 하나를 부호화/복호화하지 않는 주파수 영역의 계수들은 검은색으로 나타낸다. 고주파 영역에 위치하는 계수의 발생 빈도는 낮거나 그 값이 작다. 또한, 고주파 영역의 계수를 제거하더라도 HVS 시스템에 따라 인간이 느끼는 화질에는 큰 차이가 없다. 따라서, 고주파 영역의 계수들을 부호화하지 않고 제거함으로써, 높은 부호화 효율을 얻을 수 있다.
따라서, 소정 크기 이상의 TU에 대해서는 일부 고주파 영역의 계수들을 부호화/복호화하지 않을 수 있다. 이 때, 상기 소정 크기는 NxM일 수 있다. N, M은 각각 양의 정수일 수 있다. 또한, N과 M은 동일하거나 상이할 수 있다. 예컨대, 도 35에 도시된 바와 같이, NxM은 32x32이 일 수 있다. 상기 소정 크기(N 및/또는 M)는 부호화기/복호화기에 기-정의된 고정된 값일 수도 있고, 명시적으로 시그널링될 수도 있다. 또한, 상기 일부 고주파 영역은 TU 내 위치에 기초하여 결정될 수 있다. 예컨대, 일부 고주파 영역은 TU 내 수평 및/또는 수직 좌표에 기초하여 결정될 수 있다. 예컨대, 일부 고주파 영역은 수평 및/또는 수직 좌표가 소정의 제1 문턱값(Threshold Value) 이상인 영역이거나, 수평 및 수직 좌표의 합이 소정의 제2 문턱값 이상인 영역일 수 있다.
제1 문턱값 및/또는 제2 문턱값은 부호화기/복호화기에 기-정의된 고정된 값일 수도 있고, 명시적으로 시그널링될 수도 있다. 또는 TU의 특성(예컨대, 블록 크기, 블록 형태, 깊이, 예측 모드(인터 또는 인트라), 화면내 예측 모드, 변환의 종류, 성분(휘도 또는 색차))에 의존적으로 결정될 수 있다. 예컨대, TU의 가로 길이 또는 세로 길이의 3/4으로 결정될 수 있다. 또는 하나 이상의 주변 TU에 사용된 문턱값으로부터 유도될 수 있다. 상기 부호화/복호화되지 않는 일부 고주파 영역 혹은 부호화/복호화되지 않는 일부 고주파 영역을 제외한 부호화/복호화되는 영역은 정사각형, 직사각형, 삼각형 및/또는 오각형 등의 블록 형태를 가질 수 있다. 상기 일부 고주파 영역은 TU의 특성(예컨대, 블록 크기, 블록 형태, 깊이, 예측 모드(인터 또는 인트라), 화면내 예측 모드, 변환의 종류, 성분(휘도 또는 색차))에 기초하여 결정될 수 있다.
전술한 바와 같이, 우하단 AC 위치의 계수부터 좌상단 DC 위치의 계수까지 좌하단 대각 방향으로 TU 내 계수들을 스캐닝하고, 연속되는 N개의 계수를 하나의 그룹으로 그룹핑할 수 있다. 또는, 좌상단 DC 위치의 계수부터 우하단 AC 위치의 계수까지 우상단 대각 방향으로 TU 내 계수들을 스캐닝하고, 연속되는 N개의 계수를 하나의 그룹으로 그룹핑할 수 있다. 또는 상기 그룹핑은 우하단 AC 위치의 계수부터 좌상단 DC 위치의 계수까지 스캐닝 방향에 따라서 수행될 수 있다.
본 발명의 일 실시예에 따른 스캐닝 및/또는 그룹핑은 TU 기준 지그재그 스캐닝 및/또는 그룹핑일 수 있다.
도 36은 본 발명의 일 실시예에 따른 지그재그(Zigzag) 스캐닝 및/또는 그룹핑을 설명하기 위한 도면이다.
도 36의 (a)는 4X4 TU에 대한 스캐닝 및 그룹핑을 설명하기 위한 도면이다.
도 36의 (b)는 8X8 TU에 대한 스캐닝 및 그룹핑을 설명하기 위한 도면이다.
도 36의 (c)는 16X16 TU에 대한 스캐닝 및 그룹핑을 설명하기 위한 도면이다.
도 36에 있어서, 화살표는 각 CG 내 계수를 스캐닝하는 순서를 나타낸다. 또한, 동일하게 음영 처리된 연속되는 영역이 하나의 CG를 나타낸다. TU의 우하단 AC 위치의 계수부터 좌상단 DC 위치의 계수까지 지그재그 방향으로 연속되는 N개의 계수를 하나의 CG로 구성할 수 있다. N은 0보다 큰 양의 정수일 수 있다. 복수의 CG의 각각은 동일한 개수(N개)의 계수로 구성될 수 있다. 또는 복수의 CG의 전부 또는 일부는 서로 상이한 개수의 계수로 구성될 수 있다. 각 CG 내 계수들은 지그재그 방향으로 우하단 AC 위치의 계수부터 좌상단 DC 위치의 계수까지 순서대로 스캐닝할 수 있다. 또한, 각 CG를 지그재그 방향으로 스캐닝할 수 있다.
각 CG 내 마지막 계수의 스캐닝이 완료되면, TU 기준 지그재그 스캐닝 순서 상, 마지막 계수 다음의 계수를 포함하는 CG에 대해 스캐닝이 수행될 수 있다. 이러한 방식으로 TU 내 모든 계수들을 스캐닝할 수 있다.
본 발명의 일 실시예에 따른 TU 기준 지그재그 스캐닝 및/또는 그룹핑이 수행되는 경우, 전술한 TU 기준 대각 스캐닝 및/또는 그룹핑과 마찬가지로, 소정 크기 이상의 TU에 대해서는 일부 고주파 영역의 계수들을 부호화/복호화하지않을 수 있다. 상기 소정 크기, 일부 고주파 영역의 특정 등은 도 35를 참조하여 설명한 방식이 적용될 수 있다.
전술한 바와 같이, 우하단 AC 위치의 계수부터 좌상단 DC 위치의 계수까지 지그재그 스캐닝 방향으로 TU 내 계수들을 스캐닝하고, 연속되는 N개의 계수를 하나의 그룹으로 그룹핑할 수 있다. 또는 좌상단 DC 위치의 계수부터 우하단 AC 위치의 계수까지 지그재그 스캐닝 방향으로 TU 내 계수들을 스캐닝하고, 연속되는 N개의 계수를 하나의 그룹으로 그룹핑할 수 있다. 또는 상기 그룹핑은 우하단 AC 위치의 계수부터 좌상단 DC 위치의 계수까지 스캐닝 방향에 따라서 수행될 수 있다.
본 발명의 일 실시예에 따른 스캐닝 및/또는 그룹핑은 바운더리(boundary) 스캐닝 및/또는 그룹핑일 수 있다.
도 37은 본 발명의 일 실시예에 따른 바운더리 스캐닝 및/또는 그룹핑을 설명하기 위한 도면이다.
도 37의 (a)는 4X4 TU에 대한 스캐닝 및 그룹핑을 설명하기 위한 도면이다.
도 37의 (b)는 8X8 TU에 대한 스캐닝 및 그룹핑을 설명하기 위한 도면이다.
도 37의 (c)는 16X16 TU에 대한 스캐닝 및 그룹핑을 설명하기 위한 도면이다.
도 34 내지 도 36을 참조하여 설명한 스캐닝 및/또는 그룹핑 방법들은 스캐닝 순서 상 연속하는 고정된 수의 계수들을 하나의 그룹으로 구성한다. 도 37을 참조하여 설명하는 바운더리 스캐닝 및/또는 그룹핑에 따르면, TU 내 그룹들은 그 크기 또는 형태 중 적어도 하나가 각각 상이할 수 있다. 예컨대, 고주파 성분에 위치하는 계수를 많이 포함할수록 그룹의 크기가 커질 수 있다. 전술한 바와 같이, 고주파 성분에 위치하는 계수들은 0일 확률이 클 수 있다. 따라서, 도 37에 도시된 고주파 성분을 많이 포함하는 그룹의 모든 계수가 0일 확률은 4x4 CG의 모든 계수가 0일 확률과 큰 차이가 없다. 또한, 도 37에 도시된 바와 같이 CG를 구성하면, 전체 그룹의 수가 적어지기 때문에 TU 내 계수들을 부호화하는데 필요한 비트량이 감소되므로, 보다 효율적인 그룹핑이 될 수 있다.
표 7은 도 37에 도시된 그룹핑과 4x4 단위의 CG 그룹핑에 따른 그룹의 수를 나타낸다.
TU 크기 4x4 단위 CG 구성 방법 제안하는 그룹핑 방법
4x4 1 1
8x8 4 3
16x16 16 7
표 7로부터, TU의 크기가 커질수록 4x4 단위로 CG를 그룹핑하는 것보다 도 37에 도시된 방법으로 그룹핑하는 것이, 전체 그룹의 수의 관점에서 유리함을 알 수 있다. 즉, TU의 크기가 커질수록 도 37에 도시된 그룹핑의 효율이 증가하는 것을 알 수 있다.
전술한 바와 같이, 하나의 TU에 포함된 복수의 CG의 각각은 고정된 수의 계수를 포함할 수도 있고, 복수의 CG의 전부 또는 일부는 서로 다른 개수의 계수를 포함할 수 있다. 도 37에 도시된 바운더리 스캐닝 및/또는 그룹핑에 따르면, DC 계수를 포함하는 고정된 크기(예컨대, 4x4 정사각형 크기)의 그룹에 대하여 지그재그 스캐닝을 수행할 수 있다. 또한, 나머지 그룹에 대해서는 그룹 내 계수들에 대해 수평 및/또는 수직 방향으로 반복적으로 횡단하는 스캐닝을 수행할 수 있다. 이때, 지그재그 스캐닝 대신 좌하단 대각 스캐닝, 우상단 대각 스캐닝, 수평(horizontal) 스캐닝, 수직(vertical) 스캐닝 중 적어도 하나 이상을 이용할 수 있다.
소정 크기 이상의 TU에 대해서는 일부 고주파 영역의 계수들에 대해 스캐닝, 그룹핑 및/또는 부호화/복호화를 수행하지 않을 수 있다. 상기 소정 크기, 일부 고주파 영역의 특정 등은 도 35를 참조하여 설명한 방식이 유사하게 적용될 수 있다. 예컨대, 상기 일부 고주파 영역은 수평 방향으로 TU 너비의 절반 이상 및/또는 수직 방향으로 TU 높이의 절반 이상의 좌표에 위치하는 영역일 수 있다.
도 38은 32x32 TU의 부호화/복호화 영역을 예시적으로 설명하기 위한 도면이다.
도 38에 있어서, 스캐닝, 그룹핑 및/또는 부호화/복호화가 수행되지 않는 영역의 계수들은 검은색으로 나타낸다. TU 내에서 특정 계수의 수평 위치 및/또는 수직 위치가 제3 문턱값 이상인 경우, 해당 계수는 스캐닝 및/또는 그룹핑에서 제외될 수 있다. 스캐닝 및/또는 그룹핑에서 제외된 계수에 대해서는 부호화/복호화 과정도 생략되고, 그 값은 0으로 설정될 수 있다.
제3 문턱값은 부호화기/복호화기에 기-정의된 고정된 값일 수도 있고, 명시적으로 시그널링될 수도 있다. 또는 TU의 특성(예컨대, 블록 크기, 블록 형태, 깊이, 예측 모드(인터 또는 인트라), 화면내 예측 모드, 변환의 종류, 성분(휘도 또는 색차))에 의존적으로 결정될 수 있다. 예컨대, 제3 문턱값은 TU의 가로 길이 및/또는 세로 길이의 1/2로 결정될 수 있다. 또는 하나 이상의 주변 TU에 사용된 문턱값으로부터 유도될 수 있다. 또는 계수의 수평 위치에 대한 문턱값은 수직 위치에 대한 문턱값과 다르게 설정될 수도 있다. 상기 부호화/복호화되지 않는 일부 고주파 영역 혹은 부호화/복호화되지 않는 일부 고주파 영역을 제외한 부호화/복호화되는 영역은 정사각형, 직사각형, 삼각형 및/또는 오각형 등의 형태를 가질 수 있다. 상기 일부 고주파 영역은 TU의 특성(예컨대, 블록 크기, 블록 형태, 깊이, 예측 모드(인터 또는 인트라), 화면내 예측 모드, 변환의 종류, 성분(휘도 또는 색차))에 기초하여 결정될 수 있다.
도 37에 도시된 바와 같이, TU 크기에 따른 바운더리 스캐닝 및/또는 그룹핑은 AC 위치의 계수부터 DC 위치의 계수 방향으로 TU 내 계수들을 스캐닝하고, 스캐닝 순서상 연속되는 가변 개수의 계수들을 하나의 그룹으로 그룹핑할 수 있다. 또는, DC 위치의 계수부터 AC 위치의 계수 방향으로 TU 내 계수들을 스캐닝하고, 연속되는 가변 개수의 계수들을 하나의 그룹으로 그룹핑할 수 있다. 또는 상기 그룹핑은 AC 위치의 계수부터 DC 위치의 계수까지 스캐닝 방향에 따라서 수행될 수 있다.
본 발명의 일 실시예에 따른 스캐닝 및/또는 그룹핑은 직사각형(non-square) TU 기준 스캐닝 및/또는 그룹핑일 수 있다.
직사각형 TU 기준 스캐닝 및/또는 그룹핑은 MxN TU가 정사각형이 아닐 때 수행될 수 있다. 예컨대, 2NxN, Nx2N, 4NxN, Nx4N, 8NxN 또는 Nx8N과 같은 직사각형 TU에 적용될 수 있다.
도 39는 가로로 긴 직사각형 TU에 대한 스캐닝 및/또는 그룹핑을 예시적으로 설명하기 위한 도면이다. 도 39에서 위에서부터 순서대로 4NxN 구조의 8x2 TU, 4NxN 구조의 16x4 TU, 8NxN 구조의 16x2 TU, 8NxN 구조의 32x8 TU, 2NxN 구조의 8x4 TU, 2NxN 구조의 16x8 TU 에서의 스캐닝 및/또는 그룹핑을 나타낸다.
도 40은 세로로 긴 직사각형 TU에 대한 스캐닝 및/또는 그룹핑을 예시적으로 설명하기 위한 도면이다. 도 40에서 왼쪽부터 순서대로 Nx4N 구조의 2x8 TU, Nx4N 구조의 4x16 TU, Nx8N 구조의 2x16 TU, Nx8N 구조의 4x32 TU, Nx2N 구조의 4x8 TU, Nx2N 구조의 8x16 TU 에서의 스캐닝 및/또는 그룹핑을 나타낸다.
도 39 및 도 40에 있어서, 화살표는 각 CG 내 계수를 스캐닝하는 순서를 나타낸다. 또한, 동일하게 음영 처리된 연속되는 영역이 하나의 CG를 나타낸다
직사각형 구조의 TU 내 계수들도 DC 성분 근처의 주파수 위치에 집중하여 분포한다. 따라서, 이를 고려하여 TU 내 계수들을 스캐닝 및 그룹핑할 수 있다. 또한, 수평 길이가 수직 길이보다 긴 직사각형 TU 내의 계수는 DC 성분 근처 및 DC 성분의 오른쪽 영역에서 많이 발생할 수 있다. 또한, 수직 길이가 수평 길이보다 긴 TU 내의 계수는 DC 성분 근처 및 DC 성분의 아래쪽 영역에서 많이 발생할 수 있다.
따라서, 예컨대, 도 39의 16x8 TU와 같이 가로로 긴 TU에 대해서는 수평 축으로 기울어진 지그재그 스캐닝이 수행될 수 있다. 또는, 예컨대, 도 40의 8x16 TU와 같이 세로로 긴 TU에 대해서는 수직 축으로 기울어진 지그재그 스캐닝이 수행될 수 있다. 또한, 스캐닝 순서 상 연속되는 16개의 계수를 하나의 그룹으로 그룹핑할 수 있다.
또한, 도 39나 도 40에는 도시하지 않았지만, 가로로 긴 TU에 대해서는 수직 축으로 기울어진 지그재그 스캐닝이 수행될 수 있고, 세로로 긴 TU에 대해서는 수평 축으로 기울어진 지그재그 스캐닝이 수행될 수 있다.
이때, 지그재그 스캐닝 대신 좌하단 대각 스캐닝, 우상단 대각 스캐닝, 수평 스캐닝, 수직 스캐닝 중 적어도 하나 이상을 이용할 수 있다.
또는 예컨대, TU의 직사각형 구조가 예컨대, Nx4N, Nx8N, Nx16N, 4NxN, 8NxN 또는 16NxN과 같이 세로 변 또는 가로 변의 길이가 다른 변의 길이의 4배 이상(또는, K배 이상, K는 2 이상의 정수)인 경우, TU를 TU와 같은 비율의 서브 블록으로 분할하여 AC 위치의 계수부터 DC 위치의 계수까지 스캐닝 및/또는 그룹핑을 수행할 수 있다.
본 발명에 따르면, TU 내 계수들이 DC 위치에 밀집하여 분포할 때, 고정된 4x4 크기의 CG로 그룹핑하고 CG 단위로 스캐닝하는 방법보다 높은 압축 효율을 갖는 TU 내 계수 스캐닝 및/또는 그룹핑 방법들이 제공될 수 있다.
예컨대, 본 발명에 따른 스캐닝 및/또는 그룹핑 방법들의 각각은 TU 내 계수들을 AC 위치부터 DC 위치까지 좌하단 대각 방향으로 스캐닝 및 그룹핑하는 방법을 완전히 대체할 수 있다(방법 1).
또는, TU 내 계수들을 고정된 4x4 크기의 CG로 그룹핑하고, CG 단위 혹은 CG내에서 본 발명에 따른 스캐닝을 수행할 수 있다(방법 2).
또는, 상기 방법 1 및 방법 2 중 적어도 하나 이상의 방법을 선택적으로 수행할 수 있다(방법 3).
상기 방법 3을 수행하는 경우, 부호화기는 복수의 스캐닝 및/또는 그룹핑 방법 중 적어도 하나 이상의 방식을 선택할 수 있다. 부호화기에서 선택된 스캐닝 및/또는 그룹핑 방법에 관한 정보는 비트스트림에 부호화할 수 있다. 복호화기는 선택된 스캐닝 및/또는 그룹핑 방법에 관한 정보를 비트스트림으로부터 복호화할 수 있다. 이후, 복호화기는 선택된 스캐닝 및/또는 그룹핑 방법을 이용하여 TU 내 계수들을 복호화할 수 있다. 또는 선택된 스캐닝 및/또는 그룹핑 방법에 관한 정보를 부호화하기 위해, 플래그를 이용할 수 있다. 플래그의 비트수는 선택가능한 스캐닝/그룹핑 방법의 개수에 의해 결정될 수 있다. 예컨대, 선택가능한 스캐닝 및/또는 그룹핑 방법의 개수가 2라면, 플래그는 1비트 플래그일 수 있다. 예컨대, 선택가능한 2가지 방법은 고정된 4x4 크기의 CG를 이용한 대각 스캐닝 및/또는 그룹핑, TU 기준 대각 스캐닝 및/또는 그룹핑, TU 기준 지그재그 스캐닝 및/또는 그룹핑, 및 바운더리 스캐닝 및/또는 그룹핑 중 적어도 2가지일 수 있다. 선택가능한 스캐닝 및/또는 그룹핑 방법은 부호화기와 복호화기에서 미리 정의될 수 있다.
변환 및/또는 양자화가 수행되면, 변환 및/또는 양자화된 계수가 DC 성분 근처에 밀집할 수 있다. 이와 같은 경우, 스캐닝 및/또는 그룹핑 방법의 선택 정보를 전송하는 방법(방법 3)보다는 TU 내 계수의 분포 특성을 고려하여 고정된 스캐닝 및/또는 그룹핑 방법(방법 1)을 적용하는 것이 바람직할 수 있다. 이때, 상기 스캐닝 및 그룹핑 중 적어도 하나 이상의 정보에 대해 1비트 이상의 인덱스를 사용할 수 있다. 또한, 상기 스캐닝 방법은 화면 내 예측 모드, 화면 간 예측 모드, 화면내 예측 방향, TU 크기, 변환 종류, 변환 크기, 휘도(luma) 신호인지 색차(chroma) 신호인지 등에 기초하여 결정되어거나 적용될 수 있다.
본 발명에 따른 스캐닝 및/또는 그룹핑 방법을 고려하여, 계수의 부호화/복호화와 관련된 컨텍스트 모델(Context Model)의 결정 방법을 변경할 수 있다.
본 발명에 따른 스캐닝 및/또는 그룹핑 방법을 적용하는 경우, CSBF를 부호화/복호화하기 위한 컨텍스트 모델을 선택하기 위해, 현재 부호화/복호화 대상 CG를 기준으로 바로 이전에 부호화/복호화를 수행한 CG의 CSBF 만을 참조할 수 있다. 또는, CSBF의 부호화/복호화를 위해, 현재 TU 내의 CG 중 적어도 하나 이상의 CG가 참조될 수 있다 이때, 참조 CG는 TU 내에서의 위치에 상관없이 선택될 수 있다.
도 41은 본 발명에 따른 스캐닝 및/또는 그룹핑 방법이 적용된 8x8 TU에서 현재 CG의 CSBF를 부호화/복호화할 때의 참조 CG를 설명하기 위한 예시도이다.
스캐닝 순서 상, CSBF의 부호화/복호화 대상인 현재 CG의 직전에 부호화/복호화된 CG의 CSBF 값에 기초하여 컨텍스트 증분값(Context Increment)을 선택할 수 있다. 선택된 컨텍스트 증분값에 기초하여 현재 CG의 CSBF를 부호화/복호화하기 위한 컨텍스트 정보를 획득할 수 있다. 직전 CG에 0이 아닌 계수가 있는지에 관한 확률은 현재 CG에 0이 아닌 계수가 있는지에 관한 확률에 영향을 줄 수 있다. 따라서, 직전 CG의 CSBF 값의 확률은 현재 CG의 CBSF 값의 확률에 영향을 줄 수 있다. 만약 현재 CG가 스캐닝 순서 상 첫번째 CG 인 경우(AC 위치의 계수를 포함하는 CG 인 경우) 또는 직전에 부호화/복호화된 CG의 CSBF가 0인 경우, 현재 CG의 CSBF의 부호화/복호화를 위한 컨텍스트 증분값은 0으로 설정되고, 나머지 경우에는 1로 설정될 수 있다.
또한, sig_coeff_flag의 컨텍스트 모델의 결정 방법을 변경할 수 있다.
도 42는 본 발명에 따른 스캐닝 및/또는 그룹핑 방법을 적용하는 경우, TU 내에서의 계수의 위치에 따라 sig_coeff_flag를 부호화/복호화하기 위한 컨텍스트 모델 참조 방법을 설명하기 위한 도면이다.
예컨대, 본 발명에 따른 스캐닝 및/또는 그룹핑 방법을 적용하는 경우, 현재 CG 내 각 계수의 sig_coeff_flag를 부호화/복호화하기 위한 컨텍스트 모델을 선택할 때, 주변 CG의 CSBF를 이용하지 않고 도 42에 도시된 바와 같이 TU 내에서의 각 계수의 위치에 기반하여 컨텍스트를 선택할 수 있다.
예컨대, TU를 복수의 영역으로 분할하고, 하나의 영역에 대해 동일한 컨텍스트 증분값이 사용될 수 있다. 복수의 영역은 TU의 가로 길이의 N분의 1 및/또는 세로 길이의 M분의 1을 기준으로 결정될 수 있다. N, M은 0보다 큰 양의 정수일 수 있으며, N과 M은 동일하거나 또는 상이할 수 있다.
도 42에 도시된 바와 같이, 각 TU는 적어도 2 개 이상의 영역으로 분할될 수 있다. 도 42는 각 TU가 3개의 영역(A 영역, B 영역, C 영역)으로 분할된 예를 보여준다.
예컨대, A 영역은 수평 좌표가 TU의 가로 길이의 4분의 1보다 작고, 또한 수직 좌표가 TU의 세로 길이의 4분의 1보다 작은 위치를 포함하는 영역일 수 있다. 또는 수평 좌표 및 수직 좌표의 합이 TU의 가로 길이 또는 세로 길이의 4분의 1보다 작은 위치를 포함하는 영역일 수 있다. A 영역에 포함되는 계수들에 대하여 동일한 컨텍스트 증분값이 사용될 수 있다.
B 영역은 TU에서 상기 A 영역을 제외한 부분 중에서 정의될 수 있다. 예컨대, B 영역은 수평 좌표가 TU의 가로 길이의 2분의 1보다 작고, 또한 수직 좌표가 TU의 세로 길이의 2분의 1보다 작은 위치를 포함하는 영역일 수 있다. 또는 수평 좌표 및 수직 좌표의 합이 TU의 가로 길이 또는 세로 길이의 2분의 1보다 작은 위치를 포함하는 영역일 수 있다. B 영역에 포함되는 계수들에 대하여 동일한 컨텍스트 증분값이 사용될 수 있다.
C 영역은 TU에서 상기 A 영역 및 B 영역을 제외한 부분으로 정의될 수 있다. C 영역에 포함되는 계수들에 대하여 동일한 컨텍스트 증분값이 사용될 수 있다.
컨텍스트 증분값이 커지는 것은 sig_coeff_flag의 발생 확률이 높아지는 것을 의미할 수 있다. 이때, 상기 영역은 정사각형, 직사각형, 삼각형 및/또는 오각형 중 적어도 하나 이상의 형태를 가질 수 있다. 상기 영역은 TU의 특성(예컨대, 블록 크기, 블록 형태, 깊이, 예측 모드(인터 또는 인트라), 화면내 예측 모드, 변환의 종류, 성분(휘도 또는 색차))에 기초하여 결정될 수 있다.
또는 컨텍스트 모델을 사용하지 않고 sig_coeff_flag를 부호화/복호화할 수 있다. 예컨대, 부호화기/복호화기의 복잡도를 감소시키기 위하여 컨텍스트 모델을 사용하지 않을 수 있다.
전술한 바와 같이, 본 발명에 따르면, 부호화/복호화 대상 TU 내 계수들을 효율적으로 스캐닝 및/또는 그룹핑하는 방법이 제공될 수 있다. 화면 간 예측을 통해 생성되는 변환 및/또는 양자화된 계수들은 화면 내 예측을 통해 생성되는 변환 및/또는 양자화된 계수들보다 DC 성분 근처에 더 많이 밀집하여 분포할 수 있다. 또한 효율적인 예측(화면 내 예측 또는 화면 간 예측)을 수행함으로써 생성되는 잔여 신호량을 감소시킬 수 있다. 이는 변환 및/또는 양자화된 계수들이 DC 성분 근처에 더 많이 밀집하는 결과를 가져올 수 있다.
하지만 종래 스캐닝 및 그룹핑 방법에 따르면, TU 블록 내 계수들이 DC 성분 근처에 밀집하였을 때 그 효율성이 감소할 수 있다. 본 발명에 따르면, TU 내 계수들은 TU를 기준으로 대각 또는 지그재그 순으로 스캐닝 및/또는 그룹핑될 수 있다. 본 발명에 따른 스캐닝 방법을 적용하면, 1차원으로 나열된 계수 값들이 일정하게 감소하게 되므로, 엔트로피 부호화 측면의 효율이 증가될 수 있다. 또한 본 발명에 따른 그룹핑 방법을 적용하면, TU 내 계수의 분포 특성에 따라 계수가 0일 확률이 큰 주파수 위치의 계수들을 하나로 그룹핑함으로써 그룹 내 계수들이 모두 0인 그룹이 많이 발생할 수 있다. 따라서, 그룹 내 계수를 부호화하는데 필요한 구문 요소 및/또는 플래그를 절약하여, 비트량을 감소시킬 수 있다.
휘도 및 색차신호 각각에 대하여 상기 화면내 부/복호화 과정을 수행할 수 있다. 예를 들어, 상기 화면내 부/복호화 과정에서 화면내 예측 모드 유도, 블록 분할, 참조 샘플 구성, 화면내 예측 수행 중 적어도 하나 이상의 방법이 휘도 신호 및 색차 신호에 대해서 다르게 적용될 수 있다.
휘도 및 색차신호에 대한 상기 화면내 부/복호화 과정을 동일하게 수행할 수 있다. 예를 들어, 휘도 신호에 대하여 적용한 상기 화면내 부/복호화 과정에서 화면내 예측 모드 유도, 블록 분할, 참조 샘플 구성, 화면내 예측 수행 중 적어도 하나를 색차 신호에 동일하게 적용할 수 있다.
상기의 방법들은 부호화기 및 복호화기에서 같은 방법으로 수행할 수 있다. 예를 들어, 상기 화면내 부/복호화 과정에서 화면내 예측 모드 유도, 블록 분할, 참조 샘플 구성, 화면내 예측 수행 중 적어도 하나 이상의 방법이 부호화기 및 복호화기에서 동일하게 적용될 수 있다. 또한, 상기 방법들 적용하는 순서는 부호화기와 복호화기에서 상이할 수 있다. 예를 들어, 상기 현재 블록에 대한 화면내 부/복호화를 수행함에 있어 부호화기에서는 참조 샘플을 구성한 후, 하나 이상의 화면내 예측을 수행하여 결정된 화면내 예측 모드를 부호화할 수 있다.
본 발명의 상기 실시예들은 부호화 블록, 예측 블록, 블록, 유닛 중 적어도 하나 이상의 크기에 따라 적용될 수 있다. 여기서의 크기는 상기 실시예들이 적용되기 위해 최소 크기 및/또는 최대 크기로 정의될 수도 있고, 상기 실시예가 적용되는 고정 크기로 정의될 수도 있다. 또한, 상기 실시예들은 제1 크기에서는 제1의 실시예가 적용될 수 있고, 제2 크기에서는 제2의 실시예가 적용될 수 있다. 즉, 상시 실시예들은 크기에 따라 복합적으로 적용될 수 있다. 또한, 본 발명의 상기 실시예들은 최소 크기 이상 및 최대 크기 이하일 경우에만 적용될 수 있다. 즉, 상기 실시예들을 블록 크기가 일정한 범위 내에 포함될 경우에만 적용될 수 있다.
예를 들어, 부호화/복호화 대상 블록의 크기가 8x8 이상일 경우에만 상기 실시예들이 적용될 수 있다. 예를 들어, 부호화/복호화 대상 블록의 크기가 16x16 이상일 경우에만 상기 실시예들이 적용될 수 있다. 예를 들어, 부호화/복호화 대상 블록의 크기가 32x32 이상일 경우에만 상기 실시예들이 적용될 수 있다. 예를 들어, 부호화/복호화 대상 블록의 크기가 64x64 이상일 경우에만 상기 실시예들이 적용될 수 있다. 예를 들어, 부호화/복호화 대상 블록의 크기가 128x128 이상일 경우에만 상기 실시예들이 적용될 수 있다. 예를 들어, 부호화/복호화 대상 블록의 크기가 4x4일 경우에만 상기 실시예들이 적용될 수 있다. 예를 들어, 부호화/복호화 대상 블록의 크기가 8x8 이하일 경우에만 상기 실시예들이 적용될 수 있다. 예를 들어, 부호화/복호화 대상 블록의 크기가 16x16 이하일 경우에만 상기 실시예들이 적용될 수 있다. 예를 들어, 부호화/복호화 대상 블록의 크기가 8x8 이상이고 16x16 이하일 경우에만 상기 실시예들이 적용될 수 있다. 예를 들어, 부호화/복호화 대상 블록의 크기가 16x16 이상이고 64x64 이하일 경우에만 상기 실시예들이 적용될 수 있다.
본 발명의 상기 실시예들은 시간적 계층(temporal layer)에 따라 적용될 수 있다. 상기 실시예들이 적용 가능한 시간적 계층을 식별하기 위해 별도의 식별자(identifier)가 시그널링되고, 해당 식별자에 의해 특정된 시간적 계층에 대해서 상기 실시예들이 적용될 수 있다. 여기서의 식별자는 상기 실시예가 적용 가능한 최소 계층 및/또는 최대 계층으로 정의될 수도 있고, 상기 실시예가 적용되는 특정 계층을 지시하는 것으로 정의될 수도 있다.
예를 들어, 현재 영상의 시간적 계층이 최하위 계층일 경우에만 상기 실시예들이 적용될 수 있다. 예를 들어, 현재 영상의 시간적 계층 식별자가 0인 경우에만 상기 실시예들이 적용될 수 있다. 예를 들어, 현재 영상의 시간적 계층 식별자가 1 이상인 경우에만 상기 실시예들이 적용될 수 있다. 예를 들어, 현재 영상의 시간적 계층이 최상위 계층일 경우에만 상기 실시예들이 적용될 수 있다.
본 발명의 상기 실시예와 같이 참조 영상 리스트 생성(reference picture list construction) 및 참조 영상 리스트 수정(reference picture list modification) 과정에 사용되는 참조 영상 세트(reference picture set)는 L0, L1, L2, L3 중 적어도 1개 이상의 참조 영상 리스트를 사용할 수 있다.
본 발명의 상기 실시예에 따라 디블록킹 필터(deblocking filter)에서 경계 강도(boundary strength) 산출 시 부호화/복호화 대상 블록의 움직임 벡터를 1개 이상 그리고 최대 N개까지 사용할 수 있다. 여기서 N은 1 이상의 양의 정수를 나타내며, 2, 3, 4 등이 될 수 있다.
움직임 벡터 예측 시 움직임 벡터가 16-화소(16-pel) 단위, 8-화소(8-pel) 단위, 4-화소(4-pel) 단위, 정수-화소(integer-pel) 단위, 1/2-화소(1/2-pel) 단위, 1/4-화소(1/4-pel) 단위, 1/8-화소(1/8-pel) 단위, 1/16-화소(1/16-pel) 단위, 1/32-화소(1/32-pel) 단위, 1/64-화소(1/64-pel) 단위 중 적어도 하나 이상을 가질 때도 본 발명의 상기 실시예들이 적용될 수 있다. 또한 움직임 벡터 예측 수행 시 움직임 벡터는 상기 화소 단위 별로 선택적으로 사용될 수 있다.
본 발명의 상기 실시예들이 적용되는 슬라이스 종류(slice type)이 정의되고, 해당 슬라이스 종류에 따라 본 발명의 상기 실시예들이 적용될 수 있다.
예를 들어, 슬라이스 종류가 T(Tri-predictive)-slice인 경우, 적어도 3개 이상의 움직임 벡터를 이용하여 예측 블록을 생성하고, 적어도 3개 이상의 예측 블록들의 가중 합을 계산하여 부호화/복호화 대상 블록의 최종 예측 블록으로 사용할 수 있다. 예를 들어, 슬라이스 종류가 Q(Quad-predictive)-slice인 경우, 적어도 4개 이상의 움직임 벡터를 이용하여 예측 블록을 생성하고, 적어도 4개 이상의 예측 블록들의 가중 합을 계산하여 부호화/복호화 대상 블록의 최종 예측 블록으로 사용할 수 있다.
본 발명의 상기 실시예들은 움직임 벡터 예측을 이용한 화면 간 예측 및 움직임 보상 방법에 적용될 수 있을 뿐만 아니라, 스킵 모드, 머지 모드 등을 이용한 화면 간 예측 및 움직임 보상 방법에 적용될 수 있다.
본 발명의 상기 실시예들이 적용되는 블록의 형태는 정방형(square) 형태 혹은 비정방형(non-square) 형태를 가질 수 있다.
상술한 실시예들에서, 방법들은 일련의 단계 또는 유닛으로서 순서도를 기초로 설명되고 있으나, 본 발명은 단계들의 순서에 한정되는 것은 아니며, 어떤 단계는 상술한 바와 다른 단계와 다른 순서로 또는 동시에 발생할 수 있다. 또한, 당해 기술 분야에서 통상의 지식을 가진 자라면 순서도에 나타난 단계들이 배타적이지 않고, 다른 단계가 포함되거나, 순서도의 하나 또는 그 이상의 단계가 본 발명의 범위에 영향을 미치지 않고 삭제될 수 있음을 이해할 수 있을 것이다.
상술한 실시예는 다양한 양태의 예시들을 포함한다. 다양한 양태들을 나타내기 위한 모든 가능한 조합을 기술할 수는 없지만, 해당 기술 분야의 통상의 지식을 가진 자는 다른 조합이 가능함을 인식할 수 있을 것이다. 따라서, 본 발명은 이하의 특허청구범위 내에 속하는 모든 다른 교체, 수정 및 변경을 포함한다고 할 것이다.
이상 설명된 본 발명에 따른 실시예들은 다양한 컴퓨터 구성요소를 통하여 수행될 수 있는 프로그램 명령어의 형태로 구현되어 컴퓨터 판독 가능한 기록 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능한 기록 매체는 프로그램 명령어, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 컴퓨터 판독 가능한 기록 매체에 기록되는 프로그램 명령어는 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 분야의 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능한 기록 매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령어를 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령어의 예에는, 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드도 포함된다. 상기 하드웨어 장치는 본 발명에 따른 처리를 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.
이상에서 본 발명이 구체적인 구성요소 등과 같은 특정 사항들과 한정된 실시예 및 도면에 의해 설명되었으나, 이는 본 발명의 보다 전반적인 이해를 돕기 위해서 제공된 것일 뿐, 본 발명이 상기 실시예들에 한정되는 것은 아니며, 본 발명이 속하는 기술분야에서 통상적인 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형을 꾀할 수 있다.
따라서, 본 발명의 사상은 상기 설명된 실시예에 국한되어 정해져서는 아니 되며, 후술하는 특허청구범위뿐만 아니라 이 특허청구범위와 균등하게 또는 등가적으로 변형된 모든 것들은 본 발명의 사상의 범주에 속한다고 할 것이다.
본 발명은 영상을 부호화/복호화하는데 이용될 수 있다.

Claims (20)

  1. 변환 및 양자화 중 적어도 하나를 수행하여 변환 블록을 생성하는 단계;
    상기 변환 블록에 포함된 적어도 하나의 계수를 적어도 하나의 계수 그룹(Coefficient Group, CG)으로 그룹핑하는 단계;
    상기 계수 그룹에 포함된 적어도 하나의 계수를 스캐닝하는 단계; 및
    상기 적어도 하나의 계수를 부호화하는 단계를 포함하는 영상 부호화 방법.
  2. 제1항에 있어서,
    상기 스캐닝은 변환 블록 기준 대각 방향 스캐닝, 변환 블록 기준 지그재그 스캐닝 및 바운더리 스캐닝 중 적어도 하나인 영상 부호화 방법.
  3. 제2항에 있어서,
    상기 스캐닝이 상기 변환 블록 기준 대각 방향 스캐닝인 경우,
    상기 스캐닝은 상기 변환 블록의 우하단 AC 계수 위치에서 DC 계수의 위치의 순서로 수행되거나, 상기 변환 블록의 DC 계수의 위치에서 우하단 AC 계수의 위치의 순서로 수행되고,
    상기 대각 방향은 좌하단 대각 방향 또는 우상단 대각 방향이며,
    상기 적어도 하나의 CG는 각각 상기 스캐닝 순서 상 연속하는 소정 개수의 계수들을 포함하는 영상 부호화 방법.
  4. 제2항에 있어서,
    상기 스캐닝이 상기 변환 블록 기준 지그재그 스캐닝인 경우,
    상기 스캐닝은 상기 변환 블록의 우하단 AC 계수 위치에서 DC 계수의 위치의 순서로 수행되거나, 상기 변환 블록의 DC 계수의 위치에서 우하단 AC 계수의 위치의 순서로 지그재그로 수행되고,
    상기 적어도 하나의 CG는 각각 상기 스캐닝 순서 상 연속하는 소정 개수의 계수들을 포함하는 영상 부호화 방법.
  5. 제2항에 있어서,
    상기 스캐닝이 상기 바운더리 스캐닝인 경우,
    상기 적어도 하나의 CG 중, DC 계수를 포함하는 제1 CG에 대해서는 제1 스캐닝을 적용하고,
    나머지 CG에 대해서는 제2 스캐닝을 적용하며,
    상기 적어도 하나의 CG의 각각은 다른 CG와 크기 또는 형태가 상이한 영상 부호화 방법.
  6. 제5항에 있어서,
    상기 제1 스캐닝은 지그재그 스캐닝이고,
    상기 제2 스캐닝은 수평 및 수직 스캐닝 중 적어도 하나인 영상 부호화 방법.
  7. 제1항에 있어서,
    상기 변환 블록의 소정의 영역을 특정하는 단계를 더 포함하고,
    상기 소정의 영역에 포함된 계수들에 대해서는 스캐닝, 그룹핑 및 부호화 중 적어도 하나를 수행하지 않는 영상 부호화 방법.
  8. 제7항에 있어서,
    상기 소정의 영역은 상기 변환 블록 내 계수의 좌표에 기초하여 특정되는 영상 부호화 방법.
  9. 제1항에 있어서,
    상기 변환 블록이 직사각형일 때,
    상기 스캐닝은 지그재그 스캐닝이고,
    상기 지그재그 스캐닝은 상기 변환 블록의 가로 또는 세로 중 보다 긴 쪽으로 기울어진 지그재그 스캐닝인 영상 부호화 방법.
  10. 변환 블록에 포함된 적어도 하나의 계수를 스캐닝하는 것에 관한 스캐닝 정보 또는 상기 스캐닝에 기초하여 상기 적어도 하나의 계수를 적어도 하나의 계수 그룹(Coefficient Group, CG)으로 그룹핑하는 것에 관한 그룹핑 정보를 식별하는 단계;
    비트스트림으로부터 변환 블록에 포함된 적어도 하나의 계수를 복호화하는 단계; 및
    상기 적어도 하나의 계수에 기초하여 상기 변환 블록을 복원하는 단계를 포함하고,
    상기 적어도 하나의 계수를 복호화하는 단계는 상기 스캐닝 정보 및 그룹핑 정보 중 적어도 하나에 기초하여 수행되는 영상 복호화 방법.
  11. 제10항에 있어서,
    상기 스캐닝은 변환 블록 기준 대각 방향 스캐닝, 변환 블록 기준 지그재그 스캐닝 및 바운더리 스캐닝 중 적어도 하나인 영상 복호화 방법.
  12. 제11항에 있어서,
    상기 스캐닝이 상기 변환 블록 기준 대각 방향 스캐닝인 경우,
    상기 스캐닝은 상기 변환 블록의 우하단 AC 계수 위치에서 DC 계수의 위치의 순서로 수행되거나, 상기 변환 블록의 DC 계수의 위치에서 우하단 AC 계수의 위치의 순서로 수행되고,
    상기 대각 방향은 좌하단 대각 방향 또는 우상단 대각 방향이며,
    상기 적어도 하나의 CG는 각각 상기 스캐닝 순서 상 연속하는 소정 개수의 계수들을 포함하는 영상 복호화 방법.
  13. 제11항에 있어서,
    상기 스캐닝이 상기 변환 블록 기준 지그재그 스캐닝인 경우,
    상기 스캐닝은 상기 변환 블록의 우하단 AC 계수 위치에서 DC 계수의 위치의 순서로 수행되거나, 상기 변환 블록의 DC 계수의 위치에서 우하단 AC 계수의 위치의 순서로 지그재그로 수행되고,
    상기 적어도 하나의 CG는 각각 상기 스캐닝 순서 상 연속하는 소정 개수의 계수들을 포함하는 영상 복호화 방법.
  14. 제11항에 있어서,
    상기 스캐닝이 상기 바운더리 스캐닝인 경우,
    상기 적어도 하나의 CG 중, DC 계수를 포함하는 제1 CG에 대해서는 제1 스캐닝을 적용하고,
    나머지 CG에 대해서는 제2 스캐닝을 적용하며,
    상기 적어도 하나의 CG의 각각은 다른 CG와 크기 또는 형태가 상이한 영상 복호화 방법.
  15. 제14항에 있어서,
    상기 제1 스캐닝은 지그재그 스캐닝이고,
    상기 제2 스캐닝은 수평 및 수직 스캐닝 중 적어도 하나인 영상 복호화 방법.
  16. 제10항에 있어서,
    상기 변환 블록의 소정의 영역을 특정하는 단계를 더 포함하고,
    상기 소정의 영역에 포함된 계수들은 0으로 설정되는 영상 복호화 방법.
  17. 제16항에 있어서,
    상기 소정의 영역은 상기 변환 블록 내 계수의 좌표에 기초하여 특정되는 영상 복호화 방법.
  18. 제10항에 있어서,
    상기 변환 블록이 직사각형일 때,
    상기 스캐닝은 지그재그 스캐닝이고,
    상기 지그재그 스캐닝은 상기 변환 블록의 가로 또는 세로 중 보다 긴 쪽으로 기울어진 지그재그 스캐닝인 영상 복호화 방법.
  19. 변환 및 양자화 중 적어도 하나를 수행하여 변환 블록을 생성하고, 상기 변환 블록에 포함된 적어도 하나의 계수를 적어도 하나의 계수 그룹(Coefficient Group, CG)으로 그룹핑하고, 상기 계수 그룹에 포함된 적어도 하나의 계수를 스캐닝하고, 상기 적어도 하나의 계수를 부호화하는 부호화부를 포함하는 영상 부호화 장치.
  20. 변환 및 양자화 중 적어도 하나를 수행하여 변환 블록을 생성하는 단계;
    상기 변환 블록에 포함된 적어도 하나의 계수를 적어도 하나의 계수 그룹(Coefficient Group, CG)으로 그룹핑하는 단계;
    상기 계수 그룹에 포함된 적어도 하나의 계수를 스캐닝하는 단계; 및
    상기 적어도 하나의 계수를 부호화하는 단계를 포함하는 영상 부호화 방법에 의해 생성된 비트스트림을 저장하는 기록매체.
PCT/KR2017/007363 2016-07-13 2017-07-10 영상 부호화/복호화 방법 및 장치 WO2018012830A1 (ko)

Priority Applications (7)

Application Number Priority Date Filing Date Title
US16/308,208 US11863798B2 (en) 2016-07-13 2017-07-10 Image encoding/decoding method and device
CN202311337844.0A CN117412043A (zh) 2016-07-13 2017-07-10 图像编码/解码方法和装置
CN202311338274.7A CN117412044A (zh) 2016-07-13 2017-07-10 图像编码/解码方法和装置
CN202311340532.5A CN117412045A (zh) 2016-07-13 2017-07-10 图像编码/解码方法和装置
CN202311337836.6A CN117412042A (zh) 2016-07-13 2017-07-10 图像编码/解码方法和装置
CN201780043698.7A CN109479138B (zh) 2016-07-13 2017-07-10 图像编码/解码方法和装置
US18/513,906 US20240098311A1 (en) 2016-07-13 2023-11-20 Image encoding/decoding method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20160088670 2016-07-13
KR10-2016-0088670 2016-07-13

Related Child Applications (2)

Application Number Title Priority Date Filing Date
US16/308,208 A-371-Of-International US11863798B2 (en) 2016-07-13 2017-07-10 Image encoding/decoding method and device
US18/513,906 Continuation US20240098311A1 (en) 2016-07-13 2023-11-20 Image encoding/decoding method and device

Publications (1)

Publication Number Publication Date
WO2018012830A1 true WO2018012830A1 (ko) 2018-01-18

Family

ID=60952613

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2017/007363 WO2018012830A1 (ko) 2016-07-13 2017-07-10 영상 부호화/복호화 방법 및 장치

Country Status (4)

Country Link
US (2) US11863798B2 (ko)
KR (3) KR20180007680A (ko)
CN (5) CN109479138B (ko)
WO (1) WO2018012830A1 (ko)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110784724A (zh) * 2018-07-31 2020-02-11 腾讯美国有限责任公司 控制用于解码或编码视频序列的残差编码的方法和装置
CN113170129A (zh) * 2018-12-19 2021-07-23 高通股份有限公司 用于视频编解码的基于树的变换单元(tu)分割
RU2809181C2 (ru) * 2018-12-19 2023-12-07 Квэлкомм Инкорпорейтед Сегментация единиц преобразования (tu) на основе дерева для кодирования видео

Families Citing this family (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018044087A1 (ko) * 2016-08-31 2018-03-08 주식회사 케이티 비디오 신호 처리 방법 및 장치
US20180242016A1 (en) * 2017-02-21 2018-08-23 Intel Corporation Deblock filtering for 360 video
JP2019017066A (ja) * 2017-07-03 2019-01-31 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America 符号化装置、復号装置、符号化方法及び復号方法
US10523968B2 (en) * 2017-09-18 2019-12-31 Google Llc Coding of last significant coefficient flags
US11166045B2 (en) * 2017-10-11 2021-11-02 Lg Electronics Inc. Method for image coding on basis of separable transform and apparatus therefor
CN116614644A (zh) 2018-03-27 2023-08-18 株式会社Kt 对图像进行解码或编码的方法以及图像数据的传送方法
CA3101091A1 (en) * 2018-06-06 2019-12-12 Panasonic Intellectual Property Corporation Of America Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device
US11350093B2 (en) 2018-06-11 2022-05-31 Hanwha Techwin Co., Ltd. Residual coefficient encoding/decoding method and device
KR102030384B1 (ko) 2018-06-19 2019-11-08 광운대학교 산학협력단 잔차 계수 부호화/복호화 방법 및 장치
CN110650343A (zh) * 2018-06-27 2020-01-03 中兴通讯股份有限公司 图像的编码、解码方法及装置、电子设备及系统
AU2018204786A1 (en) * 2018-06-29 2020-01-16 Canon Kabushiki Kaisha Method, apparatus and system for encoding and decoding a transformed block of video samples
WO2020013514A1 (ko) * 2018-07-08 2020-01-16 엘지전자 주식회사 비디오 신호를 처리하기 위한 방법 및 장치
KR20200007671A (ko) * 2018-07-13 2020-01-22 한국전자통신연구원 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
CN116074508A (zh) 2018-09-05 2023-05-05 Lg电子株式会社 对图像信号进行编码/解码的设备及发送图像信号的设备
US11303904B2 (en) * 2018-09-28 2022-04-12 Qualcomm Incorporated Rectangular block transform scaling
US11412260B2 (en) * 2018-10-29 2022-08-09 Google Llc Geometric transforms for image compression
EP3878175B1 (en) * 2018-11-08 2024-03-27 InterDigital VC Holdings, Inc. Quantization for video encoding or decoding based on the surface of a block
KR20210098967A (ko) * 2019-01-01 2021-08-11 엘지전자 주식회사 이차 변환에 기반한 영상 코딩 방법 및 그 장치
WO2020196655A1 (ja) * 2019-03-25 2020-10-01 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 符号化装置、復号装置、符号化方法、および復号方法
JP2022537160A (ja) * 2019-06-19 2022-08-24 エルジー エレクトロニクス インコーポレイティド 変換に基づく映像コーディング方法及びその装置
JP2022536967A (ja) * 2019-06-21 2022-08-22 ヴィド スケール インコーポレイテッド オプティカルフローによる動き補償のための精度精緻化
US11323743B2 (en) * 2019-08-26 2022-05-03 Tencent America LLC Interaction between CU partitions and sub-block transform
US11418792B2 (en) * 2020-03-27 2022-08-16 Tencent America LLC Estimating attributes for the classification of adaptive loop filtering based on projection-slice theorem
US11032546B1 (en) * 2020-07-20 2021-06-08 Tencent America LLC Quantizer for lossless and near-lossless compression
US11722678B2 (en) 2020-08-25 2023-08-08 Tencent America LLC Method and apparatus for transform skip coefficients coding
CN112364319B (zh) * 2020-10-12 2022-12-23 西安电子科技大学 一种基于二叉树混洗的生物特征模板保护方法及装置
CN116601953A (zh) * 2020-11-24 2023-08-15 抖音视界有限公司 编解码视频中的位置相关系数重新排序
US11792431B2 (en) 2021-04-07 2023-10-17 Tencent America LLC Orthogonal transform generation with subspace constraint
WO2023132660A1 (ko) * 2022-01-05 2023-07-13 주식회사 윌러스표준기술연구소 종속 양자화를 이용한 비디오 신호 처리 방법 및 이를 위한 장치
KR102611423B1 (ko) * 2022-07-01 2023-12-07 주식회사 네패스 이미지 스케일링 장치 및 이미지 스케일링 방법

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030128753A1 (en) * 2002-01-07 2003-07-10 Samsung Electronics Co., Ltd. Optimal scanning method for transform coefficients in coding/decoding of image and video
WO2008157431A2 (en) * 2007-06-15 2008-12-24 Qualcomm Incorporated Adaptive coefficient scanning for video coding
EP2595380A1 (en) * 2011-11-19 2013-05-22 Research In Motion Limited Multi-level significance map scanning
KR20130129462A (ko) * 2011-03-08 2013-11-28 퀄컴 인코포레이티드 비디오 코딩을 위한 변환 계수들의 코딩
US20150078432A1 (en) * 2013-09-19 2015-03-19 Blackberry Limited Coding position data for the last non-zero transform coefficient in a coefficient group

Family Cites Families (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007079782A1 (en) * 2006-01-13 2007-07-19 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Quality scalable picture coding with particular transform coefficient scan path
KR101375668B1 (ko) * 2008-03-17 2014-03-18 삼성전자주식회사 변환 계수의 부호화, 복호화 방법 및 장치
EP2182732A1 (en) * 2008-10-28 2010-05-05 Panasonic Corporation Switching between scans in image coding
KR101675116B1 (ko) * 2009-08-06 2016-11-10 삼성전자 주식회사 영상의 부호화 방법 및 장치, 그 복호화 방법 및 장치
WO2011087271A2 (ko) * 2010-01-12 2011-07-21 엘지전자 주식회사 비디오 신호의 처리 방법 및 장치
KR101373814B1 (ko) * 2010-07-31 2014-03-18 엠앤케이홀딩스 주식회사 예측 블록 생성 장치
US10992958B2 (en) * 2010-12-29 2021-04-27 Qualcomm Incorporated Video coding using mapped transforms and scanning modes
KR101876173B1 (ko) * 2011-06-17 2018-07-09 엘지전자 주식회사 인트라 예측 모드 부호화/복호화 방법 및 장치
JP2013038758A (ja) * 2011-07-13 2013-02-21 Canon Inc 画像符号化装置、画像符号化方法及びプログラム、画像復号装置、画像復号方法及びプログラム
EP2735154A1 (en) * 2011-07-22 2014-05-28 Motorola Mobility LLC Device and methods for scanning rectangular-shaped transforms in video coding
CA2853002C (en) * 2011-10-18 2017-07-25 Kt Corporation Method for encoding image, method for decoding image, image encoder, and image decoder
US10390046B2 (en) * 2011-11-07 2019-08-20 Qualcomm Incorporated Coding significant coefficient information in transform skip mode
KR101830352B1 (ko) * 2011-11-09 2018-02-21 에스케이 텔레콤주식회사 스킵모드를 이용한 동영상 부호화 및 복호화 방법 및 장치
US9894386B2 (en) 2012-04-12 2018-02-13 Goldpeak Innovations Inc. Transform method based on block information, and apparatus using said method
CN104350753B (zh) * 2012-06-01 2019-07-09 威勒斯媒体国际有限公司 算术解码装置、图像解码装置、算术编码装置以及图像编码装置
CN109905710B (zh) * 2012-06-12 2021-12-21 太阳专利托管公司 动态图像编码方法及装置、动态图像解码方法及装置
FI2869557T3 (fi) * 2012-06-29 2023-11-02 Electronics & Telecommunications Res Inst Menetelmä ja laite kuvien koodaamiseksi/dekoodaamiseksi
US9319684B2 (en) * 2012-08-21 2016-04-19 Qualcomm Incorporated Alternative transform in scalable video coding
US20140254661A1 (en) 2013-03-08 2014-09-11 Samsung Electronics Co., Ltd. Method and apparatus for applying secondary transforms on enhancement-layer residuals
KR20140129417A (ko) * 2013-04-29 2014-11-07 인텔렉추얼디스커버리 주식회사 복수의 트랜스폼들을 이용한 영상 부호화/복호화 방법 및 장치
KR101569912B1 (ko) * 2013-12-17 2015-11-27 세종대학교산학협력단 영상의 복호화/부호화 방법 및 장치
US10306229B2 (en) * 2015-01-26 2019-05-28 Qualcomm Incorporated Enhanced multiple transforms for prediction residual
US10491922B2 (en) * 2015-09-29 2019-11-26 Qualcomm Incorporated Non-separable secondary transform for video coding
KR101707164B1 (ko) * 2016-03-11 2017-02-15 성균관대학교산학협력단 영상의 부호화/복호화 방법 및 이를 이용하는 장치

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030128753A1 (en) * 2002-01-07 2003-07-10 Samsung Electronics Co., Ltd. Optimal scanning method for transform coefficients in coding/decoding of image and video
WO2008157431A2 (en) * 2007-06-15 2008-12-24 Qualcomm Incorporated Adaptive coefficient scanning for video coding
KR20130129462A (ko) * 2011-03-08 2013-11-28 퀄컴 인코포레이티드 비디오 코딩을 위한 변환 계수들의 코딩
EP2595380A1 (en) * 2011-11-19 2013-05-22 Research In Motion Limited Multi-level significance map scanning
US20150078432A1 (en) * 2013-09-19 2015-03-19 Blackberry Limited Coding position data for the last non-zero transform coefficient in a coefficient group

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110784724A (zh) * 2018-07-31 2020-02-11 腾讯美国有限责任公司 控制用于解码或编码视频序列的残差编码的方法和装置
CN110784724B (zh) * 2018-07-31 2022-07-22 腾讯美国有限责任公司 控制用于解码或编码视频序列的残差编码的方法和装置
CN113170129A (zh) * 2018-12-19 2021-07-23 高通股份有限公司 用于视频编解码的基于树的变换单元(tu)分割
US11323748B2 (en) * 2018-12-19 2022-05-03 Qualcomm Incorporated Tree-based transform unit (TU) partition for video coding
RU2809181C2 (ru) * 2018-12-19 2023-12-07 Квэлкомм Инкорпорейтед Сегментация единиц преобразования (tu) на основе дерева для кодирования видео

Also Published As

Publication number Publication date
KR20180007680A (ko) 2018-01-23
CN117412045A (zh) 2024-01-16
CN117412043A (zh) 2024-01-16
KR20230004401A (ko) 2023-01-06
US20240098311A1 (en) 2024-03-21
CN109479138B (zh) 2023-11-03
US11863798B2 (en) 2024-01-02
CN117412042A (zh) 2024-01-16
KR20210154942A (ko) 2021-12-21
KR102481325B1 (ko) 2022-12-26
CN117412044A (zh) 2024-01-16
US20190306536A1 (en) 2019-10-03
CN109479138A (zh) 2019-03-15

Similar Documents

Publication Publication Date Title
WO2018012830A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2017222334A1 (ko) 변환 기반의 영상 부호화/복호화 방법 및 장치
WO2018016823A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2017222237A1 (ko) 화면 내 예측 방법 및 장치
WO2018026166A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2019098758A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2018012886A1 (ko) 영상 부호화/복호화 방법 및 이를 위한 기록 매체
WO2019172705A1 (ko) 샘플 필터링을 이용한 영상 부호화/복호화 방법 및 장치
WO2018199675A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2019177354A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2018030773A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2018026148A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2019182385A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2020004987A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2018012851A1 (ko) 영상 부호화/복호화 방법 및 이를 위한 기록 매체
WO2019027241A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2020060185A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2018097692A2 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2020060184A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2020005035A1 (ko) 처리율 향상을 위한 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2020256447A1 (ko) 2차 변환을 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2020005031A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2020180162A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2020222617A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020060243A1 (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: 17827901

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

Country of ref document: EP

Kind code of ref document: A1