WO2019117402A1 - Video decoding method and device thereof, and video encoding method and device thereof - Google Patents

Video decoding method and device thereof, and video encoding method and device thereof Download PDF

Info

Publication number
WO2019117402A1
WO2019117402A1 PCT/KR2018/003820 KR2018003820W WO2019117402A1 WO 2019117402 A1 WO2019117402 A1 WO 2019117402A1 KR 2018003820 W KR2018003820 W KR 2018003820W WO 2019117402 A1 WO2019117402 A1 WO 2019117402A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
coefficient
video decoding
decoding apparatus
scan
Prior art date
Application number
PCT/KR2018/003820
Other languages
French (fr)
Korean (ko)
Inventor
표인지
Original Assignee
삼성전자 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자 주식회사 filed Critical 삼성전자 주식회사
Priority to CN201880089303.1A priority Critical patent/CN111788830B/en
Priority to KR1020207011249A priority patent/KR102653848B1/en
Priority to CN202310293317.8A priority patent/CN116132674A/en
Priority to CN202310286386.6A priority patent/CN116132673A/en
Publication of WO2019117402A1 publication Critical patent/WO2019117402A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • 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/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

Definitions

  • a video decoding method and a video encoding method are particularly to entropy decoding and entropy encoding.
  • the image data in the spatial domain is transformed into coefficients in the frequency domain using frequency conversion.
  • the video codec divides an image into blocks of a predetermined size for fast calculation of frequency conversion, performs DCT conversion on each block, and encodes frequency coefficients on a block-by-block basis.
  • coefficients in the frequency domain have a form that is easy to compress.
  • the image pixel values of the spatial domain are expressed by prediction errors through inter prediction or intra prediction of the video codec, many data can be converted to 0 when the frequency transformation is performed on the prediction error.
  • Video codecs reduce the amount of data by replacing consecutively repeated data with small-sized data.
  • entropy decoding efficiency can be increased by determining scan areas based on various factors, scanning information about coefficients, and performing binary arithmetic coding / decoding based on binarization / inverse binarization and context model .
  • Readable recording medium on which a program for implementing the method according to various embodiments is recorded.
  • the video decoding method includes: determining a rectangular scan area including all effective transform coefficients in a current block; Scanning information on the transform coefficients in the quadrangular scan area according to a predetermined scan order; And obtaining transform coefficients of the current block based on information about the scanned transform coefficients; Performing inverse quantization and inverse transform on the transform coefficients of the current block to generate a residual block of the current block; And reconstructing a current block based on the generated residual block.
  • the rectangle scan area includes all effective transform coefficients in the current block, and the remaining area in the current block excluding the square scan area may include only a transform coefficient having a value of 0, which is not an effective transform coefficient.
  • step of determining the rectangular scan area comprises:
  • the coordinates specifying the quadrangular scan area may indicate a horizontal direction coordinate of the effective transformation coefficient located at the rightmost position in the current block and a vertical direction coordinate of the effective transformation coefficient located at the lowermost position in the current block.
  • the step of acquiring information on coordinates specifying the quadrangular scan area from a bitstream comprises:
  • the context model may be determined based on at least one of a size of the current block, a color component of the current block, and a bin index.
  • the predetermined inverse binarization method may be at least one of a fixed length inverse binarization method and a truncated unary inverse binarization method.
  • the predetermined scan order may be an order according to an inverse zig-zag scan or an order according to an inverse diagonal scan.
  • the predetermined scan order may be determined based on at least one of a horizontal direction coordinate of the effective transformation coefficient pixel located at the rightmost position in the current block and a vertical direction coordinate of the effective transformation coefficient pixel located at the bottommost position in the current block .
  • the information on the transform coefficients may be,
  • a flag information indicating whether an absolute value of the transform coefficient is larger than a predetermined value, remaining level information about an absolute value of the transform coefficient, sign information of the transform coefficient, And binarization parameter information, and the predetermined value may be at least one of 0, 1, and 2.
  • obtaining the transform coefficients of the current block based on the information about the scanned transform coefficients comprises:
  • the flag information indicating whether the absolute value of the transform coefficients is larger than a predetermined value includes a first transform coefficient
  • the context model of flag information indicating whether the absolute value of the first transform coefficient is larger than a predetermined value includes information on at least one second transform coefficient previously scanned in accordance with the predetermined scan order, At least one of a position and a color component of the first transformation coefficient, information on the right or lower peripheral transformation coefficient, and a scan position of the first transformation coefficient, a relative position in the scan region of the first transformation coefficient, . ≪ / RTI >
  • the information on the transform coefficients includes flag information indicating whether the absolute value of the transform coefficient is larger than a predetermined value
  • the maximum count of the flag information that can be obtained from the bitstream may be determined based on the size of the scan area.
  • the scan order of each of the transformation coefficients in the rectangular scan region is determined according to a predetermined scan order
  • the step of scanning information on the transformation coefficients in the rectangular scan region according to a predetermined scan order includes: May be scanned according to the scan order of each transform coefficient in the quadrangle scan area.
  • At least one coefficient group including a predetermined plurality of transform coefficients in the rectangular scan region is determined according to a predetermined forward scan order
  • Whether to hide information on the sign of at least one transform coefficient in units of the coefficient group can be determined.
  • the video decoding apparatus determines a quadrangular scan region including all the effective transform coefficients in the current block, scans the information about the transform coefficients in the quadrangular scan region according to a predetermined scan order, An entropy decoding unit for obtaining transform coefficients of the current block based on information on coefficients; And an image restoration unit for generating a residual block of the current block by performing inverse quantization and inverse transform on the transform coefficients of the current block and restoring the current block based on the generated residual block.
  • a video encoding method includes: obtaining transform coefficients of a current block; Determining a rectangular scan area including all the effective transform coefficients in the current block; Scanning the information on the transform coefficients included in the quadrangular scan area according to a predetermined scan order; Generating entropy-encoded information by entropy encoding based on the information about the scanned transform coefficients; And generating a bitstream including the entropy-encoded information.
  • Readable recording medium on which a program for implementing the method according to various embodiments is recorded.
  • entropy decoding efficiency can be increased by determining scan areas based on various factors, scanning information about coefficients, and performing binary arithmetic coding / decoding based on binarization / inverse binarization and context model .
  • a rectangular scan region including all the effective transform coefficients in the current block is determined, unnecessary scans are reduced by scanning the transform coefficients in the rectangular scan region, The entropy decoding efficiency can be improved by scanning the coefficients adjacent to each other.
  • FIG. 1A shows a block diagram of a video decoding apparatus according to various embodiments.
  • FIG. 1B shows a flow diagram of a video decoding method according to various embodiments.
  • FIG. 1C shows a block diagram of a video encoding apparatus according to various embodiments.
  • Figure 1D shows a flow diagram of a video encoding method according to various embodiments.
  • FIG. 1E shows a block diagram of an image decoding unit according to various embodiments.
  • FIG. 1F shows a block diagram of an image decoding unit according to various embodiments
  • FIG. 2 is a diagram for explaining a method of scanning intra-block transform coefficients according to an embodiment.
  • 3A is a diagram for explaining a method of scanning an intra-block transform coefficient according to another embodiment.
  • FIG. 3B is a diagram for explaining an operation of determining intra-block coefficient groups (sub-blocks) and an operation performed for each coefficient group according to another embodiment.
  • FIG. 4 is a diagram for explaining a process of determining a context model for decoding context-based binary arithmetic decoding information on transform coefficients according to an exemplary embodiment of the present invention.
  • FIG. 5 is a diagram for explaining a process of determining a context model for decoding context-based binary arithmetic decoding information on transform coefficients according to another embodiment.
  • FIG. 6A is a diagram for explaining a horizontal priority zigzag scan order for scanning information on intra-block transform coefficients according to an exemplary embodiment.
  • 6B is a diagram for explaining a vertical priority zigzag scan order for scanning information on intra-block transform coefficients according to an embodiment.
  • FIG. 7A is a diagram for explaining a horizontal scanning order for scanning information on intra-block transform coefficients according to an embodiment.
  • FIG. 7B is a diagram for explaining a vertical scanning order for scanning information on intra-block transform coefficients according to an embodiment.
  • FIG. 8 is a diagram for explaining a diagonal scan order for scanning information on intra-block transform coefficients according to an embodiment.
  • 9A to 9C are diagrams for explaining a residual coding syntax structure according to an embodiment.
  • 9D to 9F are diagrams for explaining a residual coding syntax structure according to another embodiment.
  • FIG. 10 illustrates a process in which at least one encoding unit is determined by dividing a current encoding unit according to an embodiment.
  • FIG. 11 illustrates a process in which at least one encoding unit is determined by dividing a non-square encoding unit according to an embodiment.
  • FIG. 12 illustrates a process in which an encoding unit is divided based on at least one of block type information and division type information according to an embodiment.
  • FIG. 13 illustrates a method of determining a predetermined encoding unit among odd number of encoding units according to an embodiment.
  • FIG. 14 shows a sequence in which a plurality of encoding units are processed when a current encoding unit is divided to determine a plurality of encoding units according to an embodiment.
  • FIG. 15 illustrates a process in which, when an encoding unit can not be processed in a predetermined order according to an embodiment, it is determined that the current encoding unit is divided into odd number of encoding units.
  • FIG. 16 illustrates a process in which a first encoding unit is divided into at least one encoding unit according to an embodiment of the present invention.
  • FIG. 17 shows that when the non-square type second coding unit determined by dividing the first coding unit according to an embodiment satisfies a predetermined condition, the form in which the second coding unit can be divided is limited .
  • FIG. 18 illustrates a process of dividing a square-shaped encoding unit when the division type information can not indicate division into four square-shaped encoding units according to an embodiment
  • FIG. 19 illustrates that the processing order among a plurality of coding units may be changed according to the division process of the coding unit according to an embodiment.
  • FIG. 20 illustrates a process of determining the depth of an encoding unit according to a change in type and size of an encoding unit when the encoding unit is recursively divided according to an embodiment to determine a plurality of encoding units.
  • FIG. 21 illustrates a depth index (PID) for coding unit classification and depth that can be determined according to the type and size of coding units according to an exemplary embodiment.
  • PID depth index
  • FIG. 22 shows that a plurality of coding units are determined according to a plurality of predetermined data units included in a picture according to an embodiment.
  • FIG. 23 shows a processing block serving as a reference for determining a determination order of a reference encoding unit included in a picture according to an embodiment.
  • the video decoding method includes: determining a rectangular scan area including all effective transform coefficients in a current block; Scanning information on the transform coefficients in the quadrangular scan area according to a predetermined scan order; And obtaining transform coefficients of the current block based on information about the scanned transform coefficients; Performing inverse quantization and inverse transform on the transform coefficients of the current block to generate a residual block of the current block; And reconstructing a current block based on the generated residual block.
  • the video decoding apparatus determines a quadrangular scan region including all the effective transform coefficients in the current block, scans the information about the transform coefficients in the quadrangular scan region according to a predetermined scan order, An entropy decoding unit for obtaining transform coefficients of the current block based on information on coefficients; And an image restoration unit for generating a residual block of the current block by performing inverse quantization and inverse transform on the transform coefficients of the current block and restoring the current block based on the generated residual block.
  • a video encoding method includes: obtaining transform coefficients of a current block; Determining a rectangular scan area including all the effective transform coefficients in the current block; Scanning the information on the transform coefficients included in the quadrangular scan area according to a predetermined scan order; Generating entropy-encoded information by entropy encoding based on the information about the scanned transform coefficients; And generating a bitstream including the entropy-encoded information.
  • Readable recording medium on which a program for implementing the method according to various embodiments is recorded.
  • 'video' may be a still image of a video or a video, that is, a video itself.
  • sample' means data to be processed as data assigned to a sampling position of an image.
  • pixels in an image in the spatial domain may be samples.
  • the 'current block' may refer to a block of an image to be encoded or decoded.
  • FIG. 1A shows a block diagram of a video decoding apparatus according to various embodiments.
  • the video decoding apparatus 100 may include an entropy decoding unit 105 and an image restoring unit 120.
  • the entropy decoding unit 105 may obtain syntax element information received from the bitstream and entropy-decode the syntax element information.
  • the syntax element information received from the bitstream may be information on various syntax elements related to the image.
  • the entropy decoding unit 105 can obtain syntax element information on the current intra-block transformation coefficient from the bitstream and entropy-decode the syntax element information on the current intra-block transformation coefficient.
  • the current block may be a data unit that can be used in the process of attaching / decrypting an image described with reference to FIG. 10 to FIG.
  • the entropy decoding unit 105 may obtain information on the current intra-block transform coefficients by scanning the syntax element information about the transform coefficients in the current entropy-decoded block according to a predetermined scan order.
  • the predetermined scan order may be a reverse scan order.
  • the reverse scan order may be a scan order from the pixels on the lower right side in the block to the transform coefficient pixels on the upper left side in the block.
  • the order in which the transform coefficients are scanned in the order of the transform coefficients located on the lower left side from the upper left side transform coefficient pixels can be referred to as the forward scan order and the transform coefficients are scanned from the last transform coefficient located on the lower right side to the order of the upper left side transform coefficients May be referred to as the reverse scan order.
  • the syntax element information on the current intra-block conversion coefficient may be flag information indicating whether the intra-block conversion coefficient is larger than a predetermined value.
  • the predetermined value may be an integer value equal to or greater than zero. For example, 0, 1 or 2.
  • the syntax element information regarding the current intra-block transformation coefficient may be syntax element information indicating a remaining level absolute value.
  • the residual level absolute value may mean the difference between the absolute value of the level of the transform coefficient and the absolute value of the base level.
  • the absolute value of the base level may be determined based on the syntax element information indicating that the absolute value of the transform coefficient is larger than a predetermined value.
  • a flag indicating whether the absolute value of the transform coefficient is greater than 0 (or whether the transform coefficient is an effective transform coefficient, where the effective transform coefficient means a transform coefficient whose absolute value of the transform coefficient is larger than 0)
  • Flag (Greater than 1 flag or coeff_abs_level_greater1_flag; hereinafter referred to as GT1 flag) indicating whether or not the value of the flag is greater than 2 and the value of the information (Greater than 0 flag or sig_coeff_flag; hereinafter referred to as GT0 flag) (The Greater than 2 flag or the coeff_abs_level_greater2_flag; referred to as the GT2 flag) may be the absolute value of the base level.
  • the value of the flag information may be 1, and if it is smaller than the predetermined value, May be zero. On the other hand, some of the flag information may not be obtained from the bitstream.
  • a flag GTn indicating whether the magnitude of the transform coefficient is larger than n (n is an integer)
  • a flag GT (n + 1) indicating whether the magnitude of the transform coefficient is larger than (n + 1) (N + 1), which is a relatively smaller value among the reference values of n, n + 1 and n + 2, when the coefficient GT (n +
  • the entropy decoding unit 105 excludes the GT2 flag.
  • the absolute value of the conversion coefficient obtained by subtracting 2 from the absolute value of the conversion coefficient can be determined as the absolute value of the residual level of the conversion coefficient using only the GT0 flag information and the GT1 flag information.
  • the entropy decoding unit 105 determines that the absolute value of the transform coefficient is larger than 2
  • the absolute value can be determined as the absolute value of the residual level of the transform coefficient. That is, the absolute value of the residual level may indicate an absolute value difference between the absolute value of the effective transform coefficient and a predetermined absolute value determined based on information indicating whether the absolute value of the transform coefficient is larger than a predetermined value.
  • the entropy decoding unit 105 obtains the syntax element information received from the bitstream, performs binary arithmetic decoding on the syntax element information, performs binary arithmetic decoding, and outputs an empty string bin string can be performed inverse binarization.
  • the binary arithmetic decoding operation may be performed in the binary arithmetic decoding unit 110, and the inverse binarization operation may be performed in the inverse binarization unit 115.
  • the binary arithmetic decoding unit 110 may perform binary arithmetic decoding based on a predetermined context model on the syntax element information obtained from the bitstream.
  • the context model may be information on the probability of occurrence of a bin.
  • the information on the probability of occurrence of the bean includes information (valMPS) indicating one symbol of LPS (Least Propable Symbol), which is a relatively low probability of occurrence of two symbols 0 and 1, and a Least Probable Symbol (MPS) And information on the probability of occurrence of one symbol.
  • valMPS information indicating one symbol of LPS (Least Propable Symbol), which is a relatively low probability of occurrence of two symbols 0 and 1, and a Least Probable Symbol (MPS) And information on the probability of occurrence of one symbol.
  • MPS Least Probable Symbol
  • the information on the probability of occurrence of the other symbol is information on the probability of subtracting the occurrence probability for the predetermined symbol from 1
  • the binary arithmetic decoding unit 110 can determine the probability of occurrence of the remaining symbols.
  • the probability of occurrence of one symbol to be determined first may be the probability of occurrence of LPS (Least Probable Symbol).
  • the occurrence probabilities of symbols corresponding to the index values can be determined in advance in the table, and the occurrence probability information for the symbols can be information (pStateIdx) indicating an index indicating occurrence probabilities of symbols determined in the table.
  • the predetermined context model may be determined based on an index (bin index) indicating the location of the bean, a probability of occurrence of a bean included in a neighboring block of the block including the bean, and various elements of the current block or neighboring blocks.
  • index bin index
  • the binary arithmetic decoding unit 110 may perform binary arithmetic decoding on the syntax element information obtained from the bitstream according to a by-pass mode.
  • the probability of 0 or 1 for the current binary arithmetic decoding is fixed to 0.5, and binary arithmetic decoding can be performed on the syntax element information based on this probability.
  • the inverse binarization unit 115 may perform inverse binarization on the bin string, which is an output value generated by performing binary arithmetic decoding.
  • the inverse binarization unit 115 may perform inverse binarization on the bin string based on the inverse binarization method corresponding to the predetermined binarization method.
  • the predetermined binarization method may include a fixed length binarization method, a Rice binarization method, an exponential-Golomb binarization method, and a Golomb-Rice binarization method.
  • the predetermined binarization method may be a binarization method in which the first binarization method and the second binarization method are combined.
  • the inverse binarization unit 115 performs inverse binarization on the first bin string, which is a part of the bin string of the syntax element, based on the inverse binarization method corresponding to the first binarization method, For bin strings, inverse binarization may be performed based on an inverse binarization method corresponding to the second binarization method.
  • the part of the empty string may be a prefix or suffix of the empty string of the syntax element.
  • Both the binarization method and the inverse binarization method relate to a kind of code word that defines a 1: 1 correspondence of the empty string including at least one bin corresponding to the value of the syntax element.
  • an empty string containing at least one bin corresponding to the value of the syntax element is determined, and in accordance with an inverse binarization method in terms of decoding, Can be determined.
  • the process of determining the bin string A based on the value a of the syntax element is binarized
  • the process of determining the value a of the syntax element based on the bin string A can be referred to as an inverse binarization process.
  • the binarization and inverse binarization essentially define the mapping relationship between the value of the syntax element and the bin string, and the person skilled in the art can easily understand that binarization / inverse binarization is substantially the same.
  • the entropy decoding unit 105 can obtain information on the current intra-block transform coefficients by performing the entropy decoding by scanning the syntax element information about the current intra-block transform coefficient according to a predetermined scan order.
  • the predetermined scan order may be a sequence according to a reverse zigzag scan or a sequence according to a diagonal scan in the reverse direction.
  • the present invention is not limited to this, and the predetermined scan order may be various scan orders such as a reverse scan order according to a horizontal scan and a scan order according to a vertical scan.
  • the predetermined scanning order is determined by the horizontal coordinate (for example, x coordinate (x is an integer) in the orthogonal coordinate system) of the effective conversion coefficient pixel located at the rightmost position in the current block and the effective conversion coefficient (E.g., the y coordinate of the Cartesian coordinate system (y is an integer)) values of the pixel.
  • the entropy decoding unit 105 may determine a predetermined scan order based on the size of the horizontal direction coordinate value and the size of the vertical direction coordinate value.
  • the entropy decoding unit 105 can determine the vertical scanning order in the reverse direction in a predetermined scanning order when the horizontal direction coordinate value is larger than the vertical direction coordinate value.
  • the entropy decoding unit 105 may determine a horizontal scanning order in the reverse direction as a predetermined scanning order when the vertical direction coordinate value is larger than the horizontal direction coordinate value.
  • the entropy decoding unit 105 may determine a vertical first zigzag scan order in a reverse scan direction in a predetermined scan order when the horizontal direction coordinate value is larger than the vertical direction coordinate value. Details of the vertical priority zigzag scan sequence will be described with reference to FIG. 6B.
  • the entropy decoding unit 105 may determine a horizontal first zigzag scan order in a predetermined scanning order if the vertical direction coordinate value is larger than the horizontal direction coordinate value. The details of the horizontal priority zigzag scan sequence will be described with reference to FIG. 6A.
  • the entropy decoding unit 105 may determine one of the reverse direction vertical priority zigzag scanning order and the horizontal priority zigzag scanning order in a predetermined scanning order when the vertical direction coordinate value is equal to the horizontal direction coordinate value.
  • the entropy decoding unit 105 may determine a horizontal first zigzag scan order in a predetermined scanning order.
  • the entropy decoding unit 105 may determine a reverse direction vertical first zigzag scan order in a predetermined scan order.
  • the entropy decoding unit 105 may determine a rectangular scan area including all the effective transform coefficients in the current block before scanning the information on the transform coefficients.
  • the rectangle scan region includes all the effective transform coefficients in the current block, and the remaining regions in the current block excluding the rectangular scan region may include only the transform coefficients that are 0, not the effective transform coefficients.
  • the entropy decoding unit 105 can obtain information on the coordinates specifying the quadrangular scan area from the bitstream.
  • the information on the coordinates specifying the rectangular scan area includes information on the horizontal direction coordinate of the effective transformation coefficient located at the rightmost position in the current block and information on the vertical direction coordinate of the effective transformation coefficient located at the lowermost position in the current block . ≪ / RTI >
  • the present invention is not limited to this, and the information about the coordinates specifying the quadrangular scan area may be obtained by multiplying the coordinate value in the horizontal direction with respect to the effective conversion coefficient located at the rightmost position in the current block, And may include only information about a larger one of the direction coordinate values.
  • the quadrangular scan area is determined by using coordinate values for one direction obtained from the bit stream as a square scan area, and based on the determined horizontal direction coordinate value and vertical direction coordinate value A square scan area can be determined.
  • the determined horizontal direction coordinate values and vertical direction coordinate values may represent coordinate values of pixels positioned at the lower right corner of the quadrangular scan region. That is, when only the coordinates for one direction are obtained from the bitstream, the entropy decoding unit 105 determines that a square scan region is specified, and based on the obtained coordinate values for one direction, And a square scan area can be determined based on a coordinate value specifying a square scan area.
  • the entropy decoding unit 105 can determine a rectangular scan area including all the effective transformation coefficients in the current block based on the information on the coordinates specifying the rectangular scan area.
  • the entropy decoding unit 105 can perform binary arithmetic decoding based on the context model on the information on the coordinates specifying the quadrangular scan area.
  • the entropy decoding unit 105 may perform inverse binarization on the binary arithmetic decoded information based on the inverse binarization method corresponding to the predetermined binarization method to obtain inverse binarization information on the coordinates specifying the quadrangular scan area, Coordinates from which the quadrangular scan area is specified can be obtained from the inverse binarization information regarding the coordinates.
  • the context model may be determined based on at least one of the size of the current block, the color component of the current block, and the bin index.
  • the color component may include a luminance component and a chrominance component.
  • the empty index may be information indicating the position of the bin that is currently binary arithmetic decoded among the bin strings related to the syntax element.
  • the inverse binarization method corresponding to a predetermined binarization method may be at least one of a fixed length inverse binarization method and a truncated unary inverse binarization method.
  • the entropy decoding unit 105 performs inverse binarization using the fixed length inverse binarization method on the first bin string of the binary arithmetic decoded information to obtain the first inverse binarization information
  • the second inverse binarization information may be obtained by performing inverse binarization using the cutting type unary inverse inverse binarization method for the second bin string.
  • the entropy decoding unit 105 may obtain coordinates specifying the quadrangular scan area based on the first inverse binarization information and the second inverse binarization information.
  • the entropy decoding unit 105 performs at least one of binary arithmetic decoding and inverse binarization based on the context model for the transform coefficients based on the information about the valid transform coefficients scanned in the rectangular scan region, Can be obtained.
  • the entropy decoding unit 105 If the information on the transform coefficients is information indicating whether the absolute value of the current transform coefficient is larger than a predetermined value, and the residual level absolute value information and the sign information of the current transform coefficient, the entropy decoding unit 105 outputs the transform coefficients It is possible to perform binary arithmetic decoding based on the context model.
  • the entropy decoding unit 105 may perform inverse binarization on the information on the binary-arithmetically decoded transform coefficients to obtain a transform coefficient of the current block.
  • the first information on the transform coefficients is information indicating whether the absolute value of the current transform coefficient is larger than a predetermined value and the residual level absolute value information and the sign information of the current transform coefficient,
  • the entropy decoding unit 105 may perform binary arithmetic decoding based on the context model with respect to the first information on the transform coefficient.
  • the entropy decoding unit 105 may perform inverse binarization based on the binary parameter information included in the second information with respect to the first information subjected to the binary arithmetic decoding so as to obtain the transform coefficient of the current block.
  • the binarization parameter information may be Rice Parameter information for the current transform coefficient.
  • the Rice parameter may be information for determining the length of the prefix included in the bin string.
  • the binarization parameter information may be various binarization parameter information for the current transform coefficient.
  • the entropy decoding unit 105 performs a (truncated) Rice binarization method on the residual level absolute value information of the current transform coefficient
  • a value relating to the absolute value of the residual level of the current transform coefficient can be obtained by using the inverse binarization method corresponding to the corresponding inverse binarization method and the exponential Gollum binarization method.
  • the entropy decoding unit 105 performs inverse binarization on the prefix of the bin string of the residual level absolute value information of the current transform coefficient using an inverse binarization method corresponding to the Rice binarization method based on the Rice parameter
  • the first value relating to the absolute value of the residual level of the current transform coefficient is obtained and the inverse binarization using the inverse binarization method corresponding to the exponential smoothed binarization method is performed on the suffix of the bin string of the residual level absolute value information
  • the context model for the first transform coefficient among the context models related to the transform coefficients includes information on at least one second transform coefficient previously scanned in accordance with a predetermined scan order, position and color of the first transform coefficient in the current block, Information about the right or lower peripheral transformation coefficient, and the scan position of the first transformation coefficient.
  • the context model relating to the flag information indicating whether the first conversion coefficient is greater than 0 is based on the number of the right or lower conversion coefficients whose absolute value among the right or lower conversion coefficients of the predetermined position is larger than 0 Can be determined.
  • the context model for flag information indicating whether the first transform coefficient is greater than 0 is not limited to this, and the absolute value of n (n is a positive integer) transform coefficients previously scanned according to a predetermined scan order is greater than 0 Can be determined based on the number of large effective conversion coefficients.
  • the context model relating to the flag information indicating whether the first transform coefficient is greater than 0 may be determined based on the position of the first transform coefficient in the coefficient group and the corresponding peripheral right or lower effective coefficient group flags.
  • the flag information (GT0 flag information) indicating whether the first transform coefficient is greater than 0 may be obtained by adding GT0 flag information of n (n is a positive integer) transform coefficients previously scanned according to a predetermined scan order, The GT0 flag information of the position, color component, and neighboring right or lower n (n is a positive integer) conversion coefficients of the first conversion coefficient, whether the first conversion coefficient on the scan order is the conversion coefficient of the first position in the scan area, And whether or not the first transformation coefficient in the scan order is a transformation coefficient of the final position in the scan area.
  • the context model relating to the flag information indicating whether the absolute value of the first conversion coefficient is larger than 1 is determined based on the number of the right or lower effective conversion coefficients whose absolute value of the right or lower conversion coefficient of the predetermined position is larger than 1 .
  • the context model relating to the flag information indicating whether the absolute value of the first transform coefficient is larger than 1 is not limited to the absolute value of n (n is a positive integer) transform coefficients previously scanned according to a predetermined scan order Can be determined based on the number of effective transform coefficients greater than one.
  • the context model relating to flag information indicating whether the absolute value of the first transform coefficient is greater than 1 may be determined based on GT1 flag information previously decoded in the corresponding coefficient group and GT1 flag information previously decoded in the group.
  • the flag information (GT1 flag information) indicating whether the absolute value of the first transform coefficient is larger than 1 is obtained by adding GT1 flag information of n (n is a positive integer) transform coefficients previously scanned according to a predetermined scan order, The GT1 flag information of the position, color component, and neighboring right or lower n (n is a positive integer) conversion coefficients of the first transform coefficient in the block, whether the first transform coefficient is the transform coefficient of the first position in the scan area, And whether or not the first transform coefficient is a transform coefficient of the final position in the scan area.
  • the context model relating to the flag information indicating whether the absolute value of the first transform coefficient is larger than 2 can be determined based on the number of the right or lower effective transform coefficients whose absolute value is larger than 2.
  • the context model for flag information indicating whether the first transform coefficient is greater than 2 is not limited to this, and the absolute value of n (n is a positive integer) transform coefficients previously scanned according to a predetermined scan order is greater than 2 Can be determined based on the number of large effective conversion coefficients.
  • the context model on the flag information indicating whether the absolute value of the first transform coefficient is larger than 2 may be determined based on the previously decoded GT2 flag information and the previously decoded in-group GT2 flag information in the corresponding coefficient group.
  • the flag information (hereinafter referred to as GT2 flag information) indicating whether the absolute value of the first transform coefficient is greater than 2 may be used as the GT2 flag of the previously scanned n (n is a positive integer) Information and the position of the first transform coefficient in the current block, the color component, and GT2 flag information of the adjacent right or lower n (n is a positive integer) transform coefficients, the transform coefficient of the first position in the scan area And whether or not the first transform coefficient is a transform coefficient of the final position in the scan area.
  • GTm flag information flag information indicating whether the first transform coefficient is larger than m (m is an integer larger than 2) is n (n is a positive integer) scanned previously according to a predetermined scan order
  • the binarization parameter information on the residual level value of the first transform coefficient may be determined based on the absolute level of the level of the peripheral effective transform coefficient on the right side or the lower side of the first transform coefficient.
  • the binarization parameter information on the first transform coefficient may be determined based on the sum of the absolute levels of the values of the predetermined peripheral effective transform coefficients on the right side or the lower side of the first transform coefficient.
  • the binarization parameter information regarding the residual level value of the first transform coefficient may be determined based on the previously encoded level value.
  • the binarization parameter information on the first transform coefficient may include information on the level of n (n is an integer) transform coefficients previously scanned according to a predetermined scan order, the position of the first transform coefficient in the current block, (N is a positive integer) number of conversion coefficients on the lower side, whether the first conversion coefficient on the scan order is a conversion coefficient of the first position in the scan area, whether the first conversion coefficient on the scan order is Whether or not the first transform coefficient is a transform coefficient, whether the first transform coefficient in the scan order is a coefficient of an initial position in a coefficient group, the position of the first transform coefficient is a relative position in the scan region, and the like .
  • the entropy decoding unit 105 determines whether or not the position of the transform coefficient currently scanned in the scan region is [SRx, 0] (where SRx is an integer and SRx is the horizontal coordinate value of the right boundary pixel of the scan region on the basis of the left upper- (Y is an integer greater than 0 and less than or equal to SRy, and SRy represents a lower boundary of the scan region with respect to the upper left corner coordinate of the scan region in accordance with a predetermined scan order)
  • the GT0 flag information of the transform coefficient currently scanned from the bit stream is not acquired and the value of the GT0 flag information can be determined to be 1.
  • the entropy decoding unit 105 determines that the position of the transform coefficient currently scanned in the scan region is [0, SRy] (where SRy is an integer and SRy is the vertical coordinate of the lower boundary of the scan region on the basis of the upper left corner coordinate of the scan region) (X, SRy) (where X is an integer greater than 0 and less than or equal to SRx, SRx is an integer equal to or greater than 0,
  • the GT0 flag information of the currently scanned transform coefficient is not obtained from the bit stream and the value of the GT0 flag information can be determined to be 1 .
  • the entropy decoding unit 105 can determine the maximum number of GT1 flag information of the current effective conversion coefficient in the block, and receive the GT1 flag information in the current block from the bit stream within the maximum coefficient of the determined effective conversion coefficient . That is, when the entropy decoding unit 105 receives the maximum number of GT1 flag information of the effective conversion coefficient received from the bitstream, the entropy decoding unit 105 determines whether the GT1 flag information of the effective conversion coefficient exists in the bitstream I can not check it anymore.
  • the entropy decoding unit 105 can determine all non-zero effective conversion coefficients as the maximum number of GT1 flag information in the current block. Alternatively, the entropy decoding unit 105 can determine the maximum number of GT1 flag information in the current block based on the size of the scan area. For example, the entropy decoding unit 105 can determine the maximum number MaxCount_GT1 of the GT1 flag information based on the following expression (1).
  • sizeSR may mean the size (width) of the square scan area, and sizeSR may be (Sr_x + 1) * (Sr_y + 1).
  • Sr_x can be the horizontal coordinate of the rightmost effective transformation coefficient pixel based on the upper left corner coordinate of the scan area. In other words, Sr_x can mean the horizontal coordinate of the right boundary pixel based on the upper left corner coordinate of the scan area.
  • Sr_y may mean the vertical coordinate of the lowest effective conversion factor pixel based on the upper left corner coordinate of the scan area. In other words, Sr_y may mean the vertical coordinate of the lower boundary pixel based on the upper left corner coordinate of the scan area.
  • K1 can be the magnitude of the scan area and the adjustment factor between the GT1 flags. For example, it may be an integer greater than one. Th1 may be a predetermined threshold value. For example, Th1 may be 16,8. Those skilled in the art can easily understand that K1 and Th1 can have various values, without being limited thereto.
  • the entropy decoding unit 105 may determine the maximum number of GT2 flag information in the current block and receive GT2 flag information in the current block from the bit stream within the maximum coefficient of the determined effective transform coefficient. That is, when the entropy decoding unit 105 receives the maximum number of GT2 flag information of the effective conversion coefficient received from the bitstream, the entropy decoding unit 105 determines whether the GT2 flag information of the effective conversion coefficient exists in the bitstream I can not check it anymore.
  • the entropy decoding unit 105 can determine all non-zero effective conversion coefficients as the maximum number of GT2 flag information in the current block. Alternatively, the entropy decoding unit 105 can determine the maximum number of GT2 flag information in the current block based on the size of the scan area. For example, the entropy decoding unit 105 can determine the maximum number MaxCount_GT2 of the GT2 flag information based on the following expression (2).
  • sizeSR may mean the size (width) of the square scan area, and sizeSR may be (Sr_x + 1) * (Sr_y + 1).
  • Sr_x can be the horizontal coordinate of the rightmost effective transformation coefficient pixel based on the upper left corner coordinate of the scan area. In other words, Sr_x can mean the horizontal coordinate of the right boundary pixel based on the upper left corner coordinate of the scan area.
  • Sr_y may mean the vertical coordinate of the lowest effective conversion factor pixel based on the upper left corner coordinate of the scan area. In other words, Sr_y may mean the vertical coordinate of the lower boundary pixel based on the upper left corner coordinate of the scan area.
  • K2 can be the magnitude of the scan area and the adjustment factor between GT2 flags. For example, it may be an integer greater than one.
  • K2 may be a predetermined threshold value. For example, Th2 may be 16,8. Those skilled in the art can easily understand that K2 and Th2 can have various values, without being limited thereto.
  • the entropy decoding unit 105 can obtain information on the current intra-block coefficient group from the bitstream.
  • the information on the coefficient group may be flag information indicating whether or not the coefficient group includes at least one effective transform coefficient (or whether or not the coefficient group includes only a transform coefficient of zero).
  • the flag information may be referred to as significant coefficient group flag information.
  • the entropy decoding unit 105 can scan information on the current coefficient group intra-coefficient transform coefficients based on the information on the current coefficient group obtained from the bit stream.
  • the entropy decoding unit 105 sets the value of the transform coefficient in the coefficient group without scanning the information about the transform coefficient 0 < / RTI > If the information on the coefficient group indicates that the coefficient group includes at least one effective transform coefficient, the entropy decoding unit 105 scans information on the transform coefficient according to a predetermined scan order to acquire a transform coefficient in the coefficient group .
  • the entropy decoding unit 105 can determine one coefficient group for every predetermined K number of transform coefficients included in the scan region (K is an integer) scanned according to a predetermined scan order. That is, one coefficient group may include K transform coefficients.
  • the scan order may be a forward scan order that is the opposite direction of the predetermined reverse scan order.
  • the entropy decoding unit 105 can determine a coefficient group by scanning in a forward scan order from a DC coefficient that is a coefficient adjacent to the upper left corner in the current block. If the number of transform coefficients included in the current block is not an integral multiple of K, the last coefficient group among the groups of coefficients scanned according to the forward scan order may include a smaller number of transform coefficients.
  • the present invention is not limited to this, and the entropy decoding unit 105 may perform a reverse scan order in which the coefficients located at the lower right end among the transform coefficients included in the current block are scanned up to a coefficient located at the upper left of the transform coefficients included in the current block It will be readily appreciated by those skilled in the art that scanning may be performed in accordance with the present invention to determine a coefficient group.
  • the entropy decoding unit 105 can determine a coefficient group according to a predetermined scanning order without acquiring information on the current intra-block coefficient group from the bitstream.
  • the reason for determining the coefficient group is to perform an operation (such as sign data hiding) for the entropy decoding unit 105 to process according to the coefficient group. If one of the groups of coefficients scanned according to a predetermined scan order includes only one transform coefficient, the entropy decoding unit 105 does not acquire information on the corresponding coefficient group from the bitstream, Information can be obtained from the bitstream.
  • the entropy decoding unit 105 can determine that the sign of at least one transform coefficient is hidden for each coefficient group included in the current block. For example, the entropy decoding unit may decide to hide the sign of one or two transform coefficients for each coefficient group included in the current block.
  • the entropy decoding unit 105 may scan the information on the transform coefficients in the quadrangular scan area according to a predetermined scan order.
  • the predetermined scan order may include a reverse zigzag scan order, a reverse diagonal scan order, a reverse vertical scan order, and a horizontal scan order.
  • the predetermined scan order is not limited to the above-mentioned reverse scan order and may include various reverse scan orders.
  • the entropy decoding unit 105 can obtain the transform coefficients of the current block based on the information about the scanned transform coefficients.
  • the image restoring unit 120 may generate a residual block of the current block by performing inverse quantization and inverse transformation on the transform coefficients of the current block.
  • the image restoring unit 120 may restore the current block based on the residual block of the current block.
  • the image restoring unit 120 may perform inter-prediction or intra-prediction on the current block to generate a prediction block of the current block.
  • the image restoring unit 120 may restore the current block based on the prediction block of the current block and the residual block of the current block. That is, the image restoring unit 120 may restore the values of the pixels included in the current block by adding the values of the pixels included in the prediction block and the values of the pixels included in the residual block.
  • the video decoding apparatus 100 may include an image decoding unit (not shown), and the image decoding unit (not shown) may include an entropy decoding unit 105 and an image restoring unit 120.
  • the video decoding unit will be described with reference to FIG.
  • FIG. 1B shows a flow diagram of a video decoding method according to various embodiments.
  • the video decoding apparatus 100 may determine a rectangular scan area including all the effective transform coefficients in the current block.
  • the coordinates specifying the quadrangular scan area include the horizontal coordinate of the effective conversion coefficient pixel located at the rightmost of the effective conversion coefficients in the current block and the coordinates of the effective conversion coefficient pixel located at the lowermost one of the effective conversion coefficients in the current block Vertical direction coordinates.
  • the video decoding apparatus 100 may obtain information on the coordinates specifying the quadrangular scan region from the bit stream and determine the quadrangular scan region based on the coordinates specifying the obtained quadrangular scan region.
  • the video decoding apparatus 100 may scan the information on the transform coefficients in the quadrangular scan area according to a predetermined scan order.
  • the predetermined scan order may include a reverse zigzag scan order or a reverse diagonal scan order.
  • the zigzag scan order may include a vertical priority zigzag scan order or a horizontal priority zigzag scan order.
  • step S115 the video decoding apparatus 100 may acquire the transform coefficients of the current block based on the information about the scanned transform coefficients.
  • step S120 the video decoding apparatus 100 may perform inverse quantization and inverse transform on the transform coefficients of the current block to generate a residual block of the current block.
  • the video decoding apparatus 100 can restore the current block based on the residual block.
  • the video decoding apparatus 100 performs inter prediction or intra prediction to generate a prediction block of a current block.
  • the video decoding apparatus 100 adds the pixel values of the residual blocks to the pixel values included in the prediction blocks of the current block The pixel value of the reconstruction block of the current block can be generated.
  • FIG. 1C shows a block diagram of a video encoding apparatus according to various embodiments.
  • the video encoding apparatus 150 includes an entropy encoding unit 155 and a bitstream generation unit 170.
  • the entropy encoding unit 155 can perform entropy encoding on the syntax element related to the intra-block transformation coefficient.
  • the entropy encoding unit 155 scans the two-dimensional array information about the current intra-block transform coefficients according to a predetermined scan order to generate one-dimensional array information about the current intra-block transform coefficients, Can be entropy-encoded with respect to the one-dimensional array information about the one-dimensional array information.
  • the syntax element related to the conversion coefficient may be a flag indicating whether the conversion coefficient is larger than a predetermined value.
  • the predetermined value may be a value equal to or greater than zero. For example, 0, 1 or 2.
  • It may also be a syntax element indicating the absolute level of the remaining level with respect to the transform coefficients. That is, the absolute value of the remaining level may indicate an absolute value difference between a predetermined absolute value determined based on whether the absolute value of the conversion coefficient is larger than a predetermined value.
  • the syntax element related to the effective conversion coefficient may be a syntax element related to the sign of the effective conversion coefficient.
  • the entropy encoding unit 155 may perform binarization on the syntax element to generate an empty string, and perform binary arithmetic encoding on the empty string to generate entropy-encoded information for the syntax element.
  • the binarization may be performed in the binarization unit 160, and the binary arithmetic encoding may be performed in the binary arithmetic encoding unit 165.
  • the binarization unit 160 may perform binarization on a predetermined syntax element to generate an empty string.
  • the binarization unit 160 may perform binarization on a predetermined syntax element based on a predetermined binarization method.
  • the predetermined binarization method may include a fixed length binarization method, a Rice binarization method, an exponential Golomb binarization method, and a Golomb-Rice binarization method.
  • the predetermined binarization method may be a binarization method in which the first binarization method and the second binarization method are combined.
  • the binarization unit 160 may binarize a portion of a syntax element based on a first binarization method to generate a first bin string, and for another portion of the syntax element, a second binarization method To generate a second bin string.
  • a first binarization method to generate a first bin string
  • a second binarization method To generate a second bin string.
  • the first empty string may be part of the empty string of the syntax element
  • the second empty string may be another part of the empty string of the syntax element.
  • a portion of the empty string may be a prefix or a suffix.
  • the binary arithmetic coding unit 165 may perform binary arithmetic coding based on a predetermined context model for an empty string regarding a predetermined syntax element. Alternatively, the binary arithmetic coding unit 165 may perform binary arithmetic coding on a bin string relating to a predetermined syntax element without a predetermined context model. At this time, the probability of 0 or 1 for the current binary arithmetic coding bin is fixed to 0, and binary arithmetic coding can be performed based on this probability.
  • the entropy encoding unit 155 can obtain the transform coefficients of the current block. That is, the video encoding apparatus 150 can generate a prediction block of the current block by performing inter prediction or intra prediction, and generates a residual block of the current block based on the original block of the current block and the prediction block of the current block can do. The video encoding apparatus 150 may convert and quantize the residual block of the current block to generate a transform coefficient of the current block. The entropy encoding unit 155 may obtain the transform coefficients of the generated current block.
  • the entropy encoding unit 155 determines information on the transform coefficients of the current block, generates information about the transform coefficients of the current block in accordance with a predetermined scan order, generates one-dimensional array information on the transform coefficients of the current block , And entropy encoding can be performed on the one-dimensional array information.
  • the predetermined scan order may be a sequence according to the reverse zigzag scan or an order according to the reverse diagonal scan. However, the order may be various scan orders such as a reverse horizontal scan order and a scan order according to reverse vertical scan.
  • the predetermined scan order may be determined based on at least one of the horizontal coordinate of the effective conversion coefficient pixel located at the rightmost position in the current block and the vertical direction of the effective conversion coefficient pixel located at the bottommost position in the current block.
  • the entropy encoding unit 155 can determine a predetermined scan order based on the size of the horizontal direction coordinate value and the size of the vertical direction coordinate value. For example, if the horizontal direction coordinate value is larger than the vertical direction coordinate value, the entropy encoding unit 155 can determine the reverse vertical scanning order in a predetermined scanning order. The entropy encoding unit 155 may determine the horizontal scan order in the reverse direction as a predetermined scan order when the vertical direction coordinate value is larger than the horizontal direction coordinate value.
  • the entropy encoding unit 155 may determine the reverse direction vertical priority zigzag scan order in a predetermined scan order when the horizontal direction coordinate value is larger than the vertical direction coordinate value.
  • the entropy encoding unit 155 can determine the horizontal priority zigzag scan order in the reverse direction in a predetermined scan order when the vertical direction coordinate value is larger than the horizontal direction coordinate value.
  • the entropy encoding unit 155 may determine one of the vertical first zigzag scan order and the horizontal priority zigzag scan order in the reverse direction in a predetermined scan order when the vertical direction coordinate value is equal to the horizontal direction coordinate value.
  • the entropy encoding unit 155 can determine the reverse horizontal zigzag scanning order in a predetermined scanning order.
  • the entropy encoding unit 155 may determine a horizontal first zigzag scan order in the reverse direction in a predetermined scan order when the horizontal direction coordinate value is not larger than the vertical direction coordinate value.
  • the entropy encoding unit 155 can determine a rectangular scan area including all the effective transform coefficients in the current block.
  • the square scan region includes all the effective transformation coefficients in the current block, and the remaining regions in the current block excluding the rectangular scan region may include only transformation coefficients having a value of 0, which is not an effective transformation coefficient.
  • the entropy encoding unit 155 may determine the coordinates specifying the quadrangular scan area and may entropy encode information on the coordinates specifying the quadrangular scan area. That is, the entropy encoding unit 155 may generate a bin string by performing a binarization based on a predetermined binarization method on a syntax element related to a coordinate specifying a quadrangular scan area.
  • the predetermined binarization method may be at least one of a fixed length binarization method and a cutting type unary binarization method.
  • the entropy encoding unit 155 can perform binary arithmetic coding based on the context model on the bin string regarding the syntax element related to the coordinates specifying the quadrangular scan area.
  • the context model may be determined based on at least one of the size of the current block, the color component of the current block, and the empty index.
  • the color component may include a luminance component and a chrominance component.
  • the empty index may be information indicating the position of the bin that is currently binary arithmetic-coded among the bin strings related to the syntax element.
  • the entropy encoding unit 155 may generate at least one of binarization based on information on the scanned transform coefficients and binary arithmetic encoding based on the context model of the transform coefficients to generate entropy-encoded information.
  • the first information on the transform coefficients is information indicating whether the absolute value of the current transform coefficient is larger than a predetermined value, the residual level absolute value information and the sign information of the current transform coefficient, and the second information on the transform coefficients is the binarization parameter Information
  • the entropy encoding unit 155 may perform binarization on the first information on the transform coefficients based on the second information to generate a bin string for the first information.
  • the entropy encoding unit 155 may perform binary arithmetic encoding on a bin string related to the first information to generate entropy-encoded information.
  • the second information includes information on at least one second transform coefficient previously scanned in accordance with a predetermined scan order, information on the position, color component, right or lower peripheral transformation coefficient of the first transform coefficient in the current block, 1 < / RTI > conversion coefficient.
  • the binarization parameter information on the first transform coefficient may be determined based on the absolute level of the level of the peripheral effective transform coefficient on the right side or the lower side of the first transform coefficient.
  • the binarization parameter information on the first transform coefficient may be determined based on the sum of the absolute levels of the levels of the peripheral effective transform coefficients on the right side or the lower side of the first transform coefficient.
  • the binarization parameter information on the first transform coefficient may include information on the level of n (n is an integer) transform coefficients previously scanned according to a predetermined scan order, the position of the first transform coefficient in the current block, (N is a positive integer) number of conversion coefficients on the lower side, whether the first conversion coefficient on the scan order is a conversion coefficient of the first position in the scan area, whether the first conversion coefficient on the scan order is Whether the transform coefficient is a transform coefficient, whether or not the first transform coefficient on the scan order is a coefficient of the first position in the coefficient group, and the like.
  • the entropy coding unit 155 calculates You can perform binarization on the information to create an empty string.
  • the entropy encoding unit 155 may perform binary arithmetic coding based on the context model on the bin strings to generate binary arithmetic coded information.
  • the context model of the first transform coefficient among the context models related to the transform coefficients includes information on at least one second transform coefficient previously scanned in accordance with a predetermined scan order, position of the first transform coefficient in the current block, Information about the right or lower peripheral transformation coefficient, and the scan position of the first transformation coefficient.
  • the context model relating to the flag information indicating whether the first conversion coefficient is larger than 0 can be determined based on the number of the right or lower effective conversion coefficients whose absolute values are larger than zero.
  • the context model for flag information indicating whether the first transform coefficient is greater than 0 is not limited to this, and the absolute value of n (n is a positive integer) transform coefficients previously scanned according to a predetermined scan order is greater than 0 Can be determined based on the number of large effective conversion coefficients.
  • the context model relating to the flag information indicating whether the first conversion coefficient is larger than 1 can be determined based on the number of the right or lower effective conversion coefficients whose absolute values are larger than 1.
  • the context model of the flag information indicating whether the first transform coefficient is greater than 1 is not limited to this, and the absolute value of n (n is a positive integer) transform coefficients previously scanned according to a predetermined scan order is larger than 1 Can be determined based on the number of large effective conversion coefficients.
  • the context model relating to the flag information indicating whether the first conversion coefficient is larger than 2 can be determined based on the number of the right or lower effective conversion coefficients whose absolute values are larger than 2.
  • the context model for flag information indicating whether the first transform coefficient is greater than 2 is not limited to this, and the absolute value of n (n is a positive integer) transform coefficients previously scanned according to a predetermined scan order is greater than 2 Can be determined based on the number of large effective conversion coefficients.
  • the entropy encoding unit 155 encodes the position of the transform coefficient currently scanned in the scan region by [SRx, 0] (where SRx is an integer and SRx is the horizontal coordinate value of the right boundary pixel of the scan region on the basis of the left upper- (Y is an integer greater than 0 and less than or equal to SRy, and SRy represents a lower boundary of the scan region with respect to the upper left corner coordinate of the scan region in accordance with a predetermined scan order) (I.e., the vertical direction coordinate value of the pixel), the GT0 flag information of the currently scanned conversion coefficient may not be generated.
  • the entropy encoding unit 155 determines whether or not the position of the transform coefficient currently scanned in the scan region is [0, SRy] (where SRy is an integer and SRy is the vertical coordinate of the lower boundary of the scan region on the basis of the upper left corner coordinate of the scan region (X, SRy) (where X is an integer greater than 0 and less than or equal to SRx, SRx is an integer equal to or greater than 0, (I.e., the vertical direction coordinate value of the boundary pixel). If the transform coefficients of the positions are all zeros, the GT0 flag information of the currently scanned transform coefficients may not be generated.
  • the entropy encoding unit 155 can determine the maximum number of GT1 flag information of the current intra-block effective transform coefficient and generate the GT1 flag information in the current block within the maximum coefficient of the determined effective transform coefficient. That is, if the entropy encoding unit 155 generates the maximum number of GT1 flag information of the effective conversion coefficient, the entropy encoding unit 155 may not generate the GT1 flag information of the effective conversion coefficient thereafter.
  • the entropy encoding unit 155 can determine all non-zero effective conversion coefficients as the maximum number of GT1 flag information in the current block. Or the entropy encoding unit 155 can determine the maximum number of GT1 flag information in the current block based on the size of the scan area. For example, the entropy encoding unit 155 can determine the maximum number of GT1 flag information MaxCount_GT1 based on Equation (3) below.
  • sizeSR may mean the size (width) of the square scan area, and sizeSR may be (Sr_x + 1) * (Sr_y + 1).
  • Sr_x can be the horizontal coordinate of the rightmost effective transformation coefficient pixel based on the upper left corner coordinate of the scan area. In other words, Sr_x can mean the horizontal coordinate of the right boundary pixel based on the upper left corner coordinate of the scan area.
  • Sr_y may mean the vertical coordinate of the lowest effective conversion factor pixel based on the upper left corner coordinate of the scan area. In other words, Sr_y may mean the vertical coordinate of the lower boundary pixel based on the upper left corner coordinate of the scan area.
  • K1 can be the magnitude of the scan area and the adjustment factor between the GT1 flags. For example, K1 may be an integer greater than one.
  • Th1 may be a predetermined threshold value. For example, Th1 may be 16,8. Those skilled in the art can easily understand that K1 and Th1 can have various values, without being limited thereto.
  • the entropy encoding unit 155 can determine the maximum number of GT2 flag information in the current block and generate the GT2 flag information in the current block within the maximum coefficient of the determined effective transform coefficient. That is, if the entropy encoding unit 155 generates the maximum number of GT2 flag information of the effective conversion coefficient, the entropy encoding unit 155 may not generate the GT2 flag information of the effective conversion coefficient thereafter.
  • the entropy encoding unit 155 can determine all non-zero effective conversion coefficients as the maximum number of GT2 flag information in the current block. Alternatively, the entropy encoding unit 155 can determine the maximum number of GT2 flag information in the current block based on the size of the scan area. For example, the entropy encoding unit 155 can determine the maximum number MaxCount_GT2 of the GT2 flag information based on the following expression (4).
  • sizeSR may mean the size (width) of the square scan area, and sizeSR may be (Sr_x + 1) * (Sr_y + 1).
  • Sr_x can be the horizontal coordinate of the rightmost effective transformation coefficient pixel based on the upper left corner coordinate of the scan area. In other words, Sr_x can mean the horizontal coordinate of the right boundary pixel based on the upper left corner coordinate of the scan area.
  • Sr_y may mean the vertical coordinate of the lowest effective conversion factor pixel based on the upper left corner coordinate of the scan area. In other words, Sr_y may mean the vertical coordinate of the lower boundary pixel based on the upper left corner coordinate of the scan area.
  • K2 can be the magnitude of the scan area and the adjustment factor between GT2 flags. For example, K2 may be an integer greater than one. Th2 may be a predetermined threshold value. For example, Th2 may be 16,8. Those skilled in the art can easily understand that K2 and Th2 can have various values, without being limited thereto.
  • the entropy encoding unit 155 can generate information on the current intra-block coefficient group.
  • the information on the coefficient group may be flag information indicating whether the coefficient group includes at least one effective transform coefficient.
  • the entropy encoding unit 155 can determine one coefficient group for every predetermined K number of transform coefficients included in the scan region (K is an integer) scanned according to the scan order. That is, one coefficient group may include K transform coefficients.
  • the scan order may be a forward scan order that is the opposite direction of the predetermined reverse scan order.
  • the predetermined backward scan order referred to herein may mean a scan order from a coefficient located at the lower right of the transform coefficients included in the current block to a coefficient located at the upper left of the transform coefficients included in the current block.
  • the entropy encoding unit 155 can determine the coefficient group by scanning in the forward scan order from the DC coefficient, which is a coefficient adjacent to the upper left corner in the current block. If the number of transform coefficients included in the current block is not an integral multiple of K, the last coefficient group among the groups of coefficients scanned according to the forward scan order may include a smaller number of transform coefficients.
  • the present invention is not limited to this, and the entropy coding unit 155 may perform the inverse scanning order in which the coefficients located in the lower right of the transform coefficients included in the current block are scanned up to the coefficient located in the upper left of the transform coefficients included in the current block It will be readily appreciated by those skilled in the art that scanning may be performed in accordance with the present invention to determine a coefficient group.
  • the entropy encoding unit 155 does not generate information about the corresponding coefficient group and outputs the GT0 flag information immediately Can be generated.
  • the entropy encoding unit 155 may determine whether to hide the sign of at least one transform coefficient for each coefficient group included in the current block. For example, the entropy encoding unit 155 may determine It can be determined that the sign of one or two transform coefficients is hidden for each coefficient group included in the current block.
  • the entropy encoding unit 155 may scan the information on the transform coefficients in the quadrangular scan area according to a predetermined scan order.
  • the predetermined scan order may include a reverse zigzag scan order, a reverse diagonal scan order, a reverse vertical scan order, and a horizontal scan order.
  • the predetermined scan order is not limited to the above-mentioned reverse scan order and may include various reverse scan orders.
  • the bitstream generator 170 may generate a bitstream including entropy-encoded information. That is, the bitstream generating unit 170 may scan the information about the transform coefficients in the entropy encoding unit 155 and generate a bitstream including the entropy-encoded information based on the information about the scanned transform coefficients .
  • the bitstream generating unit 170 may generate a bitstream including information on coordinates specifying a quadrangle scan area, which is an area for scanning information on transform coefficients.
  • the information on the coordinates specifying the quadrangular scan area is obtained by dividing the horizontal coordinate value of the effective conversion coefficient pixel located at the rightmost of the effective conversion coefficient pixels included in the current block and the horizontal coordinate value of the effective conversion coefficient pixels included in the current block And information indicating the vertical coordinate value of the effective transformation coefficient pixel located at the lowermost position.
  • the present invention is not limited to this, and the information on the coordinates specifying the quadrangular scan area may be obtained by adding the horizontal coordinate values of the effective conversion coefficient pixels located at the rightmost of the effective conversion coefficient pixels included in the current block, And information indicating a coordinate value having a larger value among the vertical coordinate values of the effective conversion coefficient pixel located at the lowermost one of the coefficient pixels.
  • the bitstream generating unit 170 generates the bit stream of the effective transform coefficient pixel located at the bottom of the effective transform coefficient pixels included in the current block and the horizontal direction coordinate value of the effective transform coefficient pixel located at the right-
  • the square scan region can be determined based on the larger of the rectangular scan regions. In this case, a scan area of a square larger than a rectangular scan area can be determined, but the video encoding device 150 transmits only information indicating only a coordinate value in one direction, thereby reducing the number of signaling bits.
  • the video encoding apparatus 150 may include an image encoding unit (not shown), and the image encoding unit (not shown) may include an entropy encoding unit 155 and a bitstream generating unit 170.
  • the image encoding unit will be described with reference to FIG.
  • Figure 1D shows a flow diagram of a video encoding method according to various embodiments.
  • the video encoding apparatus 150 may obtain the transform coefficients of the current block.
  • the current block may be a data unit that can be used in the process of attaching / decrypting an image described with reference to FIGS.
  • the video encoding apparatus 150 can generate a prediction block of the current block by performing inter prediction or intra prediction and generate a residual block of the current block based on the original block of the current block and the prediction block of the current block have.
  • the video encoding apparatus 150 may transform and quantize the residual block of the current block to generate transform coefficients of the current block.
  • the video encoding apparatus 150 may determine a rectangular scan area including all effective transformation coefficients in the current block.
  • the square scan region includes all the effective transform coefficients in the current block, and the remaining region in the current block excluding the square scan region may include only coefficients having a value of 0, which is not an effective transform coefficient.
  • the video encoding apparatus 150 may determine the coordinates specifying the quadrangular scan region and entropy-encode information on the coordinates specifying the quadrangular scan region. That is, the video encoding apparatus 150 may generate a bin string by performing binarization on the syntax element information on the coordinates specifying the quadrangular scan area based on a predetermined binarization method.
  • the predetermined binarization method may be at least one of a fixed length binarization method and a cutting type unary binarization method.
  • the video encoding apparatus 150 may perform binary arithmetic coding based on the context model on the bin string regarding the syntax regarding the coordinates specifying the quadrangular scan area.
  • the context model may be determined based on at least one of the size of the current block, the color component of the current block, and the empty index.
  • the video encoding device 150 may scan the information on the transform coefficients included in the quadrangular scan area according to a predetermined scan order.
  • the information on the transform coefficient may include flag information indicating whether the transform coefficient is larger than a predetermined value.
  • the predetermined value may be at least one of 0, 1, and 2.
  • the binarization parameter may include at least one of a race parameter and various binarization parameters.
  • the predetermined scan order may include a reverse zigzag scan order, a reverse diagonal scan order, a reverse vertical scan order, and a horizontal scan order. However, those skilled in the art will readily understand that the predetermined scan order is not limited to the above-mentioned reverse scan order and may include various reverse scan orders.
  • the video encoding device 150 can generate entropy-encoded information by entropy encoding based on information about the scanned transform coefficients.
  • the video encoding apparatus 150 may generate at least one of binarization based on information on the scanned transform coefficients and binary arithmetic encoding based on the context model to generate entropy-encoded information.
  • the first information on the transform coefficients is information indicating whether the absolute value of the current transform coefficient is larger than a predetermined value, the residual level absolute value information, and the current transform coefficient information, and the second information on the effective transform coefficients is binarized
  • the video encoding apparatus 150 may generate bin strings for the first information by performing binarization based on the second information on the first information on the effective transform coefficients.
  • the video encoding apparatus 150 may perform binary arithmetic coding on a bin string related to the first information to generate entropy-encoded information.
  • the second information includes information on at least one second transform coefficient previously scanned in accordance with a predetermined scan order, position and color components of the first transform coefficient in the current block, information on the right or lower peripheral transformation coefficient, 1 < / RTI > conversion coefficient.
  • the binarization parameter information on the first transform coefficient can be determined based on the absolute level of the level of the peripheral effective transform coefficient on the right side or the lower side of the first transform coefficient.
  • the binarization parameter information on the first transform coefficient may be determined based on the sum of the absolute levels of the levels of the peripheral effective transform coefficients on the right side or the lower side of the first transform coefficient.
  • the video coding apparatus 150 If the information on the transform coefficients is the information indicating whether the absolute value of the current effective transform coefficient is larger than a predetermined value, the residual level absolute value information, and the current effective transform coefficient information, the video coding apparatus 150 outputs the transform coefficients Can be binarized to generate a bin string.
  • the video encoding apparatus 150 may perform binary arithmetic coding based on the context model on the valid transform coefficients for bin strings to generate binary arithmetic coded information.
  • the context model of the first transform coefficient among the context models related to the valid transform coefficients includes information on at least one second transform coefficient previously scanned according to a predetermined scan order, position of the first transform coefficient in the current block, Information on the color component, the right or lower peripheral transformation coefficient, and the scan position of the first transformation coefficient.
  • the video encoding apparatus 150 may generate a bitstream including entropy-encoded information.
  • the video encoding apparatus 150 may scan the information on the transform coefficients in the entropy encoding unit 155 and generate a bit stream including the entropy encoded information based on the information about the scanned transform coefficients.
  • the video encoding device 150 may generate a bitstream including information on coordinates specifying a quadrangular scan area, which is an area for scanning information on the transform coefficients.
  • FIG. 1E shows a block diagram of an image decoding unit 6000 according to various embodiments.
  • the image decoding unit 6000 performs operations to encode image data in a video decoding unit (not shown) of the video decoding apparatus 100.
  • the entropy decoding unit 6150 parses the encoded image data to be decoded and the encoding information necessary for decoding from the bitstream 6050.
  • the encoded image data is a quantized transform coefficient
  • the inverse quantization unit 6200 and the inverse transform unit 6250 reconstruct the residue data from the quantized transform coefficients.
  • the entropy decoding unit 6150 of FIG. 1E may correspond to the entropy decoding unit 105 of FIG. 1A.
  • the intra prediction unit 6400 performs intra prediction on a block-by-block basis.
  • the inter-prediction unit 6350 performs inter-prediction using the reference image obtained in the reconstruction picture buffer 6300 for each block.
  • the spatial data for the block of the current image 6050 is restored by adding the predictive data and residue data for each block generated by the intra predictor 6400 or the inter predictor 6350, 6450 and the SAO performing unit 6500 may perform loop filtering on the data of the reconstructed spatial region and output the filtered reconstructed image 6600.
  • restored images stored in the restored picture buffer 6300 can be output as a reference image.
  • the stepwise operations of the image decoding unit 6000 may be performed block by block.
  • FIG. 1F shows a block diagram of an image encoding unit according to various embodiments.
  • the image encoding unit 7000 performs operations to encode image data in an image encoding unit (not shown) of the video encoding device 150.
  • the intra predictor 7200 performs intraprediction on a block-by-block basis among the current image 7050
  • the inter-prediction unit 7150 performs intra prediction on the current image 7050 and the reference image obtained from the reconstructed picture buffer 7100 To perform inter prediction.
  • the transform unit 7250 generates residue data by subtracting the prediction data for each block output from the intra prediction unit 7200 or the inter prediction unit 7150 from the data for the block to be encoded of the current image 7050,
  • quantization unit 7300 may perform conversion and quantization on the residue data and output the quantized transform coefficients on a block-by-block basis.
  • the inverse quantization unit 7450 and the inverse transformation unit 7500 can perform inverse quantization and inverse transformation on the quantized transform coefficients to restore the residue data in the spatial domain. Residue data of the reconstructed spatial region is reconstructed into spatial domain data for a block of the current image 7050 by adding predictive data for each block output from the intra predictor 7200 or the inter predictor 7150 .
  • the deblocking unit 7550 and the SAO performing unit perform in-loop filtering on the data of the reconstructed spatial region to generate a filtered reconstructed image.
  • the generated restored image is stored in the restored picture buffer 7100.
  • the reconstructed images stored in the reconstructed picture buffer 7100 can be used as reference images for inter prediction of other images.
  • the entropy encoding unit 7350 entropy-codes the quantized transform coefficients, and the entropy-encoded coefficients can be output as a bitstream 7400.
  • the entropy encoding unit 7350 of FIG. 1F may correspond to the entropy encoding unit 155 of FIG. 1C.
  • the stepwise operations of the image encoding unit 7000 according to various embodiments may be performed for each block.
  • '0' and '1' shown for the pixels in the current block of FIG. 2 and FIGS. 3A and 3B are assumed to be values of the effective conversion coefficient flag (flag indicating whether the absolute value of the coefficient is greater than 0)
  • the effective conversion coefficient flag flag indicating whether the absolute value of the coefficient is greater than 0
  • FIG. 2 is a diagram for explaining a method of scanning intra-block transform coefficients according to an embodiment.
  • the current block 200 is a block including a plurality of transform coefficients.
  • the current block 200 is a data unit for performing an inverse transform operation, and may be a block of MxN (M, N is a positive integer) size.
  • MxN M, N is a positive integer
  • the current block 200 may be a 16x16 block.
  • the video decoding apparatus 100 may divide the current block 200 into coefficient groups (or sub-blocks) 205 having a predetermined size.
  • the coefficient group may be a block of size XxY (where X and Y are positive integers).
  • the coefficient group 205 may be a 4x4 block.
  • the video decoding apparatus 100 performs a process of scanning the current block 200 from the upper left transform coefficient to the lower right transform coefficient in accordance with the forward scan order, 210 from the bit stream.
  • Information on the coordinates of the pixels 210 of the final effective conversion coefficients may include information on the horizontal direction coordinates of the pixels of the final effective conversion coefficients and information on the vertical direction coordinates of the pixels of the final effective conversion coefficients.
  • the video decoding apparatus 100 obtains the coordinates of the pixel 210 of the final effective conversion coefficient based on the information on the coordinates of the pixel 210 of the final effective conversion coefficient,
  • the information of the transform coefficient may be scanned from the effective transform coefficient related to the final effective transform coefficient 210 according to a predetermined reverse scan order 215.
  • the predetermined reverse scan order 215 may be a reverse diagonal scan order.
  • the video decoding apparatus 100 may scan the coefficient groups 205 according to a predetermined scanning order and perform a scanning operation on each coefficient group 205 according to a predetermined scanning order.
  • the video decoding apparatus 100 may scan information about the coefficient groups according to a predetermined scanning order with respect to the coefficient groups.
  • Information about the coefficient group may be obtained or derived from the bitstream.
  • the information about the coefficient group may be derived to indicate that it includes at least one effective transform coefficient for the first coefficient group scanned according to the forward (reverse) scan order and for the last coefficient group. That is, the information about the coefficient group may not be included in the bitstream for the first coefficient group and the last coefficient group scanned in the forward (reverse) scan order.
  • the video decoding apparatus 100 may determine a predetermined reverse scan order based on at least one of the size of the block and the prediction mode. For example, when the current block size is 4x4 and the prediction mode of the current block is the intra prediction mode, the video decoding apparatus 100 may set one of the reverse horizontal scanning order, vertical scanning order, It can be determined in reverse scan order. When the current block size is 8x8 and the prediction mode of the current block is the intra prediction mode, the video decoding apparatus 100 performs one of the reverse horizontal scanning order, the vertical scanning order, or the diagonal scanning order in a predetermined reverse scan Can be determined in order.
  • the video decoding apparatus 100 can determine the reverse diagonal scanning order in a predetermined reverse scanning order if the current block size is not 4x4 or 8x8 or if the prediction mode of the current block is not the inter prediction mode.
  • the information on the transform coefficients in the coefficient group can be scanned according to a predetermined scanning order 215.
  • the video decoding apparatus 100 may determine that at least one sign among the effective transform coefficients included in each coefficient group 205 is hidden.
  • 3A is a diagram for explaining a method of scanning an intra-block transform coefficient according to another embodiment.
  • a current block 300 is a block including a plurality of transform coefficients.
  • the current block 300 is a unit of data for performing an inverse transform operation, and may be a block of MxN (M, N is a positive integer) size.
  • MxN M, N is a positive integer
  • the current block 300 may be a 16x16 block.
  • the video decoding apparatus 100 may determine a rectangular scan area 340 including all the effective transform coefficients existing in the current block 300.
  • the quadrangular scan region 340 may be determined by the coordinates of the pixel 330 located at the lower right of the quadrangular scan region 340.
  • the horizontal coordinate of the pixel 330 positioned at the lower right of the scan region 340 is the horizontal coordinate of the effective transformation coefficient pixel 320 located at the rightmost of all the effective transformation coefficients in the current block 300 have.
  • the vertical direction coordinate of the pixel 330 positioned at the lower right of the scan region 340 is the vertical direction coordinate of the effective transformation coefficient pixel 310 located at the bottom of all the effective transformation coefficients in the current block 300 have.
  • the information about the pixel 330 may include information about the upper left corner position of the pixel 330.
  • the information about the pixel 330 may include information about the position of the bottom right corner of the pixel 330.
  • the video decoding apparatus 100 receives information on the coordinates of the pixel 330 specifying the quadrangular scan region 340 from the bit stream and generates the quadrangular scan region 340 based on the information about the received pixel 330. [ Can be determined. The video decoding apparatus 100 can scan information on the transform coefficients from the pixel 330 to the upper left pixel 345 of the rectangular scan area 340 according to a predetermined reverse scan order 355. [ At this time, the coefficient group may be determined for every K (K is a positive integer) scan coefficient scanned according to a predetermined forward scan order from the upper left transform coefficient of the rectangular scan region 340.
  • K is a positive integer
  • the number of K (K is a positive integer) scan coefficient scanned according to a predetermined reverse scan order can be determined from the transform coefficient at the lower right end. Details of the coefficient group will be described later with reference to FIG. 3B.
  • the video decoding apparatus 100 can determine that a sign for at least one effective transform coefficient is hidden for each coefficient group, and can restore the sign for at least one effective transform coefficient that is hidden . Details of performing the operation of restoring the hidden code for each coefficient group will be described later with reference to FIG. 3B.
  • FIG. 3B is a diagram for explaining an operation of determining intra-block coefficient groups (sub-blocks) and an operation performed for each coefficient group according to another embodiment.
  • the video decoding apparatus 100 can determine a coefficient group for each of K (K is a positive integer) conversion coefficient pixels according to a predetermined scanning order 355 in the current block 350 in the forward direction.
  • the video decoding apparatus 100 may determine a coefficient group including K transform coefficient pixels. For example, as shown in FIG. 3B, the video decoding apparatus 100 may determine the coefficient group 360 for every 16 pixels.
  • the video decoding apparatus 100 determines that a sign for at least one effective transform coefficient is hidden for every coefficient group 360 and a sign for at least one effective transform coefficient for each coefficient group 360 is You can decide that it is hidden. For example, the video decoding apparatus 100 can determine that a sign (Sign) for at least one effective transform coefficient is hidden for the current coefficient group based on the distance of previously decoded effective transform coefficients in the current coefficient group . Specifically, the video decoding apparatus 100 encodes a sign for at least one effective transform coefficient for the current coefficient group based on the distance between the first effective transform coefficient and the last valid transform coefficient scanned in a predetermined reverse scan order, Can be determined to be hidden. In this case, the distance may be a difference in the positions of the coefficients scanned in the reverse scan order.
  • the video decoding apparatus 100 may determine It can be determined that the sign is hidden.
  • the predetermined value may be various integer values.
  • the predetermined value may be three.
  • the video decoding apparatus 100 determines whether or not the current coefficient group includes at least A hidden code for one effective transform coefficient can be restored. For example, when the parity sum with respect to the level of the effective transform coefficients in the current coefficient group is odd or even, the video decoding apparatus 100 determines the sign of at least one effective transform coefficient as 0 or 1 . At this time, the sign of the effective transform coefficient to be reconstructed may include a sign related to the final effective transform coefficient scanned in the reverse scan order. However, it is easily understood by those skilled in the art that a code at a predetermined position in a coefficient group can be restored according to a predetermined scanning order without being limited thereto.
  • the video decoding apparatus 100 acquires information on the coefficient group from the bitstream according to a predetermined scanning order in the reverse direction and when the information on the coefficient group indicates that the coefficient group includes at least one transform coefficient, Information about the transform coefficient in the coefficient group can be scanned. When the information on the coefficient group indicates that the coefficient group includes only the transform coefficient having a value of 0, all of the transform coefficients in the coefficient group can be determined as 0.
  • the process of determining the last coefficient group according to the forward scan order may perform a smaller number of transforms A coefficient pixel may be present.
  • the video decoding apparatus 100 may determine a coefficient group 365 that includes fewer than K number of conversion coefficient pixels. For example, as shown in FIG. 3B, the video decoding apparatus 100 may determine a coefficient group 365 including two transform coefficients.
  • the video decoding apparatus 100 can obtain information on the coefficient groups 355 and 360 from the bitstream.
  • the information on the coefficient groups 355 and 360 includes flag information indicating whether at least one of the conversion coefficients included in the coefficient groups 355 and 360 is an effective conversion coefficient or only conversion coefficients whose coefficient groups 355 and 360 are 0 Group flag information).
  • the video decoding apparatus 100 does not acquire information (for example, effective coefficient group flag information) about the coefficient group from the bitstream, Information about the coefficient can be obtained.
  • the video decoding apparatus 100 generates a context for binary arithmetic decoding information on the current coefficient group on the basis of the information on the coefficient group of the coefficient group scanned earlier than the current coefficient group according to the predetermined scanning order 355 in the reverse direction
  • the model can be determined.
  • FIG. 4 is a diagram for explaining a process of determining a context model for decoding context-based binary arithmetic decoding information on transform coefficients according to an exemplary embodiment of the present invention.
  • the video decoding apparatus 100 may determine a context model of the information about the currently scanned transform coefficient pixel 405 based on the transform coefficient pixels 410.
  • the neighboring transform coefficient pixels 405 may be five pixels existing at a predetermined position on the right side or the lower side of the currently scanned transform coefficient pixel 405.
  • the peripheral transformation coefficient pixels 405 may be n (n is a positive integer) pixels existing at a predetermined position on the right side or the lower side, without limitation thereto.
  • the video decoding apparatus 100 may compare the context model of the flag information indicating whether the level absolute value of the currently scanned conversion coefficient pixel 405 is greater than 0, Can be determined based on the number of larger coefficient pixels.
  • the video decoding apparatus 100 further includes a context model of flag information indicating whether the level absolute value of the currently scanned conversion coefficient pixel 405 is greater than 1, Can be determined based on the number of pixels
  • the video decoding apparatus 100 converts the context model of the flag information indicating whether the level absolute value of the currently scanned conversion coefficient pixel 405 is greater than 2, Can be determined based on the number.
  • the video decoding apparatus 100 converts the context model of the flag information indicating whether the level value of the currently scanned conversion coefficient pixel 405 is larger than N (N is an integer larger than 2) Can be determined based on the number of coefficient pixels larger than N.
  • the video decoding apparatus 100 may determine a parameter for binarizing the residual level absolute value of the currently scanned conversion coefficient pixel 405 based on the sum of the absolute level values of the peripheral conversion coefficient pixels 410.
  • the binarization parameter may be a Rice parameter.
  • FIG. 5 is a diagram for explaining a process of determining a context model for decoding context-based binary arithmetic decoding information on transform coefficients according to an embodiment.
  • the video decoding apparatus 100 transmits a context model of information on the currently scanned transform coefficient pixel 505 to previously scanned transform coefficient pixels 510 according to a predetermined reverse scan sequence 515, . ≪ / RTI >
  • the transform coefficient pixels 510 may be five pixels previously scanned according to a predetermined reverse echo scan order 515 than the currently scanned transform coefficient pixel 505.
  • the transform coefficient pixels 505 may be n (n is a positive integer) pixels previously scanned in accordance with a given reverse echo scan order 515 .
  • the predetermined reverse scan order 515 may be a reverse zigzag scan order, but the present invention is not limited thereto.
  • the reverse scan order 515 includes a horizontal scan order, a vertical scan order, It can be easily understood.
  • the predetermined reverse scan order may be determined in one of a plurality of scan orders based on the magnitude of the horizontal direction coordinate value specifying the scan region and the vertical direction coordinate value.
  • the video decoding apparatus 100 may compare the context model of the flag information, which indicates whether the level absolute value of the currently scanned conversion factor pixel 505 is greater than 0, Can be determined based on the number of large coefficient pixels.
  • the video decoding apparatus 100 further includes a context model of flag information indicating whether the level absolute value of the currently scanned conversion coefficient pixel 505 is greater than 1, As shown in FIG.
  • the video decoding apparatus 100 converts the context model of the flag information indicating whether the level absolute value of the currently scanned conversion coefficient pixel 505 is larger than 2, Can be determined based on the number.
  • the video decoding apparatus 100 transmits a context model of flag information indicating whether the level absolute value of the currently scanned conversion coefficient pixel 505 is larger than N (N is an integer larger than 2) The value can be determined based on the number of coefficient pixels larger than N.
  • the video decoding apparatus 100 may determine a parameter for binarizing the residual level absolute value of the currently scanned transform coefficient pixel 505 based on the sum of the absolute value levels of the neighboring transform coefficient pixels 510.
  • the binarization parameter may be a Rice parameter.
  • FIG. 6A is a diagram for explaining a zigzag scanning order for scanning information on effective conversion coefficients in a block according to an exemplary embodiment.
  • the video decoding apparatus 100 scans the information on the transform coefficient of the current block 600 from the transform coefficient pixel of the lower right end of the current block 600 according to a zigzag scan sequence 605, You can scan up to the conversion factor pixel at the top.
  • the video decoding apparatus 100 scans the lower-left conversion coefficient pixel 610, then scans the left pixel 615 of the pixel 610, The pixel 620 positioned in the diagonal direction of the upper right corner is scanned.
  • the video decoding apparatus 100 scans the pixel 625 adjacent to the upper side of the pixel 620.
  • the video decoding apparatus 100 scans the pixels 630 located in the diagonal direction of the lower left corner of the pixel.
  • the video decoding apparatus 100 scans the pixel 635 located on the left of the pixel adjacent to the boundary of the current block 600 among the pixels 630.
  • the video decoding apparatus 100 may scan information on the remaining transform coefficient pixels according to the zigzag scan sequence 605.
  • the zigzag scan sequence 605 since the zigzag scan sequence 605 according to an exemplary embodiment of the present invention scans the left directional pixel 615 located in the horizontal direction immediately after the pixel 610 is scanned, the zigzag scan sequence 605 is referred to as a horizontal priority zigzag sequence Can be called.
  • FIG. 6B is a diagram for explaining a zigzag scanning order for scanning information on intra-block transform coefficients according to another embodiment.
  • the video decoding apparatus 100 scans the information on the transform coefficient of the current block 600 from the transform coefficient pixel of the lower right end of the current block 600 according to the zigzag scan sequence 635, You can scan up to the conversion factor pixel at the top.
  • the video decoding apparatus 100 scans the upper right pixel 650 of the pixel 645 after scanning the lower right conversion coefficient pixel 645, And then scans the pixel 655 located in the lower left diagonal direction.
  • the video decoding apparatus 100 scans a pixel 660 adjacent to the left side of the pixel 655.
  • the video decoding apparatus 100 scans the pixels 665 positioned in the diagonal direction of the upper right corner of the pixel.
  • the video decoding apparatus 100 scans the pixel 670 located above the pixel of the pixels 665 adjacent to the boundary of the current block 500.
  • the video decoding apparatus 100 may scan information on the remaining transform coefficient pixels according to the zigzag scan sequence 605.
  • the zigzag scan sequence 605 scans an upward direction pixel 650 positioned in a vertical direction immediately after the scan of the pixel 645, so that the zigzag scan sequence 605 is referred to as a vertical priority zigzag sequence Can be called.
  • FIG. 7A is a diagram for explaining a horizontal scanning order for scanning information on intra-block transform coefficients according to an embodiment.
  • the video decoding apparatus 100 scans information on the transform coefficient of the current block 700 from the transform coefficient pixel of the lower right end of the current block 700 according to the horizontal scan order 705, You can scan up to the conversion factor pixel at the top.
  • the video decoding apparatus 100 sequentially scans the pixels 715 positioned in the horizontal direction, which is the horizontal direction, after scanning the conversion coefficient pixel 710 at the lower right end And scans the pixels of the pixels 715 adjacent to the left boundary of the current block 700 and then scans the rightmost pixel 720 of the immediately above row.
  • the video decoding apparatus 100 scans the pixels 725 located in the leftward direction in the horizontal direction in the same manner as the pixels of the previous row 715 are scanned.
  • the video decoding apparatus 100 may scan information on the remaining transform coefficient pixels according to the horizontal scan order 605.
  • FIG. 7B is a diagram for explaining a vertical scanning order for scanning information on intra-block transform coefficients according to an embodiment.
  • the video decoding apparatus 100 scans information on the transform coefficient of the current block 700 from the transform coefficient pixel of the lower right end of the current block 700 according to the vertical scanning order 730, You can scan up to the conversion factor pixel at the top.
  • the video decoding apparatus 100 sequentially scans the pixels 740 located in the vertical direction, which is the vertical direction, after scanning the conversion coefficient pixel 735 at the lower right end , A pixel of the pixels 740 that is adjacent to the upper boundary of the current block 700 is scanned, and then the lowermost pixel 745 of the column immediately to the left is scanned.
  • the video decoding apparatus 100 scans the pixels 750 positioned in the vertical direction in the same manner as the pixels 740 of the previous row are scanned.
  • the video decoding apparatus 100 may scan information about the remaining transform coefficient pixels according to the vertical scan order 730.
  • FIG. 8 is a diagram for explaining a diagonal scan order for scanning information on intra-block transform coefficients according to an embodiment.
  • the video decoding apparatus 100 reads the transform coefficients of the current block 800 from the transform coefficient pixels of the lower right end of the current block 800 according to the diagonal scan order 805 to scan information on the transform coefficients of the current block 800, You can scan up to the conversion factor pixel at the top.
  • the video decoding apparatus 100 scans the upper right pixel 810 of the pixel 810 after scanning the lower right conversion coefficient pixel 810, And then scans the pixel 820 located in the lower left diagonal direction.
  • the video decoding apparatus 100 scans the pixel 825 adjacent to the upper side of the pixel 815.
  • the video decoding apparatus 100 scans the pixels 830 positioned in the diagonal direction of the lower left end of the pixel 825.
  • the video decoding apparatus 100 may scan information on the remaining transform coefficient pixels according to the diagonal scan sequence 805.
  • FIGS. 6A to 8 various scan sequences for scanning information on effective conversion coefficients in a block have been described.
  • the scan orders described with reference to FIGS. 6A to 8 can be easily understood in a reverse scan order, or a forward scan order in which a person skilled in the art scans in the reverse order of the reverse scan order.
  • 9A to 9C are diagrams for explaining a residual coding syntax structure according to an embodiment.
  • the video decoding apparatus 100 may scan the syntax element information about the transform coefficients to recover the transform coefficients, and may decode the transform coefficients based on the scanned syntax element information.
  • the video decoding apparatus 100 may obtain syntax element information scan_region_x and scan_region_y indicating coordinates for specifying a quadrangular scan region from a bitstream.
  • the syntax element information scan_region_x may indicate the value of the horizontal direction (x-axis direction) coordinate of the effective transformation coefficient located at the rightmost position in the current block with reference to the upper left corner coordinate of the current block
  • the syntax element information scan_region_y indicates (Y-axis direction) coordinate of the effective transformation coefficient located at the lowermost position in the current block with reference to the upper left corner coordinate of the block.
  • the video decoding apparatus 100 can determine the coordinates srX and srY for specifying the scan area based on the syntax element information scan_region_x and scan_region_y.
  • the video decoding apparatus 100 can determine the scan order (ScanOrder (srX + 1, srY + 1)) of the intra-scan transform coefficients determined according to the scan order based on the coordinates srX and srY for specifying the scan region .
  • the video decoding apparatus 100 may determine index information (lastSet) indicating a coefficient group to be scanned last in a forward scan order based on the coordinates srX and srY for specifying a scan region. That is, the video decoding apparatus 100 performs an operation (" 4 ") for bit-shifting the value of (srX + 1) * (srY +
  • the index information (lastSet) of the coefficient group to be scanned can be determined. That is, the output value of the right shifting operation by 4 can be the same as the quotient determined by dividing by 16.
  • the video decoding apparatus 100 determines one coefficient group for every 16 transform coefficients, if the total transform coefficient scanned in the scan region is divided by 16, the number of total coefficient groups (or the end of the forward scan order) A value obtained by adding 1 to an index value indicating a group of scanned coefficients) can be determined.
  • the video decoding apparatus 100 determines the position (lastScanPos) of the last scanned coefficient in the forward scan order based on the coordinates srX and srY for specifying the scan region and sets the position Pos of the current transformation coefficient as the forward scan
  • the position of the last scanned coefficient in the sequence (lastScanPos) can be determined.
  • the video decoding apparatus 100 may initialize i to last set, reduce i by 1 if i is greater than 0, and perform the operations included in the loop statement (for statement) 905. [ The video decoding apparatus 100 may perform the operations included in the for-statement (for statement) 905 until the value becomes less than zero. In this case, i may be an index indicating a coefficient group. That is, the video decoding apparatus 100 may perform an operation on one coefficient group every time the operation included in the loop statement (for statement) 905 is performed.
  • the video decoding apparatus 100 can determine the setPos by performing an operation (i ⁇ 4) of multiplying i by 16.
  • setPos can represent the index information of the transform coefficient located at the first position of the transform group.
  • n may be index information indicating the position of the transform coefficient in the coefficient group according to the forward scan order.
  • the video decoding apparatus 100 may determine the position (blkpos) of the current transform coefficient as a value obtained by adding n to the index information (setPos) indicating the position of the first coefficient of the current coefficient group in the ScanOrder array.
  • the ScanOrder array may be an array indicating the position of the transform coefficients according to the forward scan order.
  • the video decoding apparatus 100 can determine the value sx of the coordinate in the horizontal direction (x-axis direction) currently scanned based on the position (blkpos) of the current transform coefficient and the width of the scan area. In addition, the video decoding apparatus 100 can determine the value sy of the coordinate in the vertical direction (y-axis direction) based on the position (blkpos) of the transform coefficient to be decoded and the width (log2width) of the scan area.
  • the value of sig_flag for the conversion coefficient can be determined as 1.
  • is_last_x may be a value indicating whether there is an effective transform coefficient whose absolute value is greater than 0 among the transform coefficients scanned before the current transform coefficient among the transform coefficients included in the lowermost row in the scan area.
  • is_last_y may be a value indicating whether there is an effective transform coefficient whose absolute value is greater than 0 among the transform coefficients included in the rightmost column in the scan area and scanned before the current transform coefficient.
  • the video decoding apparatus 100 may determine lastSigScanPos to be n if lastSigScanPos is -1 (i.e., initial value). That is, since the index n indicating the position where the first effective transform coefficient of the coefficient group exists in the backward scan order is determined by lastSigScanPos, lastSigScanPos is an index indicating the position where the last valid transform coefficient exists in the forward scan order coefficient group Information. On the other hand, the video decoding apparatus 100 can determine firstSigScanPos as n.
  • firstSigScanPos is updated to n, which is the index information indicating the position of the current conversion coefficient, so that the operation is performed on the conversion coefficients included in the specific coefficient group i
  • the firstSigScanPos may be index information indicating a position where the first effective transform coefficient in the forward scan order coefficient group exists.
  • the video decoding apparatus 100 increases cnt_nz by one. That is, cnt_nz indicating the number of coefficients having a non-zero value in the current block (or scan area) is updated each time the current transform coefficient is an effective transform coefficient.
  • the video decoding apparatus 100 increases cg_nz [i], which indicates the number of coefficients having non-zero values in the current coefficient group i, by one. That is, cg_nz [i] indicating the number of coefficients having a non-zero value in the current coefficient group i is updated every time the current transform coefficient is an effective transform coefficient.
  • the video decoding apparatus 100 may perform the operations (coeff_abs_level_greater1_flag and coeff_abs_level_greater2_flag related operations) included in the forbidden statement (for statement) 915 until the value becomes less than zero.
  • the video decoding apparatus 100 may determine the position (blkpos) of the current transform coefficient as a value obtained by adding n to the index information (setPos) indicating the position of the first coefficient of the current coefficient group in the ScanOrder array.
  • the video decoding apparatus 100 can obtain the absolute value abs_coef for the current transform coefficient based on the current transform coefficient information gt0 flag, gt1 flag, gt2 flag, remainining_abolute value level.
  • the video decoding apparatus 100 determines that the absolute value of the conversion coefficient among the conversion coefficients included in the previously scanned coefficient groups is a conversion The number of coefficients cnt_g1 and the number c1 of transform coefficients obtained from the bitstream of previously scanned transform coefficients obtained from coeff_abs_level_greater1_flag obtained from coeff_abs_level_greater_flag from the bit stream among the transform coefficients having an absolute value larger than 1
  • the video decoding apparatus 100 can obtain coeff_abs_level_greater1_flag (coeff_abs_level_greater1_flag [blkpos]) for the current transform coefficient from the bit stream.
  • coeff_abs_level_greater1_flag may be a flag indicating whether the absolute value of the current transform coefficient is greater than one.
  • the video decoding apparatus 100 can determine the flag gt1_flag (gt1flag [blkpos]) of the current transform coefficient based on coeff_abs_level_greater1_flag obtained from the bitstream.
  • the video decoding apparatus 100 can increase c1 by 1 when the value of the flag gt1_flag of the current transform coefficient is 1. If the flag gt1_flag of the current transform coefficient is 1, the value of c1 is increased by 1 and the value of c1 is updated. Therefore, when performing the loop operation (for statement) () on the next transform coefficients, The number of transform coefficients obtained by obtaining coeff_abs_level_greater1_flag from the bitstream among the previously scanned transform coefficients in the group.
  • the video decoding apparatus 100 determines that the absolute value of the conversion coefficient among the conversion coefficients in the previously scanned coefficient groups is greater than 2
  • the number cnt_g2 of the coefficients and the number c2 of transform coefficients obtained from the previously scanned bit stream in coeff_abs_level_greater2_flag is smaller than the sum of the coefficients cnt_g2 and cnt2 of the transform coefficients that can obtain coeff_abs_level_greater_flag from the bit stream among the transform coefficients having an absolute value of the coefficient greater than 2 If it is smaller than the maximum number num_gt2, the video decoding apparatus 100 can obtain coeff_abs_level_greater2_flag for the current transform coefficient from the bitstream.
  • coeff_abs_level_greater2_flag may be a flag indicating whether the absolute value of the current transform coefficient is greater than two.
  • the video decoding apparatus 100 can determine the flag gt2_flag of the current transform coefficient based on coeff_abs_level_greater2_flag obtained from the bitstream.
  • the video decoding apparatus 100 can increase the number c2 of the current gt2 flags by 1 when the value of the flag gt2_flag of the current conversion coefficient is 1.
  • the flag gt2_flag of the current transform coefficient is 1, the value of c2 is increased by 1 and the value of c2 is updated. Therefore, when performing the loop operation (for statement) () on the next transform coefficients, The number of transform coefficients obtained by obtaining coeff_abs_level_greater1_flag from the bitstream among the previously scanned transform coefficients in the group.
  • the video decoding apparatus 100 may determine that escapeDataPresent is set to 1.
  • the escapeDataPresent may be information indicating that there is additional information (e.g., residual level absolute value information coeff_abs_level_remaining) to determine the value of the transform coefficient in the current transform group.
  • the video decoding apparatus 100 determines that the absolute value of the conversion coefficient among the conversion coefficients in the previously scanned coefficient groups is greater than 2
  • the number cnt_g2 of the coefficients and the number c2 of transform coefficients obtained from the previously scanned bit stream in coeff_abs_level_greater2_flag is smaller than the sum of the coefficients cnt_g2 and cnt2 of the transform coefficients that can obtain coeff_abs_level_greater_flag from the bit stream among the transform coefficients having an absolute value of the coefficient greater than 2 If it is not smaller than the maximum number num_gt2, the video decoding apparatus 100 can determine the escapeDataPresent to be 1. [
  • the video decoding apparatus 100 decodes the number of transform coefficients cnt_g1 having an absolute value of the transform coefficient among the transform coefficients included in the previously scanned coefficient groups greater than 1,
  • num_gt1 which is the maximum number of transform coefficients capable of obtaining coeff_abs_level_greater_flag from the bit stream among the transform coefficients having an absolute value larger than 1, 100
  • the video decoding apparatus 100 determines n as a value obtained by subtracting setPos from lastScanPos (lastScanPos-setPos) when i is the last coefficient group when escapeDataPresent is 1, and n is 15 And if n is greater than or equal to 0, i may be decreased by 1 and the operations contained in the loop statement (for statement) 920 may be performed.
  • the video decoding apparatus 100 may perform an operation (an operation related to coeff_abs_level_reamining) included in the forbidden statement (for statement) 920 until the value becomes less than zero.
  • the video decoding apparatus 100 may determine the position (blkpos) of the current transform coefficient as a value obtained by adding n to the index information (setPos) indicating the position of the first coefficient of the current coefficient group in the ScanOrder array.
  • the video decoding apparatus 100 can determine the base level when the absolute value of the current transform coefficient is larger than 1 (sig_flag [blkpos]).
  • Current transform coefficient in current coefficient group number of transform coefficients having an absolute value larger than 1 among transform coefficients scanned before cnt_gt1 coeff_abs_level_greater_flag can be obtained from a bit stream among transform coefficients having an absolute value larger than 2 Cnt_gt2 where the absolute value of the transform coefficients of the transform coefficients scanned prior to the current transform coefficient in the current coefficient group is greater than 2, when the absolute value of the transform coefficient is smaller than 2
  • the video decoding apparatus 100 can determine the base level to be 3 when the bit rate is smaller than the maximum number num_gt2 of conversion coefficients capable of obtaining coeff_abs_level_greater_flag from the bitstream.
  • the video decoding apparatus 100 can determine the base level to be 2 if cnt_gt2 is smaller than num_gt2. If cnt_gt1 is not smaller than num_gt1, the video decoding apparatus 100 can determine the base level to be 1.
  • the video decoding apparatus 100 can determine the absolute value level abs_coef of the current transform coefficient by adding 1 to the value obtained by adding the value of gt1flag and the value of gt2flag to the current transform coefficient.
  • the video decoding apparatus 100 may determine the absolute value level abs_coef for the current transform coefficient by adding the residual absolute value level level_remaining to the current transform coefficient to abs_coef.
  • the video decoding apparatus 100 can increase cnt_gt2 by 1 if the absolute value level abs_coef for the current transform coefficient is greater than 2. Also, if the absolute value level abs_coef for the current transform coefficient is greater than 1, the video decoding apparatus 100 may increase cnt_gt1 by one.
  • the video decoding apparatus 100 may perform the operation (abs_coef related operation) contained in the forbidden statement (for statement) 925 until the value becomes less than zero.
  • the index information (setPos) indicating the position of the first coefficient of the current coefficient group in the ScanOrder array can be determined by adding n to the index information (setPos).
  • the video decoding apparatus 100 can obtain the absolute value abs_coef for the current transform coefficient based on the current transform coefficient information gt0 flag, gt1 flag, gt2 flag, remainining_abolute value level.
  • the video decoding apparatus 100 can increase the cnt_gt2 by 1 if the effective conversion coefficient flag for the current conversion coefficient is 1 and abs_coef, which is an absolute value for the current conversion coefficient, is greater than or equal to 2.
  • abs_coef which is an absolute value for the current conversion coefficient
  • the video decoding apparatus 100 determines that at least one The signHidden value (signHidden [i]) indicating that the sign of the sign is hidden is set to 1. If the difference between the position lastSigScanPos of the last effective transform coefficient in the current coefficient group scanned in the forward scan order and the position firstSigScanPos of the first effective transform coefficient is not greater than 3, the video decoding apparatus 100 determines that at least one The signHidden value (signHidden [i]) indicating that the sign of the signHidden is hidden can be determined as 0.
  • the video decoding apparatus 100 may initialize i to 0 and increment i by 1 if i is less than or equal to lateSet and perform the operations contained in the loop statement (for statement) 930. [ The video decoding apparatus 100 can perform the operations included in the forbidden statement (for statement) 930 until i becomes larger than lateSet. In this case, i may be an index indicating a coefficient group. That is, the video decoding apparatus 100 may perform an operation for one coefficient group every time the operation included in the loop statement (for statement) 930 is performed.
  • the video decoding apparatus 100 may determine the position (blkpos) of the currently decoded transform coefficient as a value obtained by adding n to the index information setPos indicating the position of the first coefficient of the current coefficient group in the ScanOrder array according to the forward scan order .
  • the video decoding apparatus 100 If the position blkpos of the transform coefficient to be currently decoded is not rsp_pos, the video decoding apparatus 100 outputs information (sign [blkpos]) about the sign of the transform coefficient to be currently decoded if the sign of the transform coefficient is the position hidden_pos of the hidden transform coefficient, Can be determined by information hidden_sign on the sign of the hidden transform coefficient.
  • the video decoding apparatus 100 can obtain the information (sign [blkpos]) about the sign of the transform coefficient currently being decoded from the bit stream.
  • the video decoding apparatus 100 can obtain the information (sign_rsp [blkpos]) regarding the rsp code of the transform coefficient currently being decoded from the bitstream if the position blkpos of the transform coefficient to be currently decoded is rsp_pos.
  • the video decoding apparatus 100 may determine the position (blkpos) of the current transform coefficient as a value obtained by adding n to the index information setPos indicating the position of the first coefficient of the current coefficient group in the ScanOrder array according to the forward scan order.
  • 9D to 9F are diagrams for explaining a residual coding syntax structure according to another embodiment.
  • the video decoding apparatus 100 may scan the syntax element information about the transform coefficients to recover the transform coefficients, and may decode the transform coefficients based on the scanned syntax element information.
  • the video decoding apparatus 100 may obtain syntax element information last_sig_coeff_x and last_sig_coeff_y indicating coordinates for specifying a scan area from a bitstream.
  • the syntax element information last_sig_coeff_x can represent the value of the horizontal direction (x-axis direction) coordinate of the effective transformation coefficient located last in the forward scan order based on the upper left corner coordinate of the current block
  • the syntax element information last_sig_coeff_y may indicate the value of the vertical direction (y-axis direction) coordinate of the effective transformation coefficient positioned at the end in the current block according to the forward scan order based on the upper left corner coordinate of the current block.
  • the video decoding apparatus 100 may determine the coordinates LastSigcoeffX and LastSigCoeffY for specifying the scan area based on the syntax element information last_sig_coeff_x and last_sig_coeff_y.
  • the video decoding apparatus 100 may initialize the position lastScanPos of the effective transformation coefficient located last in the forward scan order in the subblock to 16.
  • the video decoding apparatus 100 may initialize the lastSubBlock indicating the sub-block in which the last valid transform coefficient is located according to the forward scan order in the sub-block.
  • the initialized value may indicate the last sub-block of the current block scanned according to the forward scan order. That is, the lastSubBlock may be initialized to a value indicating the last sub-block among the sub-blocks scanned in the forward scan order based on the height and width of the current block.
  • the video decoding apparatus 100 performs an operation in the Do-while loop statement 950 when the position xC in the horizontal direction of the current coefficient is not LastSigcoeffX or the position yC in the vertical direction of the current coefficient is not LastSigcoeffY, If LastSigcoeffX and position yC in the vertical direction of the current coefficient is LastSigcoeffY, the operation in the do-while loop statement 950 may no longer be performed.
  • the video decoding apparatus 100 may determine the lastScanPos to be 16 and reduce the lastSubblock by 1 if lastScanPos is zero. That is, when the scan in one sub-block is completed (lastScanPos is 0) according to the reverse scan order, lastScanPos is initialized to 16 to scan the next sub-block according to the reverse scan order, the lastSubblock can be reduced by one.
  • the video decoding apparatus 100 may scan the transform coefficients in the current subblock lastSubblock according to a reverse scan order while decrementing lastScanPos by one.
  • the video decoding apparatus 100 can determine the horizontal position xS and the vertical position yS of the current subblock.
  • the video decoding apparatus 100 may determine the position of the current subblock based on the ScanOrder array determined according to a predetermined forward scan order with respect to the current block. That is, the video decoding apparatus 100 can determine the position of the current sub-block based on the height (log2height) and the width (log2width) of the current block, the scan index scanIdx indicating the predetermined scan order, and the value lastSubBlock indicating the current sub- have.
  • xS and yS may be positions of subblocks when treating subblocks as one pixel, rather than positions of actual subblocks. That is, the width and the height of the sub-block may be ignored, and the difference between the sub-block horizontal direction and the vertical direction between adjacent sub-blocks may be one.
  • lastScanPos may be index information indicating the position of the last valid transform coefficient in the subblock including the last valid transform coefficient in the current block scanned in the forward scan order
  • lastSubBlock may be index information indicating the position of the last valid transform coefficient in the current block
  • the video decoding apparatus 100 may initialize i to lastSubBlock, reduce i by 1 if i is greater than 0, and perform the operations contained in the loop statement (for statement) 960. [ The video decoding apparatus 100 may perform the operation included in the forbidden statement (for statement) 960 until the value is less than zero. In this case, i may be an index indicating a coefficient group. That is, the video decoding apparatus 100 may perform an operation on one subblock each time the operation included in the loop statement (for statement) 960 is performed.
  • the video decoding apparatus 100 can determine the horizontal position xS and the vertical position yS of the current subblock.
  • the video decoding apparatus 100 refers to a sub-block having a value smaller than a value (lastSubBlock) indicating a sub-block in which the current effective transform coefficient is located, indicating a current sub-block, or a sub-block including a DC coefficient Quot; coded_sub_block_flag [xS] [yS] for the current subblock i can be obtained when the subblock has a value larger than the value (0).
  • coded_sub_block_flag [xS] [yS] may be flag information indicating whether the coded_sub_block_flag [xS] [yS] includes at least one valid conversion coefficient in the current subblock i.
  • the video decoding apparatus 100 initializes n to lastScanPos-1 if the current subblock is the lastSubBlock including the last valid transform coefficient, otherwise initializes to 15 and if n is greater than or equal to 0 In this case, n can be reduced by 1, and the operation included in the loop (for statement) () can be performed.
  • the video decoding apparatus 100 can perform the operations included in the loop statement (for statement) 960 until n becomes less than 0.
  • n is an index indicating the position of the current transform coefficient in the sub-block Lt; / RTI > That is, the video decoding apparatus 100 can perform an operation on one coefficient group every time the operation included in the loop statement (for statement) () is performed once. That is, the video decoding apparatus 100 may perform an operation (operation related to sig_coeff_flag) for one subblock each time the operation included in the loop statement (for statement) 960 is performed.
  • the video decoding apparatus 100 can determine the positions xC and yC of the current transform coefficient n.
  • sig_coeff_flag [xC] [yC] may be a flag indicating whether the current conversion coefficient is an effective conversion coefficient.
  • inferSbDcSigCoeffFlag can be determined to be 0.
  • the video decoding apparatus 100 initializes the value of the firstScanPos position of the transform coefficient scanned first in the current subblock according to the forward scan order and outputs the position of the transform coefficient scanned last in the current subblock according to the forward scan order You can initialize the value of lastSigScanPos.
  • the video decoding apparatus 100 may initialize the value of numGreater1Flag indicating the number of Greater1Flag and initialize the value of the last position lastGreater1ScanPos at which Greater1Flag is acquired according to the forward scanning order.
  • the video decoding apparatus 100 can initialize cg_nz [i] indicating the number of non-zero transform coefficients in subblock i.
  • the video decoding apparatus 100 initializes n to 15. If n is greater than or equal to 0, n can be decreased by 1, and the operation within the loop statement (for statement) 965 can be performed until n is less than zero.
  • the video decoding apparatus 100 can determine the positions xC and Yc of the current transform coefficient n.
  • the video decoding apparatus 100 acquires coeff_level_greater1_flag [n] for the current transform coefficient n if numGreater1Flag is smaller than 8 when the effective transform coefficient flag sig_coeff_flag for the current transform coefficient is 1, and increases the value of numGreater1Flag by 1 .
  • coeff_level_greater1_flag [n] may be flag information indicating whether the absolute value of the level of the conversion coefficient n is greater than one.
  • the video decoding apparatus 100 can determine Greater1Flag [n] based on coeff_level_greater1_flag [n].
  • lastGreater1ScanPos may be index information indicating the position of a coefficient having a value of coeff_abs_level_greater_flag positioned last in the current subblock according to the forward scan order.
  • escapeDataPresent can be set to 1.
  • the video decoding apparatus 100 can determine escapeDataPresent to be 1 if numGreater1Flag is not smaller than 8.
  • the video decoding apparatus 100 may determine lastSigScanPos to be the current position n of the intra-subblock transform coefficient when the lastSigScanPos indicating the position of the effective transform coefficient located at the end in the current subblock has an initial value according to the forward scan order .
  • the video decoding apparatus 100 may determine firstSigScanPos, which indicates the position of the effective transform coefficient located first in the current subblock, as the current transform coefficient position n in the current subblock according to the forward scan order. If the effective conversion coefficient flag sig_coeff_flag [xC] [yC] of the current conversion coefficient is 1, the value of firstSigScanPos continues to be updated to n, which is the index information indicating the position of the current transform coefficient in the current subblock.
  • the firstSigScanPos may be the index information indicating the position where the first effective transform coefficient exists in the subblock in the forward scan order.
  • the video decoding apparatus 100 may determine the sigHidden value to be 1 if the difference between lastSigScanPos and firstSigScanPos is greater than 3 and may determine the sigHidden value to be 0 if the difference between lastSigScanPos and firstSigScanPos is not greater than 3.
  • sigHidden may be a value indicating that the sign of at least one transform coefficient is hidden for the current subblock.
  • coeff_abs_level_greater1_flag of the coeff_abs_level_greater1_flag (Greater1Flag) for the transform coefficient obtained from the scanned bitstream according to the forward scan order is not the initial value (i.e., at least one Greater1Flag from the bitstream) Is obtained in the current subblock)
  • the video decoding apparatus 100 can obtain the flag coeff_abs_level_greater2_flag [lastGreater1ScanPos] for the transform coefficient of the lastGreater1ScanPos position from the bitstream.
  • coeff_abs_level_greater2_flag may be a flag indicating whether the absolute value of the transform coefficient is greater than two.
  • the video decoding apparatus 100 can determine the escapeDataPresent to be 1. [ The video decoding apparatus 100 can determine Greater2Flag [n] based on coeff_level_greater2_flag [n].
  • the video decoding apparatus 100 can initialize numSigCoeff.
  • numSigCoeff may mean the number of effective transform coefficients among the transform coefficients scanned before the current transform coefficient according to the reverse scan order.
  • the video decoding apparatus 100 initializes n to 15. If n is greater than or equal to 0, n is decreased by 1 and an operation within the for 970 is performed. If n is smaller than 0, the for decoding 970 ) My action may no longer be performed.
  • the video decoding apparatus 100 may perform an operation of scanning information on the current intra-block transform coefficients in a backward scan order.
  • the video decoding apparatus 100 can determine the position xC, yC of the current transform coefficient based on the position n of the current transform coefficient in the current subblock.
  • the video decoding apparatus 100 sets the value of the flag coeff_abs_level_greater1_flag related to the current conversion coefficient, the value of the flag coeff_abs_level_greater2_flag You can determine baseLevel by adding the sum to the sum.
  • the video decoding apparatus 100 extracts the residual level value information coeff_abs_level_remaining [n] for the current transform coefficient n from the bitstream Can be obtained.
  • the video decoding apparatus 100 extracts residual level value information coeff_abs_level_remaining [n Can be obtained. If numSigCoeff is greater than 8, if the base level is 1, the video decoding apparatus 100 may obtain the residual level value information coeff_abs_level_remaining [n] for the current transform coefficient n from the bitstream.
  • the video decoding apparatus 100 obtains the TransCoeffLevel [x0] [y0] [cIdx] [xC] [yC], which is the level value of the current transform coefficient in the current block, by summing the base level for the current transform coefficient and the residual level value for the current transform coefficient. Can be determined.
  • cIdx may be an index indicating a color component.
  • i increases from 0 to 1, it can perform the operations contained in the forbidden statement (for statement) 975 until it becomes less than or equal to the value of lastSubBlock.
  • i may be an index indicating a sub-block. That is, the video decoding apparatus 100 can perform an operation for one coefficient group every time the syntax in the for statement 975 is performed once.
  • the video decoding apparatus 100 determines n to be 15, and if n is greater than 0 If it is the same, the for statement (980) operation can be performed again if n is greater than or equal to 0 after performing the operation in the for statement (980) and decrementing n by 1. If n is less than 0, the operation in the for statement (980) may not be performed any more.
  • the video decoding apparatus 100 can determine the horizontal position and the vertical position xC and yC of the current transform coefficient corresponding to the position n of the current transform coefficient in the current subblock.
  • the video decoding apparatus 100 can determine the position (blkpos) of the current transform coefficient based on xC and yC.
  • the video decoding apparatus 100 can determine the sign of the current transform coefficient as the sign hidden_sign of the hidden transform coefficient if the code is the position hidden_pos of the transform coefficient hidden therein.
  • the video decoding apparatus 100 can obtain the information sign [xC] [yC] concerning the sign of the current transform coefficient from the bitstream, if the code is not the position hidden_pos of the hidden transform coefficient.
  • the video decoding apparatus 100 can obtain the information sign_rsp [xC] [yC] regarding the rsp code of the current transform coefficient from the bit stream when the current transform coefficient position is rsp_pos.
  • the video decoding apparatus 100 determines n to be 15. If n is greater than 0, the video decoding apparatus 100 performs the operation in the for statement (985), reduces n by 1, If greater than or equal to, the for statement (985) operation can be performed again, and if n is less than 0, the operation within the for statement (985) may no longer be performed.
  • the video decoding apparatus 100 can determine the horizontal position and the vertical position xC and yC of the current transform coefficient corresponding to the position n of the current transform coefficient in the current subblock.
  • the video decoding apparatus 100 can determine the position (blkpos) of the current transform coefficient based on xC and yC.
  • FIG. 10 to 23 The operation of the video encoding apparatus 150 may be similar to or opposite to the various embodiments of the operation of the video decoding apparatus 100 described later.
  • FIG. 10 illustrates a process in which the video decoding apparatus 100 determines at least one encoding unit by dividing a current encoding unit according to an embodiment.
  • the video decoding apparatus 100 can determine the type of an encoding unit using block type information, and can determine a type of an encoding unit to be divided using the type information. That is, the division method of the coding unit indicated by the division type information can be determined according to which block type the block type information used by the video decoding apparatus 100 represents.
  • the video decoding apparatus 100 may use block type information indicating that the current encoding unit is a square type. For example, the video decoding apparatus 100 can determine whether to divide a square encoding unit according to division type information, vertically divide, horizontally divide, or divide into four encoding units. 10, if the block type information of the current encoding unit 1000 indicates a square shape, the video decoding apparatus 100 may calculate the size of the current encoding unit 1000 according to the division type information indicating that the current block is not divided, (1010b), 1010c (1010d, etc.) based on the division type information indicating the predetermined division method.
  • the video decoding apparatus 100 determines two coding units 1010b obtained by dividing the current coding unit 1000 in the vertical direction based on division type information indicating division in the vertical direction according to an embodiment .
  • the video decoding apparatus 100 can determine two coding units 1010c obtained by dividing the current coding unit 1000 in the horizontal direction based on the division type information indicating that the coding unit is divided in the horizontal direction.
  • the video decoding apparatus 100 can determine four coding units 1010d obtained by dividing the current coding unit 1000 in the vertical direction and the horizontal direction based on the division type information indicating that the coding unit 1000 is divided in the vertical direction and the horizontal direction.
  • the division type in which the square coding unit can be divided should not be limited to the above-mentioned form, but may include various forms in which the division type information can be represented.
  • the predetermined divisional form in which the square encoding unit is divided will be described in detail by way of various embodiments below.
  • FIG. 11 illustrates a process in which the video decoding apparatus 100 determines at least one encoding unit by dividing an encoding unit in the form of a non-square according to an embodiment.
  • the video decoding apparatus 100 may use block type information indicating that the current encoding unit is a non-square format.
  • the video decoding apparatus 100 can determine whether to divide the non-square current encoding unit according to the division type information or not in a predetermined method.
  • the video decoding apparatus 100 determines the current encoding unit 1100 or 1150 according to the division type information indicating that the current block is not divided 1130a, 1130b, 1130c, 1170a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1170b, 1180a, 1180b, and 1180c.
  • the predetermined division method in which the non-square coding unit is divided will be described in detail through various embodiments.
  • the video decoding apparatus 100 may determine a type in which a coding unit is divided using the division type information.
  • the division type information indicates a number of at least one coding unit generated by dividing an encoding unit . 11, when the division type information indicates that the current encoding unit 1100 or 1150 is divided into two encoding units, the video decoding apparatus 100 determines the current encoding unit 1100 or 1150 based on the division type information, To determine two encoding units 1120a, 11420b, or 1170a and 1170b included in the current encoding unit.
  • the non-square current encoding unit 1100 or 1150 The current encoding unit can be divided in consideration of the position of the long side. For example, the video decoding apparatus 100 divides the current encoding unit 1100 or 1150 in the direction of dividing the long side of the current encoding unit 1100 or 1150 in consideration of the type of the current encoding unit 1100 or 1150 So that a plurality of encoding units can be determined.
  • the video decoding apparatus 100 may determine an odd number of encoding units included in the current encoding unit 1100 or 1150. For example, when the division type information indicates that the current encoding unit 1100 or 1150 is divided into three encoding units, the video decoding apparatus 100 divides the current encoding unit 1100 or 1150 into three encoding units 1130a , 1130b, 1130c, 1180a, 1180b, 1180c. According to an embodiment, the video decoding apparatus 100 may determine an odd number of encoding units included in the current encoding unit 1100 or 1150, and the sizes of the determined encoding units may not be the same.
  • the size of a predetermined encoding unit 1130b or 1180b among the determined odd number of encoding units 1130a, 1130b, 1130c, 1180a, 1180b, and 1180c is different from that of other encoding units 1130a, 1130c, 1180a, and 1180c . That is, an encoding unit that can be determined by dividing the current encoding unit 1100 or 1150 may have a plurality of types of sizes, and an odd number of encoding units 1130a, 1130b, 1130c, 1180a, 1180b, May have different sizes.
  • the video decoding apparatus 100 can determine an odd number of encoding units included in the current encoding unit 1100 or 1150, The video decoding apparatus 100 may limit a coding unit of at least one of odd number of coding units generated by division.
  • the video decoding apparatus 100 includes an encoding unit 1130a, 1130b, 1130c, 1180a, 1180b, and 1180c generated by dividing a current encoding unit 1100 or 1150, 1130b, and 1180b may be different from the other encoding units 1130a, 1130c, 1180a, and 1180c.
  • the encoding units 1130b and 1180b positioned at the center are restricted so as not to be further divided, It can be limited to be divided.
  • FIG. 12 shows a process in which the video decoding apparatus 100 divides an encoding unit based on at least one of block type information and division type information according to an embodiment.
  • the video decoding apparatus 100 may determine to divide or not divide the first coding unit 1200 in units of coding units into coding units based on at least one of the block type information and the division type information. According to an embodiment, when the division type information indicates that the first encoding unit 1200 is divided in the horizontal direction, the video decoding apparatus 100 divides the first encoding unit 1200 in the horizontal direction, (1210).
  • the first encoding unit, the second encoding unit, and the third encoding unit used according to an embodiment are terms used to understand the relation before and after the division between encoding units.
  • the second encoding unit can be determined, and if the second encoding unit is divided, the third encoding unit can be determined.
  • the relationship between the first coding unit, the second coding unit and the third coding unit used can be understood to be in accordance with the above-mentioned characteristic.
  • the video decoding apparatus 100 may determine that the determined second encoding unit 1210 is not divided or divided into encoding units based on at least one of the block type information and the division type information. 12, the video decoding apparatus 100 includes a second encoding unit 1210 of a non-square shape determined by dividing a first encoding unit 1200 based on at least one of block type information and division type information, It may be divided into at least one third encoding unit 1220a, 1220b, 1220c, 1220d, or the like, or the second encoding unit 1210 may not be divided.
  • the video decoding apparatus 100 can acquire at least one of block type information and division type information and the video decoding apparatus 100 can acquire at least one of the first encoding unit 1200
  • the second encoding unit 1210 may divide a plurality of second encoding units (for example, 1210) of various types into a first encoding unit 1210 based on at least one of block type information and division type information,
  • the unit 1200 can be divided according to the divided method.
  • the encoding unit 1210 may also be divided into a third encoding unit (e.g., 1220a, 1220b, 1220c, 1220d, etc.) based on at least one of block type information and division type information for the second encoding unit 1210 have. That is, an encoding unit can be recursively divided based on at least one of division type information and block type information associated with each encoding unit.
  • a third encoding unit e.g., 1220a, 1220b, 1220c, 1220d, etc.
  • a square encoding unit may be determined in a non-square encoding unit, and a non-square encoding unit may be determined by dividing the square encoding unit recursively.
  • predetermined encoding units for example, An encoding unit or a square-shaped encoding unit
  • the third encoding unit 1220c in the form of a square which is one of the odd numbered third encoding units 1220b, 1220c, and 1220d, may be divided in the horizontal direction and divided into a plurality of fourth encoding units.
  • the non-square fourth encoding unit 1240 which is one of the plurality of fourth encoding units, may be further divided into a plurality of encoding units.
  • the non-square-shaped fourth encoding unit 1240 may be further divided into odd-numbered encoding units 1250a, 1250b, and 1250c.
  • the video decoding apparatus 100 divides each of the third encoding units 1220a, 1220b, 1220c, and 1220d into units of encoding based on at least one of block type information and division type information, It can be determined that the unit 1210 is not divided.
  • the video decoding apparatus 100 may divide the second encoding unit 1210 in a non-square form into third encoding units 1220b, 1220c, and 1220d in an odd number according to an embodiment.
  • the video decoding apparatus 100 may set a predetermined restriction on a predetermined third encoding unit among odd numbered third encoding units 1220b, 1220c, and 1220d.
  • the video decoding apparatus 100 may restrict the encoding unit 1220c located in the middle among the odd-numbered third encoding units 1220b, 1220c, and 1220d to no longer be divided, or be divided into a set number of times .
  • the video decoding apparatus 100 may include an encoding unit (not shown) located in the middle among the odd third encoding units 1220b, 1220c, and 1220d included in the second encoding unit 1210 in the non- 1220c may not be further divided or may be limited to being divided into a predetermined division type (for example, divided into four coding units or divided into a form corresponding to the divided form of the second coding unit 1210) (For example, dividing only n times, n > 0).
  • the above restriction on the encoding unit 1220c positioned in the center is merely an example and should not be construed to be limited to the above embodiments and the encoding unit 1220c located in the center is not limited to the other encoding units 1220b and 1220d Quot;), < / RTI > which can be decoded differently.
  • the video decoding apparatus 100 can acquire at least one of the block type information and the division type information used for dividing the current encoding unit at a predetermined position in the current encoding unit.
  • FIG. 13 illustrates a method for the video decoding apparatus 100 to determine a predetermined encoding unit among an odd number of encoding units according to an embodiment.
  • at least one of the block type information and the division type information of the current encoding unit 1300 is a sample of a predetermined position among a plurality of samples included in the current encoding unit 1300 (for example, Sample 1340).
  • the predetermined position in the current coding unit 1300 in which at least one of the block type information and the division type information can be obtained should not be limited to the middle position shown in FIG.
  • the video decoding apparatus 100 may determine that the current encoding unit is not divided or divided into the encoding units of various types and sizes by acquiring at least one of the block type information and the division type information obtained from the predetermined position.
  • the video decoding apparatus 100 may select one of the encoding units.
  • the method for selecting one of the plurality of encoding units may be various, and description of these methods will be described later in various embodiments.
  • the video decoding apparatus 100 may divide the current encoding unit into a plurality of encoding units and determine a unit of encoding at a predetermined position.
  • FIG. 13 illustrates a method for the video decoding apparatus 100 to determine an encoding unit of a predetermined position among odd number of encoding units according to an embodiment.
  • the video decoding apparatus 100 may use information indicating positions of odd-numbered encoding units in order to determine an encoding unit located in the middle among odd-numbered encoding units. Referring to FIG. 13, the video decoding apparatus 100 may determine an odd number of encoding units 1320a, 1320b, and 1320c by dividing the current encoding unit 1300. FIG. The video decoding apparatus 100 may determine the center encoding unit 1320b using information on the positions of odd number of encoding units 1320a, 1320b, and 1320c.
  • the video decoding apparatus 100 determines the positions of the encoding units 1320a, 1320b, and 1320c based on information indicating the positions of predetermined samples included in the encoding units 1320a, 1320b, and 1320c, Can be determined. More specifically, the video decoding apparatus 100 decodes the coding units 1320a, 1320b, and 1320c based on information indicating the positions of the upper left samples 1330a, 1330b, and 1330c of the coding units 1320a, 1320b, By determining the position, the coding unit 1320b located in the center can be determined.
  • Information indicating the positions of the upper left samples 1330a, 1330b, and 1330c included in the coding units 1320a, 1320b, and 1320c is a position in the picture of the coding units 1320a, 1320b, and 1320c Or information about the coordinates.
  • Information indicating the positions of the upper left samples 1330a, 1330b, and 1330c included in the coding units 1320a, 1320b, and 1320c according to one embodiment is stored in the coding units 1320a and 1320b included in the current coding unit 1300 And 1320c, and the width or height may correspond to information indicating a difference between coordinates in the picture of the encoding units 1320a, 1320b, and 1320c.
  • the video decoding apparatus 100 can directly use the information on the position or the coordinates in the picture of the coding units 1320a, 1320b, and 1320c or the information on the width or height of the coding unit corresponding to the difference value between the coordinates
  • the encoding unit 1320b located in the center can be determined.
  • the information indicating the position of the upper left sample 1330a of the upper coding unit 1320a may indicate the coordinates (xa, ya) and the upper left sample 1330b of the middle coding unit 1320b May represent the coordinates (xb, yb), and the information indicating the position of the upper left sample 1330c of the lower coding unit 1320c may indicate the coordinates (xc, yc).
  • the video decoding apparatus 100 can determine the center encoding unit 1320b using the coordinates of the upper left samples 1330a, 1330b, and 1330c included in the encoding units 1320a, 1320b, and 1320c.
  • the coding unit 1320b including the coordinates (xb, yb) of the sample 1330b positioned at the center May be determined as a coding unit located in the middle of the coding units 1320a, 1320b, and 1320c determined by dividing the current coding unit 1300.
  • the coordinates indicating the positions of the samples 1330a, 1330b, and 1330c in the upper left corner may indicate the coordinates indicating the absolute position in the picture
  • the position of the upper left sample 1330a of the upper coding unit 1320a may be (Dxb, dyb), which is the information indicating the relative position of the sample 1330b at the upper left of the middle encoding unit 1320b, and the relative position of the sample 1330c at the upper left of the lower encoding unit 1320c
  • Information dyn (dxc, dyc) coordinates may also be used.
  • the method of determining the coding unit at a predetermined position by using the coordinates of the sample as information indicating the position of the sample included in the coding unit should not be limited to the above-described method, and various arithmetic Should be interpreted as a method.
  • the video decoding apparatus 100 may divide the current encoding unit 1300 into a plurality of encoding units 1320a, 1320b, and 1320c and may convert the encoding units 1320a, 1320b, The encoding unit can be selected. For example, the video decoding apparatus 100 can select an encoding unit 1320b having a different size from among the encoding units 1320a, 1320b, and 1320c.
  • the video decoding apparatus 100 may be configured to include (xa, ya) coordinates, which is information indicating the position of the upper left sample 1330a of the upper encoding unit 1320a, (Xc, yc) coordinates, which is information indicating the position of the lower-stage coding unit 1330b and the position of the upper-left sample 1330c of the lower-stage coding unit 1320c, 1320b, and 1320c, respectively.
  • the video decoding apparatus 100 encodes the encoding units 1320a, 1320b, and 1320c using the coordinates (xa, ya), (xb, yb), (xc, yc) indicating the positions of the encoding units 1320a, ) Can be determined.
  • the video decoding apparatus 100 can determine the width of the upper encoding unit 1320a as xb-xa and the height as yb-ya. According to an embodiment, the video decoding apparatus 100 can determine the width of the middle encoding unit 1320b as xc-xb and the height as yc-yb. The video decoding apparatus 100 may determine the width or height of the lower encoding unit using the width or height of the current encoding unit and the width and height of the upper encoding unit 1320a and the middle encoding unit 1320b .
  • the video decoding apparatus 100 may determine an encoding unit having a different size from the other encoding units based on the widths and heights of the determined encoding units 1320a, 1320b, and 1320c. Referring to FIG. 13, the video decoding apparatus 100 may determine a coding unit 1320b as a coding unit at a predetermined position while having a size different from that of the upper coding unit 1320a and the lower coding unit 1320c.
  • the process of the above-described video decoding apparatus 100 determining an encoding unit having a size different from that of the other encoding units may be the same as the process of determining an encoding unit at a predetermined position using the size of an encoding unit determined based on sample coordinates , Various processes may be used for determining the encoding unit at a predetermined position by comparing the sizes of the encoding units determined according to predetermined sample coordinates.
  • the position of the sample to be considered for determining the position of the coding unit should not be interpreted as being limited to the left upper end, and information about the position of any sample included in the coding unit can be interpreted as being available.
  • the video decoding apparatus 100 may select a coding unit at a predetermined position among the odd number of coding units in which the current coding unit is divided by considering the type of the current coding unit. For example, if the current coding unit is a non-square shape having a width greater than the height, the video decoding apparatus 100 can determine a coding unit at a predetermined position along the horizontal direction. That is, the video decoding apparatus 100 may determine one of the encoding units that are located in the horizontal direction and set a restriction on the encoding unit. If the current coding unit is a non-square shape having a height greater than the width, the video decoding apparatus 100 can determine a coding unit at a predetermined position in the vertical direction. That is, the video decoding apparatus 100 may determine one of the encoding units which are located in the vertical direction and limit the encoding unit.
  • the video decoding apparatus 100 may use information indicating positions of even-numbered encoding units to determine encoding units at predetermined positions among the even-numbered encoding units.
  • the video decoding apparatus 100 can determine an even number of encoding units by dividing the current encoding unit and determine a encoding unit at a predetermined position using information on the positions of the even number of encoding units.
  • a concrete procedure for this is omitted because it may be a process corresponding to a process of determining a coding unit of a predetermined position (for example, a middle position) among the above-mentioned odd number of coding units.
  • the video decoding apparatus 100 may include block type information stored in a sample included in the middle coding unit, Information can be used.
  • the video decoding apparatus 100 may divide the current encoding unit 1300 into a plurality of encoding units 1320a, 1320b, and 1320c based on at least one of the block type information and the division type information,
  • the encoding unit 1320b positioned in the middle of the plurality of encoding units 1320a, 1320b, and 1320c can be determined.
  • the video decoding apparatus 100 may determine a coding unit 1320b positioned at the center in consideration of a position where at least one of the block type information and the division type information is obtained.
  • At least one of the block type information and the division type information of the current encoding unit 1300 can be acquired in the sample 1340 located in the middle of the current encoding unit 1300, and the block type information and the division type information If the current encoding unit 1300 is divided into a plurality of encoding units 1320a, 1320b, and 1320c based on at least one of the encoding units 1320a to 1320c and 1320c, You can decide.
  • the information used for determining the coding unit located in the middle should not be limited to at least one of the block type information and the division type information, and various kinds of information may be used in the process of determining the coding unit located in the middle .
  • predetermined information for identifying a coding unit at a predetermined position may be obtained from a predetermined sample included in a coding unit to be determined.
  • the video decoding apparatus 100 includes a plurality of coding units 1320a, 1320b, and 1320c, which are determined by dividing the current coding unit 1300, and encoding units (for example, (For example, a sample located in the middle of the current encoding unit 1300) at a predetermined position in the current encoding unit 1300 in order to determine an encoding unit located in the middle of the encoding unit, And at least one of division type information. .
  • the video decoding apparatus 100 can determine the sample of the predetermined position in consideration of the block block type of the current encoding unit 1300, and the video decoding apparatus 100 determines that the current encoding unit 1300 is divided
  • a coding unit 1320b including a sample from which predetermined information (for example, at least one of block type information and division type information) can be obtained is determined among a plurality of coding units 1320a, 1320b, and 1320c
  • a predetermined limit can be set. Referring to FIG.
  • the video decoding apparatus 100 may determine a sample 1340 located in the middle of a current encoding unit 1300 as a sample from which predetermined information can be obtained,
  • the coding unit 100 may limit the coding unit 1320b including the sample 1340 to a predetermined limit in the decoding process.
  • the position of the sample from which predetermined information can be obtained can not be construed to be limited to the above-mentioned position, but can be interpreted as samples at arbitrary positions included in the encoding unit 1320b to be determined for limiting.
  • the position of a sample from which predetermined information can be obtained according to an embodiment may be determined according to the type of the current encoding unit 1300.
  • the block type information can determine whether the current encoding unit is a square or a non-square, and determine the position of a sample from which predetermined information can be obtained according to the shape.
  • the video decoding apparatus 100 may use at least one of the information on the width of the current encoding unit and the information on the height, and may be located on a boundary that divides at least one of the width and the height of the current encoding unit by half
  • the sample can be determined as a sample from which predetermined information can be obtained.
  • one of the samples adjacent to the boundary dividing the long side of the current encoding unit into half is divided into a predetermined Can be determined as a sample from which the information of < / RTI >
  • the video decoding apparatus 100 may determine at least one of the block type information and the division type information One can be used.
  • the video decoding apparatus 100 can acquire at least one of the block type information and the division type information from a sample at a predetermined position included in an encoding unit, and the video decoding apparatus 100 determines whether the current encoding unit is divided And divide the generated plurality of coding units by using at least one of division type information and block type information obtained from samples at predetermined positions included in each of the plurality of coding units.
  • the coding unit can be recursively divided using at least one of the block type information and the division type information obtained in the sample at the predetermined position included in each of the coding units. Since the recursive division process of the encoding unit has been described with reference to FIG. 12, a detailed description will be omitted.
  • the video decoding apparatus 100 may determine at least one encoding unit by dividing the current encoding unit, and the order in which the at least one encoding unit is decoded is determined as a predetermined block (for example, ). ≪ / RTI >
  • FIG. 14 shows a sequence in which a plurality of coding units are processed when the video decoding apparatus 100 determines a plurality of coding units by dividing a current coding unit according to an embodiment.
  • the video decoding apparatus 100 divides the first encoding unit 1400 in the vertical direction according to the block type information and the division type information to determine the second encoding units 1410a and 1410b, 1450b, 1450c, and 1450d by dividing the first coding unit 1400 in the horizontal direction to determine the second coding units 1430a and 1430b or dividing the first coding unit 1400 in the vertical direction and the horizontal direction, Can be determined.
  • the video decoding apparatus 100 may determine the order in which the second encoding units 1410a and 1410b determined by dividing the first encoding unit 1400 in the vertical direction are processed in the horizontal direction 1410c .
  • the video decoding apparatus 100 may determine the processing order of the second encoding units 1430a and 1430b determined by dividing the first encoding unit 1400 in the horizontal direction as the vertical direction 1430c.
  • the video decoding apparatus 100 processes the encoding units located in one row of the second encoding units 1450a, 1450b, 1450c, and 1450d determined by dividing the first encoding unit 1400 in the vertical direction and the horizontal direction (For example, a raster scan order or a z scan order 1450e) in which the encoding units located in the next row are processed.
  • the video decoding apparatus 100 may recursively divide encoding units. 14, the video decoding apparatus 100 may determine a plurality of encoding units 1410a, 1410b, 1430a, 1430b, 1450a, 1450b, 1450c, and 1450d by dividing the first encoding unit 1400, It is possible to recursively divide each of the determined plurality of encoding units 1410a, 1410b, 1430a, 1430b, 1450a, 1450b, 1450c, and 1450d.
  • the method of dividing the plurality of encoding units 1410a, 1410b, 1430a, 1430b, 1450a, 1450b, 1450c, and 1450d may be a method corresponding to the method of dividing the first encoding unit 1400.
  • the plurality of coding units 1410a, 1410b, 1430a, 1430b, 1450a, 1450b, 1450c, and 1450d may be independently divided into a plurality of coding units. Referring to FIG.
  • the video decoding apparatus 100 may determine the second encoding units 1410a and 1410b by dividing the first encoding unit 1400 in the vertical direction, and may further determine the second encoding units 1410a and 1410b Can be determined not to divide or separate independently.
  • the video decoding apparatus 100 may divide the left second encoding unit 1410a in the horizontal direction into the third encoding units 1420a and 1420b and the second encoding units 1410b ) May not be divided.
  • the processing order of the encoding units may be determined based on the division process of the encoding units.
  • the processing order of the divided coding units can be determined based on the processing order of the coding units immediately before being divided.
  • the video decoding apparatus 100 can determine the order in which the third coding units 1420a and 1420b determined by dividing the left second coding unit 1410a are processed independently of the second coding unit 1410b on the right side.
  • the third coding units 1420a and 1420b may be processed in the vertical direction 1420c since the second coding units 1410a on the left side are divided in the horizontal direction and the third coding units 1420a and 1420b are determined.
  • the order in which the left second encoding unit 1410a and the right second encoding unit 1410b are processed corresponds to the horizontal direction 1410c, the third encoding unit 1410a included in the left second encoding unit 1410a, The right encoding unit 1410b can be processed after the blocks 1420a and 1420b are processed in the vertical direction 1420c.
  • the above description is intended to explain the process sequence in which encoding units are determined according to the encoding units before division. Therefore, it should not be construed to be limited to the above-described embodiments, It should be construed as being used in various ways that can be handled independently in sequence.
  • FIG. 15 illustrates a process of determining that the current encoding unit is divided into odd number of encoding units when the video decoding apparatus 100 can not process the encoding units in a predetermined order according to an embodiment.
  • the video decoding apparatus 100 may determine that the current encoding unit is divided into odd number of encoding units based on the obtained block type information and the division type information.
  • the first encoding unit 1500 in a square form may be divided into second non-square encoding units 1510a and 1510b, and the second encoding units 1510a and 1510b may be independently 3 encoding units 1520a, 1520b, 1520c, 1520d, and 1520e.
  • the video decoding apparatus 100 may determine a plurality of third encoding units 1520a and 1520b by dividing the left encoding unit 1510a of the second encoding unit in the horizontal direction, May be divided into an odd number of third encoding units 1520c, 1520d, and 1520e.
  • the video decoding apparatus 100 determines whether or not the third encoding units 1520a, 1520b, 1520c, 1520d, and 1520e can be processed in a predetermined order and determines whether there are odd-numbered encoding units You can decide. Referring to FIG. 15, the video decoding apparatus 100 may recursively divide the first encoding unit 1500 to determine the third encoding units 1520a, 1520b, 1520c, 1520d, and 1520e.
  • the video decoding apparatus 100 may further include a first coding unit 1500, a second coding unit 1510a and 1510b or a third coding unit 1520a, 1520b, 1520c, and 1520c based on at least one of block type information and division type information, 1520d, and 1520e may be divided into odd number of coding units among the divided types. For example, an encoding unit located on the right of the second encoding units 1510a and 1510b may be divided into odd third encoding units 1520c, 1520d, and 1520e.
  • the order in which the plurality of coding units included in the first coding unit 1500 are processed may be a predetermined order (for example, a z-scan order 1530) 100 can determine whether the third encoding units 1520c, 1520d, and 1520e determined by dividing the right second encoding unit 1510b into odd numbers satisfy the condition that the third encoding units 1520c, 1520d, and 1520e can be processed according to the predetermined order.
  • a predetermined order for example, a z-scan order 1530
  • the video decoding apparatus 100 satisfies a condition that third encoding units 1520a, 1520b, 1520c, 1520d, and 1520e included in the first encoding unit 1500 can be processed in a predetermined order And it is determined whether or not at least one of the width and the height of the second encoding units 1510a and 1510b is divided in half according to the boundaries of the third encoding units 1520a, 1520b, 1520c, 1520d, and 1520e .
  • the third coding units 1520a and 1520b determined by dividing the height of the left-side second coding unit 1510a in the non-square form by half are satisfied, but the right second coding unit 1510b is set to 3 Since the boundaries of the third encoding units 1520c, 1520d, and 1520e determined by dividing the number of encoding units 1520c, 1520d, and 1520e can not divide the width or height of the right second encoding unit 1510b in half,
  • the video decoding apparatus 100 may determine that the condition is not satisfied and the video decoding apparatus 100 determines that the scanning order is disconnection in the case of such unsatisfactory condition and the right second encoding unit 1510b is based on the determination result It can be determined to be divided into odd number of encoding units.
  • the video decoding apparatus 100 when the video decoding apparatus 100 is divided into odd-numbered coding units, the video decoding apparatus 100 may limit a coding unit of a predetermined position among the divided coding units. Since the embodiment has been described above, a detailed description thereof will be omitted.
  • the video decoding apparatus 100 determines at least one encoding unit by dividing a first encoding unit 1600 according to an embodiment.
  • the video decoding apparatus 100 may divide the first encoding unit 1600 based on at least one of the block type information and the division type information acquired through the acquisition unit 110.
  • the first encoding unit 1600 in the form of a square may be divided into four encoding units having a square shape or may be divided into a plurality of non-square encoding units. For example, referring to FIG.
  • the video decoding apparatus 100 transmits the first encoding unit
  • the encoding unit 1600 may be divided into a plurality of non-square encoding units. More specifically, when the division type information indicates that the first encoding unit 1600 is divided horizontally or vertically to determine an odd number of encoding units, the video decoding apparatus 100 includes a first encoding unit 1600 in the form of a square 1620b, and 1610c divided in the vertical direction as the odd number of coding units, or into the second coding units 1620a, 1620b, and 1620c determined by being divided in the horizontal direction.
  • the video decoding apparatus 100 may be configured such that the second encoding units 1610a, 1610b, 1610c, 1620a, 1620b, and 1620c included in the first encoding unit 1600 can be processed in a predetermined order And the condition is that at least one of the width and height of the first encoding unit 1600 is divided in half according to the boundaries of the second encoding units 1610a, 1610b, 1610c, 1620a, 1620b, and 1620c .
  • the boundaries of the second encoding units 1610a, 1610b, and 1610c, which are determined by dividing the first encoding unit 1600 in the vertical direction, are divided in half by the width of the first encoding unit 1600
  • the first encoding unit 1600 can be determined as not satisfying a condition that can be processed in a predetermined order.
  • 1 encoding unit 1600 may be determined as not satisfying a condition that can be processed in a predetermined order.
  • the video decoding apparatus 100 may determine that the scan sequence is disconnection in the case of such unsatisfactory condition and determine that the first encoding unit 1600 is divided into odd number of encoding units based on the determination result. According to an exemplary embodiment, when the video decoding apparatus 100 is divided into odd-numbered coding units, the video decoding apparatus 100 may limit a coding unit of a predetermined position among the divided coding units. Since the embodiment has been described above, a detailed description thereof will be omitted.
  • the video decoding apparatus 100 may determine the encoding units of various types by dividing the first encoding unit.
  • the video decoding apparatus 100 may divide a first coding unit 1600 in a square form and a first coding unit 1630 or 1650 in a non-square form into various types of coding units .
  • the video decoding apparatus 100 may convert a first encoded unit 1700 of a square form into a non-square format (e.g., a first encoded unit 1700) based on at least one of the block type information and the division type information acquired through the acquisition unit 105 It can be determined to divide it into the second encoding units 1710a, 1710b, 1720a, and 1720b.
  • the second encoding units 1710a, 1710b, 1720a, and 1720b may be independently divided.
  • the video decoding apparatus 100 determines whether to divide or not divide into a plurality of coding units based on at least one of the block type information and the division type information related to each of the second coding units 1710a, 1710b, 1720a, and 1720b . According to an embodiment, the video decoding apparatus 100 divides the left second encoding unit 1710a in the non-square form determined by dividing the first encoding unit 1700 in the vertical direction into the horizontal direction, 1712a, and 1712b.
  • the right side second encoding unit 1710b is arranged in the horizontal direction in the same way as the direction in which the left second encoding unit 1710a is divided, As shown in Fig.
  • the right second encoding unit 1710b is divided in the same direction and the third encoding units 1714a and 1714b are determined, the left second encoding unit 1710a and the right second encoding unit 1710b are arranged in the horizontal direction
  • the third encoding units 1712a, 1712b, 1714a, and 1714b can be determined by being independently divided.
  • the video decoding apparatus 100 divides the first encoding unit 1700 into four square-shaped second encoding units 1730a, 1730b, 1730c, and 1730d based on at least one of the block type information and the division type information. And this may be inefficient in terms of image decoding.
  • the video decoding apparatus 100 divides the second encoding unit 1720a or 1720b in the non-square form determined by dividing the first encoding unit 11300 in the horizontal direction into the vertical direction, (1722a, 1722b, 1724a, 1724b).
  • the video decoding apparatus 100 may generate a second coding unit (for example, Coding unit 1720b) can be restricted such that the upper second encoding unit 1720a can not be divided vertically in the same direction as the divided direction.
  • FIG. 18 illustrates a process in which the video decoding apparatus 100 divides a square-shaped encoding unit when the division type information can not be divided into four square-shaped encoding units according to an embodiment.
  • the video decoding apparatus 100 divides the first encoding unit 1800 based on at least one of the block type information and the division type information, and outputs the second encoding units 1810a, 1810b, 1820a, and 1820b You can decide.
  • the division type information may include information on various types in which the coding unit can be divided, but information on various types may not include information for dividing into four square units of coding units.
  • the video decoding apparatus 100 can not divide the first encoding unit 1800 in the square form into the second encoding units 1830a, 1830b, 1830c, and 1830d in the form of four squares.
  • the video decoding apparatus 100 can determine the second encoding units 1810a, 1810b, 1820a, and 1820b in the non-square form.
  • the video decoding apparatus 100 may independently divide the second encoding units 1810a, 1810b, 1820a, and 1820b in the non-square form.
  • Each of the second encoding units 1810a, 1810b, 1820a, 1820b, and the like may be divided in a predetermined order through a recursive method, and the first encoding unit 1800 May be a partitioning method corresponding to a method in which a partition is divided.
  • the video decoding apparatus 100 can determine the third encoding units 1812a and 1812b in the form of a square by dividing the left second encoding unit 1810a in the horizontal direction, and the right second encoding unit 1810b It is possible to determine the third encoding units 1814a and 1814b in the form of a square by being divided in the horizontal direction. Further, the video decoding apparatus 100 may divide the left second encoding unit 1810a and the right second encoding unit 1810b in the horizontal direction to determine the square-shaped third encoding units 1816a, 1816b, 1816c, and 1816d have. In this case, the encoding unit may be determined in the same manner as the first encoding unit 1800 is divided into the four second-type second encoding units 1830a, 1830b, 1830c, and 1830d.
  • the video decoding apparatus 100 can determine the third encoding units 1822a and 1822b in the form of a square by dividing the upper second encoding unit 1820a in the vertical direction, and the lower second encoding units 1820b May be divided in the vertical direction to determine the third encoding units 1824a and 1824b in the form of a square. Further, the video decoding apparatus 100 may divide the upper second encoding unit 1820a and the lower second encoding unit 1820b in the vertical direction to determine the square-shaped third encoding units 1822a, 1822b, 1824a, and 1824b have. In this case, the encoding unit may be determined in the same manner as the first encoding unit 1800 is divided into the four second-type second encoding units 1830a, 1830b, 1830c, and 1830d.
  • FIG. 19 illustrates that the processing order among a plurality of coding units may be changed according to the division process of the coding unit according to an embodiment.
  • the video decoding apparatus 100 may divide the first encoding unit 1900 based on the block type information and the division type information.
  • the block type information indicates a square shape and the division type information indicates that the first encoding unit 1900 is divided into at least one of a horizontal direction and a vertical direction
  • the video decoding apparatus 100 includes a first encoding unit 1900 (For example, 1910a, 1910b, 1920a, 1920b, 1930a, 1930b, 1930c, 1930d, etc.) can be determined.
  • the non-square second encoding units 1910a, 1910b, 1920a, and 1920b which are determined by dividing the first encoding unit 1900 only in the horizontal direction or the vertical direction, As shown in FIG.
  • the video decoding apparatus 100 divides the second encoding units 1910a and 1910b, which are generated by dividing the first encoding unit 1900 in the vertical direction, in the horizontal direction to generate third encoding units 1916a, 1916b, 1926c and 1916d can be determined and the second encoding units 1920a and 1920b generated by dividing the first encoding unit 1900 in the horizontal direction are divided in the horizontal direction and the third encoding units 1926a, 1926b, and 1926c , 1926d) can be determined. Since the process of dividing the second encoding units 1910a, 1910b, 1920a, and 1920b has been described in detail with reference to FIG. 17, a detailed description thereof will be omitted.
  • the video decoding apparatus 100 may process an encoding unit in a predetermined order.
  • the features of the processing of the encoding unit in the predetermined order have been described in detail with reference to FIG. 14, and a detailed description thereof will be omitted.
  • the video decoding apparatus 100 divides a first encoding unit 1900 in a square form into four quadrangle-shaped third encoding units 1916a, 1916b, 1916c, 1916d, 1926a, 1926b, 1926c, and 1926d Can be determined.
  • the video decoding apparatus 100 may process the third encoding units 1916a, 1916b, 1916c, 1916d, 1926a, 1926b, 1926c, and 1926d according to the form in which the first encoding unit 1900 is divided You can decide.
  • the video decoding apparatus 100 divides the second encoding units 1910a and 1910b generated in the vertical direction and divides them in the horizontal direction to determine the third encoding units 1916a, 1916b, 1916c, and 1916d And the video decoding apparatus 100 first processes the third encoding units 1916a and 1916b included in the left second encoding unit 1910a in the vertical direction and then processes the third encoding units 1916a and 1916b included in the right second encoding unit 1910b The third encoding units 1916a, 1916b, 1916c, and 1916d can be processed in accordance with the order 1917 of processing the third encoding units 1916c and 1916d in the vertical direction.
  • the video decoding apparatus 100 divides the second encoding units 1920a and 1920b generated in the horizontal direction into vertical directions to determine the third encoding units 1926a, 1926b, 1926c, and 1926d And the video decoding apparatus 100 first processes the third encoding units 1926a and 1926b included in the upper second encoding unit 1920a in the horizontal direction and then processes the third encoding units 1926a and 1926b included in the lower second encoding unit 1920b
  • the third encoding units 1926a, 1926b, 1926c, and 1926d can be processed according to the order 1927 of processing the third encoding units 1926c and 1926d in the horizontal direction.
  • the second encoding units 1910a, 1910b, 1920a, and 1920b are divided to determine the third encoding units 1916a, 1916b, 1916c, 1916d, 1926a, 1926b, 1926c, and 1926d, have.
  • the second encoding units 1910a and 1910b determined to be divided in the vertical direction and the second encoding units 1920a and 1920b determined to be divided in the horizontal direction are divided into different formats, but the third encoding unit 1916a , 1916b, 1916c, 1916d, 1926a, 1926b, 1926c, and 1926d, the result is that the first encoding unit 1900 is divided into the same type of encoding units.
  • FIG. 20 illustrates a process of determining the depth of an encoding unit according to a change in type and size of an encoding unit when the encoding unit is recursively divided according to an embodiment to determine a plurality of encoding units.
  • the video decoding apparatus 100 may determine the depth of a coding unit according to a predetermined criterion.
  • a predetermined criterion may be a length of a long side of a coding unit.
  • the depth of the current coding unit is smaller than the depth of the coding unit before being divided it can be determined that the depth is increased by n.
  • an encoding unit with an increased depth is expressed as a lower-depth encoding unit.
  • the video decoding apparatus 100 generates a square 1 coding unit 2000 can be divided to determine the second coding unit 2002, the third coding unit 2004, etc. of the lower depth. If the size of the first encoding unit 2000 in the form of a square is 2Nx2N, the second encoding unit 2002 determined by dividing the width and height of the first encoding unit 2000 by 1/21 times may have a size of NxN have. Furthermore, the third encoding unit 2004 determined by dividing the width and height of the second encoding unit 2002 by a half size may have a size of N / 2xN / 2.
  • the width and the height of the third encoding unit 2004 correspond to 1/22 of the first encoding unit 2000.
  • the depth of the first encoding unit 2000 is D
  • the depth of the second encoding unit 2002 which is 1/21 times the width and height of the first encoding unit 2000, may be D + 1
  • the depth of the third encoding unit 2004, which is one-22 times the width and height of the second encoding unit 2000 may be D + 2.
  • block type information indicating a non-square shape for example, block type information is' 1: NS_VER 'indicating that the height is a non-square having a width greater than the width or' 2 >: NS_HOR '
  • the video decoding apparatus 100 divides the first coding unit 2010 or 2020 in a non-square form to generate a second coding unit 2012 or 2022 of lower depth, The third encoding unit 2014 or 2024, or the like.
  • the video decoding apparatus 100 may determine a second encoding unit (e.g., 2002, 2012, 2022, etc.) by dividing at least one of the width and the height of the first encoding unit 2010 of Nx2N size. That is, the video decoding apparatus 100 can determine the second encoding unit 2002 of the NxN size or the second encoding unit 2022 of the NxN / 2 size by dividing the first encoding unit 2010 in the horizontal direction, The second encoding unit 2012 may be divided into the horizontal direction and the vertical direction to determine the second encoding unit 2012 of N / 2xN size.
  • a second encoding unit e.g., 2002, 2012, 2022, etc.
  • the video decoding apparatus 100 divides at least one of the width and the height of the 2NxN-size first encoding unit 2020 to determine a second encoding unit (for example, 2002, 2012, 2022, etc.) It is possible. That is, the video decoding apparatus 100 can determine the second encoding unit 2002 of NxN size or the second encoding unit 2012 of N / 2xN size by dividing the first encoding unit 2020 in the vertical direction, The second encoding unit 2022 of the NxN / 2 size may be determined by dividing the image data in the horizontal direction and the vertical direction.
  • a second encoding unit for example, 2002, 2012, 2022, etc.
  • the video decoding apparatus 100 divides at least one of the width and the height of the second encoding unit 2002 of NxN size to determine a third encoding unit (for example, 2004, 2014, 2024, etc.) It is possible. That is, the video decoding apparatus 100 determines the third encoding unit 2004 of N / 2xN / 2 size by dividing the second encoding unit 2002 in the vertical direction and the horizontal direction, 3 encoding unit 2014 or a third encoding unit 2024 of N / 2xN / 22 size.
  • a third encoding unit for example, 2004, 2014, 2024, etc.
  • the video decoding apparatus 100 divides at least one of the width and the height of the second encoding unit 2012 of N / 2xN size, and encodes the third encoding unit (for example, 2004, 2014, 2024, . That is, the video decoding apparatus 100 divides the second encoding unit 2012 in the horizontal direction to generate a third encoding unit 2004 of N / 2xN / 2 or a third encoding unit 2024 of N / 2xN / 22 size ) Or may be divided into vertical and horizontal directions to determine a third encoding unit 2014 of N / 22xN / 2 size.
  • the video decoding apparatus 100 divides at least one of the width and the height of the second encoding unit 2014 of NxN / 2 size into a third encoding unit (e.g., 2004, 2014, 2024, etc.) . That is, the video decoding apparatus 100 divides the second encoding unit 2012 in the vertical direction to obtain a third encoding unit 2004 of N / 2xN / 2 or a third encoding unit 2014 of N / 22xN / 2 size ) Or may be divided into vertical and horizontal directions to determine a third encoding unit 2024 of N / 2xN / 22 size.
  • a third encoding unit e.g., 2004, 2014, 2024, etc.
  • the video decoding apparatus 100 may divide a square-shaped encoding unit (for example, 2000, 2002, 2004) into a horizontal direction or a vertical direction.
  • the first encoding unit 2000 of the size 2Nx2N is divided in the vertical direction to determine the first encoding unit 2010 of the size Nx2N or the horizontal direction to determine the first encoding unit 2020 of 2NxN size .
  • the depth of the encoding unit in which the first encoding unit 2000, 2002, or 2004 of size 2Nx2N is divided in the horizontal direction or the vertical direction is determined May be the same as the depth of the first encoding unit (2000, 2002 or 2004).
  • the width and height of the third encoding unit 2014 or 2024 may correspond to 1/22 of the first encoding unit (2010 or 2020).
  • the depth of the first coding unit 2010 or 2020 is D
  • the depth of the second coding unit 2012 or 2014 which is half the width and height of the first coding unit 2010 or 2020, is D + 1
  • the depth of the third coding unit 2014 or 2024 which is 1/22 times the width and height of the first coding unit 2010 or 2020 may be D + 2.
  • FIG. 21 illustrates a depth index (PID) for coding unit classification and depth that can be determined according to the type and size of coding units according to an exemplary embodiment.
  • PID depth index
  • the video decoding apparatus 100 may divide the first encoding unit 2100 in a square form to determine various types of second encoding units. 21, the video decoding apparatus 100 divides the first coding unit 2100 into at least one of a vertical direction and a horizontal direction according to the division type information, and outputs the second coding units 2102a, 2102b, 2104a, 2104b, 2106a, 2106b, 2106c, and 2106d. That is, the video decoding apparatus 100 can determine the second encoding units 2102a, 2102b, 2104a, 2104b, 2106a, 2106b, 2106c, and 2106d based on the division type information for the first encoding unit 2100. [
  • the second encoding units 2102a, 2102b, 2104a, 2104b, 2106a, 2106b, 2106c, and 2106d which are determined according to the division type information for the first encoding unit 2100 in a square form, Depth can be determined based on. For example, since the length of one side of the first encoding unit 2100 in the square form is the same as the length of long sides of the second encoding units 2102a, 2102b, 2104a, and 2104b in the non-square form, 2100 and the non-square type second encoding units 2102a, 2102b, 2104a, and 2104b are denoted by D in the same manner.
  • the video decoding apparatus 100 divides the first encoding unit 2100 into four square-shaped second encoding units 2106a, 2106b, 2106c, and 2106d based on the division type information
  • the length of one side of the second encoding units 2106a, 2106b, 2106c and 2106d is one-half the length of one side of the first encoding unit 2100. Therefore, the depths of the second encoding units 2106a, 2106b, May be a depth of D + 1 that is one depth lower than D, which is the depth of the first encoding unit 2100.
  • the video decoding apparatus 100 divides a first coding unit 2110 having a height greater than a width in a horizontal direction according to the division type information, and generates a plurality of second coding units 2112a, 2112b, 2114a, 2114b, and 2114c. According to an embodiment, the video decoding apparatus 100 divides the first coding unit 2120 of a shape whose width is longer than a height in the vertical direction according to the division type information, and generates a plurality of second coding units 2122a, 2122b, 2124a, 2124b, and 2124c.
  • the second encoding units 2112a, 2112b, 2114a, 2114b, 2116a, 2116b, 2116c, and 2116d determined according to the division type information for the first encoding unit 2110 or 2120 in the non-
  • the depth can be determined based on the length of the long side. For example, since the length of one side of the square-shaped second encoding units 2112a and 2112b is 1/2 times the length of one side of the non-square first encoding unit 2110 whose height is longer than the width, The depth of the second encoding units 2102a, 2102b, 2104a and 2104b in the form of D + 1 is one depth lower than the depth D of the first encoding unit 2110 in the non-square form.
  • the video decoding apparatus 100 may divide the non-square first encoding unit 2110 into odd second encoding units 2114a, 2114b, and 2114c based on the division type information.
  • the odd number of second encoding units 2114a, 2114b and 2114c may include non-square second encoding units 2114a and 2114c and a square second encoding unit 2114b.
  • the length of the longer sides of the non-square second encoding units 2114a and 2114c and the length of one side of the second encoding unit 2114b of the square shape are 1 /
  • the depth of the second encoding units 2114a, 2114b and 2114c may be a depth of D + 1 which is one depth lower than the depth D of the first encoding unit 2110.
  • the video decoding apparatus 100 is connected to the first encoding unit 2120 in the form of a non-square shape whose width is longer than the height in a manner corresponding to the scheme for determining the depths of the encoding units associated with the first encoding unit 2110 The depth of the encoding units can be determined.
  • the video decoding apparatus 100 determines an index (PID) for distinguishing divided coding units. If the odd-numbered coding units are not the same size, The index can be determined based on the index. 21, an encoding unit 2114b positioned at the center among the odd-numbered encoding units 2114a, 2114b, and 2114c has the same width as other encoding units 2114a and 2114c, May be two times as high as the height of the first and second electrodes 2114a and 2114c. That is, in this case, the coding unit 2114b positioned at the center may include two of the other coding units 2114a and 2114c.
  • the coding unit 2114c positioned next to the coding unit 2114c may be three days in which the index is increased by two. That is, there may be a discontinuity in the value of the index.
  • the video decoding apparatus 100 may determine whether odd-numbered encoding units are not the same size based on the presence or absence of an index discontinuity for distinguishing between the divided encoding units.
  • the video decoding apparatus 100 may determine whether the video decoding apparatus 100 is divided into a specific division type based on a value of an index for identifying a plurality of coding units divided and determined from the current coding unit. 21, the video decoding apparatus 100 divides a rectangular first encoding unit 2110 having a height greater than the width to determine even-numbered encoding units 2112a and 2112b or odd-numbered encoding units 2114a and 2114b , 2114c can be determined.
  • the video decoding apparatus 100 may use an index (PID) indicating each coding unit in order to identify each of the plurality of coding units.
  • the PID may be obtained at a sample of a predetermined position of each coding unit (e.g., the upper left sample).
  • the video decoding apparatus 100 may determine a coding unit at a predetermined position among the coding units divided and determined using an index for classifying a coding unit. According to an embodiment, when the division type information for the rectangular first type encoding unit 2110 whose height is longer than the width is divided into three encoding units, the video decoding apparatus 100 transmits the first encoding unit 2110 It can be divided into three encoding units 2114a, 2114b, and 2114c. The video decoding apparatus 100 can assign an index to each of the three encoding units 2114a, 2114b, and 2114c.
  • the video decoding apparatus 100 may compare the indexes of the respective encoding units in order to determine the middle encoding unit among the encoding units divided into odd numbers.
  • the video decoding apparatus 100 encodes an encoding unit 2114b having an index corresponding to a middle value among indices based on indexes of encoding units into an encoding unit 2114b encoding an intermediate position among encoding units determined by dividing the first encoding unit 2110 Can be determined as a unit.
  • the video decoding apparatus 100 may determine an index based on a size ratio between coding units when the coding units are not the same size in determining the index for dividing the divided coding units .
  • the coding unit 2114b generated by dividing the first coding unit 2110 is divided into coding units 2114a and 2114c having the same width as the coding units 2114a and 2114c but different in height Can be double the height.
  • the index (PID) of the coding unit 2114b positioned at the center is 1, the coding unit 2114c located next to the coding unit 2114c may be three (3)
  • the video decoding apparatus 100 may determine that the encoding unit is divided into a plurality of encoding units including encoding units having different sizes from other encoding units.
  • the video decoding apparatus 100 determines that the encoding unit (for example, the middle encoding unit) at a predetermined position among the odd number of encoding units has a format different from that of the other encoding units
  • the current encoding unit can be divided into.
  • the video decoding apparatus 100 may determine an encoding unit having a different size by using an index (PID) for the encoding unit.
  • PID index
  • the index and the size or position of the encoding unit at a predetermined position to be determined are specific for explaining an embodiment, and thus should not be construed to be limited thereto, and various indexes, positions and sizes of encoding units can be used Should be interpreted.
  • the video decoding apparatus 100 may use a predetermined data unit in which recursive division of an encoding unit starts.
  • FIG. 22 shows that a plurality of coding units are determined according to a plurality of predetermined data units included in a picture according to an embodiment.
  • a predetermined data unit may be defined as a data unit in which an encoding unit starts to be recursively segmented using at least one of block type information and partition type information. That is, it may correspond to a coding unit of the highest depth used in the process of determining a plurality of coding units for dividing the current picture.
  • a predetermined data unit is referred to as a reference data unit for convenience of explanation.
  • the reference data unit may represent a predetermined size and shape.
  • the reference encoding unit may comprise samples of MxN.
  • M and N may be equal to each other, or may be an integer represented by a multiplier of 2. That is, the reference data unit may represent a square or a non-square shape, and may be divided into an integer number of encoding units.
  • the video decoding apparatus 100 may divide the current picture into a plurality of reference data units. According to an embodiment, the video decoding apparatus 100 may divide a plurality of reference data units for dividing a current picture into pieces using division information for each reference data unit.
  • the segmentation process of the reference data unit may correspond to the segmentation process using a quad-tree structure.
  • the video decoding apparatus 100 may determine in advance the minimum size that the reference data unit included in the current picture can have. Accordingly, the video decoding apparatus 100 can determine reference data units of various sizes having sizes equal to or larger than a minimum size, and determine at least one coding unit using block type information and division type information based on the determined reference data unit You can decide.
  • the video decoding apparatus 100 may use a reference encoding unit 2200 in a square form or a reference encoding unit 2202 in a non-square form.
  • the type and size of the reference encoding unit may include various data units (e.g., a sequence, a picture, a slice, a slice segment a slice segment, a maximum encoding unit, and the like).
  • the obtaining unit 105 of the video decoding apparatus 100 may obtain at least one of the information on the type of the reference encoding unit and the size of the reference encoding unit from the bit stream for each of the various data units have.
  • the process of determining at least one encoding unit included in the reference-type encoding unit 2200 in the form of a square is described in detail in the process of dividing the current encoding unit 300 of FIG. 10, and the non- Is determined in the process of dividing the current encoding unit 1100 or 1150 of FIG. 11, so that a detailed description thereof will be omitted.
  • the video decoding apparatus 100 may include an index for identifying the size and type of the reference encoding unit Can be used. That is, the acquiring unit 105 acquires from the bitstream a predetermined condition (for example, a data unit having a size equal to or smaller than a slice) among the various data units (e.g., sequence, picture, slice, slice segment, ), It is possible to obtain only an index for identification of the size and type of the reference encoding unit for each slice, slice segment, maximum encoding unit, and the like.
  • a predetermined condition for example, a data unit having a size equal to or smaller than a slice
  • the various data units e.g., sequence, picture, slice, slice segment,
  • the video decoding apparatus 100 can determine the size and type of the reference data unit for each data unit satisfying the predetermined condition by using the index.
  • the information on the type of the reference encoding unit and the information on the size of the reference encoding unit are obtained from the bitstream for each relatively small data unit and used, the use efficiency of the bitstream may not be good. Therefore, Information on the size of the reference encoding unit and information on the size of the reference encoding unit can be acquired and used. In this case, at least one of the size and the type of the reference encoding unit corresponding to the index indicating the size and type of the reference encoding unit may be predetermined.
  • the video decoding apparatus 100 selects at least one of the size and the type of the reference encoding unit included in the data unit that is the basis of the index acquisition by selecting at least one of the size and the shape of the predetermined reference encoding unit You can decide.
  • the video decoding apparatus 100 may use at least one reference encoding unit included in one maximum encoding unit. That is, the maximum encoding unit for dividing an image may include at least one reference encoding unit, and the encoding unit may be determined through a recursive division process of each reference encoding unit. According to an exemplary embodiment, at least one of the width and the height of the maximum encoding unit may correspond to at least one integer multiple of the width and height of the reference encoding unit. According to an exemplary embodiment, the size of the reference encoding unit may be a size obtained by dividing the maximum encoding unit n times according to a quadtree structure.
  • the video decoding apparatus 100 may determine the reference encoding unit by dividing the maximum encoding unit n times according to the quad tree structure, and may determine the reference encoding unit based on at least one of the block type information and the division type information As shown in FIG.
  • FIG. 23 shows a processing block serving as a reference for determining a determination order of the reference encoding units included in the picture 2300 according to an embodiment.
  • the video decoding apparatus 100 may determine at least one processing block that divides a picture.
  • the processing block is a data unit including at least one reference encoding unit for dividing an image, and at least one reference encoding unit included in the processing block may be determined in a specific order. That is, the order of determination of at least one reference encoding unit determined in each processing block may correspond to one of various kinds of order in which the reference encoding unit can be determined, and the reference encoding unit determination order determined in each processing block May be different for each processing block.
  • the order of determination of the reference encoding unit determined for each processing block is a raster scan, a Z scan, an N scan, an up-right diagonal scan, a horizontal scan a horizontal scan, and a vertical scan. However, the order that can be determined should not be limited to the scan orders.
  • the video decoding apparatus 100 may obtain information on the size of the processing block to determine the size of the at least one processing block included in the image.
  • the video decoding apparatus 100 may obtain information on the size of the processing block from the bitstream to determine the size of the at least one processing block included in the image.
  • the size of such a processing block may be a predetermined size of a data unit represented by information on the size of the processing block.
  • the obtaining unit 105 of the video decoding apparatus 100 may obtain information on the size of the processing block from the bitstream for each specific data unit.
  • information on the size of a processing block can be obtained from a bitstream in units of data such as an image, a sequence, a picture, a slice, a slice segment, and the like. That is, the obtaining unit 105 may obtain information on the size of the processing block from the bitstream for each of the plurality of data units, and the video decoding apparatus 100 divides the picture using information on the size of the obtained processing block
  • the size of the at least one processing block may be determined, and the size of the processing block may be an integer multiple of the reference encoding unit.
  • the video decoding apparatus 100 may determine the size of the processing blocks 2302 and 2312 included in the picture 2300. For example, the video decoding apparatus 100 may determine the size of the processing block based on information on the size of the processing block obtained from the bitstream. Referring to FIG. 23, the video decoding apparatus 100 according to an exemplary embodiment of the present invention has a horizontal size of the processing blocks 2302 and 2312 of four times the horizontal size of the reference encoding unit, a vertical size of four times the vertical size of the reference encoding unit You can decide. The video decoding apparatus 100 may determine an order in which at least one reference encoding unit is determined in at least one processing block.
  • the video decoding apparatus 100 may determine each of the processing blocks 2302 and 2312 included in the picture 2300 based on the size of the processing block, and may include in the processing blocks 2302 and 2312 The determination order of at least one reference encoding unit is determined.
  • the determination of the reference encoding unit may include determining the size of the reference encoding unit according to an embodiment.
  • the video decoding apparatus 100 may obtain information on a determination order of at least one reference encoding unit included in at least one processing block from a bitstream, So that the order in which at least one reference encoding unit is determined can be determined.
  • the information on the decision order can be defined in the order or direction in which the reference encoding units are determined in the processing block. That is, the order in which the reference encoding units are determined may be independently determined for each processing block.
  • the video decoding apparatus 100 may acquire information on a determination order of a reference encoding unit from a bitstream for each specific data unit.
  • the acquiring unit 105 can acquire information on the order of determination of the reference encoding unit from a bitstream for each data unit such as an image, a sequence, a picture, a slice, a slice segment, and a processing block. Since the information on the determination order of the reference encoding unit indicates the reference encoding unit determination order in the processing block, the information on the determination order can be obtained for each specific data unit including an integer number of processing blocks.
  • the video decoding apparatus 100 may determine at least one reference encoding unit based on the determined order according to an embodiment.
  • the acquiring unit 105 may acquire information on the reference encoding unit determination order from the bitstream as information related to the processing blocks 2302 and 2312, and the video decoding apparatus 100 may acquire information It is possible to determine the order of determining at least one reference encoding unit included in the pictures 2302 and 2312 and determine at least one reference encoding unit included in the picture 2300 according to the determination order of the encoding units. Referring to FIG. 23, the video decoding apparatus 100 can determine the determination order 2304 and 2314 of at least one reference encoding unit associated with each processing block 2302 and 2312.
  • the reference encoding unit determination order associated with each processing block 2302, 2312 may be different for each processing block.
  • the reference encoding unit determination order 2304 related to the processing block 2302 is a raster scan order
  • the reference encoding unit included in the processing block 2302 can be determined according to the raster scan order.
  • the reference encoding unit determination order 2314 related to the other processing block 2312 is in the reverse order of the raster scan order
  • the reference encoding unit included in the processing block 2312 can be determined according to the reverse order of the raster scan order.
  • the video decoding apparatus 100 may decode the determined at least one reference encoding unit according to an embodiment.
  • the video decoding apparatus 100 can decode an image based on the reference encoding unit determined through the above-described embodiment.
  • the method of decoding the reference encoding unit may include various methods of decoding the image.
  • the video decoding apparatus 100 may obtain block type information indicating a type of a current encoding unit or division type information indicating a method of dividing a current encoding unit from a bitstream.
  • the block type information or the division type information may be included in a bitstream related to various data units.
  • the video decoding apparatus 100 may include a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header slice segment type information included in the segment header can be used.
  • the video decoding apparatus 100 may obtain a syntax corresponding to the maximum encoding unit, the reference encoding unit, and the block type information or the division type information from the bitstream for each processing block, from the bitstream.
  • the above-described embodiments of the present disclosure can be implemented in a general-purpose digital computer that can be created as a program that can be executed by a computer and operates the program using a computer-readable recording medium.
  • the computer-readable recording medium includes a storage medium such as a magnetic storage medium (e.g., ROM, floppy disk, hard disk, etc.), optical reading medium (e.g., CD ROM,

Abstract

Disclosed is a video decoding method for determining a rectangular scan region including all valid transform coefficients in a current block, scanning information related to the transform coefficients in the rectangular scan region according to a predetermined scan order, acquiring transform coefficients of the current block on the basis of the scanned information related to the transform coefficients, generating a residual block of the current block by performing inverse quantization and inverse transformation on the transform coefficients of the current block, and reconstructing the current block on the basis of the generated residual block.

Description

비디오 복호화 방법 및 그 장치 및 비디오 부호화 방법 및 그 장치VIDEO DECODING METHOD, DEVICE, AND VIDEO Coding METHOD AND DEVICE
비디오 복호화 방법 및 비디오 부호화에 관한 것이다. 상세하게는 엔트로피 복호화 및 엔트로피 부호화에 관한 것이다.A video decoding method and a video encoding method. And more particularly to entropy decoding and entropy encoding.
고해상도 또는 고화질 비디오 컨텐트를 재생, 저장할 수 있는 하드웨어의 개발 및 보급에 따라, 고해상도 또는 고화질 비디오 컨텐트를 효과적으로 부호화하거나 복호화하는 비디오 코덱의 필요성이 증대하고 있다. 기존의 비디오 코덱에 따르면, 비디오는 트리 구조의 부호화 단위에 기반하여 제한된 부호화 방식에 따라 부호화되고 있다. Background of the Invention [0002] As the development and dissemination of hardware capable of playing back and storing high-resolution or high-definition video content increases the need for video codecs to effectively encode or decode high-definition or high-definition video content. According to the existing video codec, video is encoded according to a limited encoding method based on a coding unit of a tree structure.
주파수 변환을 이용하여 공간 영역의 영상 데이터는 주파수 영역의 계수들로 변환된다. 비디오 코덱은, 주파수 변환의 빠른 연산을 위해 영상을 소정 크기의 블록들로 분할하고, 블록마다 DCT 변환을 수행하여, 블록 단위의 주파수 계수들을 부호화한다. 공간 영역의 영상 데이터에 비해 주파수 영역의 계수들이, 압축하기 쉬운 형태를 가진다. 특히 비디오 코덱의 인터 예측 또는 인트라 예측을 통해 공간 영역의 영상 화소값은 예측 오차로 표현되므로, 예측 오차에 대해 주파수 변환이 수행되면 많은 데이터가 0으로 변환될 수 있다. 비디오 코덱은 연속적으로 반복적으로 발생하는 데이터를 작은 크기의 데이터로 치환함으로써, 데이터량을 절감하고 있다.The image data in the spatial domain is transformed into coefficients in the frequency domain using frequency conversion. The video codec divides an image into blocks of a predetermined size for fast calculation of frequency conversion, performs DCT conversion on each block, and encodes frequency coefficients on a block-by-block basis. Compared to image data in the spatial domain, coefficients in the frequency domain have a form that is easy to compress. In particular, since the image pixel values of the spatial domain are expressed by prediction errors through inter prediction or intra prediction of the video codec, many data can be converted to 0 when the frequency transformation is performed on the prediction error. Video codecs reduce the amount of data by replacing consecutively repeated data with small-sized data.
다양한 실시예에 의하면, 다양한 요소에 기초하여 스캔 영역을 결정하고, 계수에 관한 정보를 스캔하고, 이진화/역이진화 및 컨텍스트 모델에 기초한 이진 산술 부호화/복호화를 수행함으로써 엔트로피 부복호화 효율을 높일 수 있다. According to various embodiments, entropy decoding efficiency can be increased by determining scan areas based on various factors, scanning information about coefficients, and performing binary arithmetic coding / decoding based on binarization / inverse binarization and context model .
다양한 실시예에 따른 방법을 구현하기 위한 프로그램이 기록된 컴퓨터로 판독 가능한 기록 매체를 포함할 수 있다.Readable recording medium on which a program for implementing the method according to various embodiments is recorded.
물론, 다양한 실시예의 기술적 과제들은 이상에서 언급한 특징으로 제한되지 않으며, 언급되지 않은 또 다른 기술적 과제들은 아래의 기재로부터 당해 기술분야의 통상의 기술자에게 명확하게 이해될 수 있을 것이다Of course, the technical objects of the various embodiments are not limited to the features mentioned above, and other technical subjects not mentioned can be clearly understood by those skilled in the art from the following description
본 발명의 기술적 과제들은 이상에서 언급한 특징으로 제한되지 않으며, 언급되지 않은 또 다른 기술적 과제들은 아래의 기재로부터 당해 기술분야의 통상의 기술자에게 명확하게 이해될 수 있을 것이다.The technical objects of the present invention are not limited to the features mentioned above, and other technical subjects not mentioned can be clearly understood by those skilled in the art from the following description.
다양한 실시예에 따른 비디오 복호화 방법은 현재 블록 내 모든 유효 변환 계수를 포함하는 사각형 스캔 영역을 결정하는 단계; 상기 사각형 스캔 영역 내 변환 계수에 관한 정보를 소정의 스캔 순서에 따라 스캔하는 단계; 및 상기 스캔된 변환 계수들에 관한 정보에 기초하여 상기 현재 블록의 변환 계수들을 획득하는 단계; 상기 현재 블록의 변환 계수들에 대해 역양자화 및 역변환을 수행하여 현재 블록의 레지듀얼 블록을 생성하는 단계; 및 상기 생성된 레지듀얼 블록에 기초하여 현재 블록을 복원하는 단계를 포함한다. The video decoding method according to various embodiments includes: determining a rectangular scan area including all effective transform coefficients in a current block; Scanning information on the transform coefficients in the quadrangular scan area according to a predetermined scan order; And obtaining transform coefficients of the current block based on information about the scanned transform coefficients; Performing inverse quantization and inverse transform on the transform coefficients of the current block to generate a residual block of the current block; And reconstructing a current block based on the generated residual block.
상기 사각형 스캔 영역 내에는 상기 현재 블록 내 모든 유효 변환 계수를 포함하고, 상기 사각형 스캔 영역을 제외한 현재 블록 내 나머지 영역은 유효 변환 계수가 아닌 0의 값을 갖는 변환계수만을 포함할 수 있다.The rectangle scan area includes all effective transform coefficients in the current block, and the remaining area in the current block excluding the square scan area may include only a transform coefficient having a value of 0, which is not an effective transform coefficient.
상기 사각형 스캔 영역을 결정하는 단계는,Wherein the step of determining the rectangular scan area comprises:
상기 사각형 스캔 영역을 특정하는 좌표에 관한 정보를 비트스트림으로부터 획득하는 단계; 및Obtaining information on coordinates specifying the quadrangular scan area from a bitstream; And
상기 사각형 스캔 영역을 특정하는 좌표에 관한 정보에 기초하여 현재 블록 내 모든 유효 변환 계수를 포함하는 사각형 스캔 영역을 결정하는 단계를 포함하고,Determining a quadrangular scan area including all effective transformation coefficients in a current block based on information on coordinates specifying the quadrangular scan area,
상기 사각형 스캔 영역을 특정하는 좌표는 상기 현재 블록 내 가장 우측에 위치하는 유효 변환 계수에 대한 수평방향 좌표 및 상기 현재 블록 내 가장 하측에 위치하는 유효 변환 계수에 대한 수직방향 좌표를 나타낼 수 있다.The coordinates specifying the quadrangular scan area may indicate a horizontal direction coordinate of the effective transformation coefficient located at the rightmost position in the current block and a vertical direction coordinate of the effective transformation coefficient located at the lowermost position in the current block.
상기 사각형 스캔 영역을 특정하는 좌표에 관한 정보를 비트스트림으로부터 획득하는 단계는,Wherein the step of acquiring information on coordinates specifying the quadrangular scan area from a bitstream comprises:
상기 사각형 스캔 영역을 특정하는 좌표에 관한 정보에 대해 컨텍스트 모델에 기초한 이진 산술 복호화를 수행하는 단계; 및 상기 이진 산술 복호화된 정보에 대해 소정의 역이진화 방법을 이용한 역이진화를 수행하여 상기 사각형 스캔영역을 특정하는 좌표에 관한 역이진화 정보를 획득하는 단계를 더 포함할 수 있다.Performing binary arithmetic decoding based on the context model on information about coordinates specifying the rectangular scan area; And performing inverse binarization on the binary arithmetic decoded information using a predetermined inverse binarization method to obtain inverse binarization information on the coordinates specifying the quadrangular scan area.
상기 컨텍스트 모델은 상기 현재 블록의 크기, 상기 현재 블록의 컬러 성분(color component) 및 빈 인덱스(bin index) 중 적어도 하나에 기초하여 결정될 수 있다.The context model may be determined based on at least one of a size of the current block, a color component of the current block, and a bin index.
상기 소정의 역이진화 방법은 고정 길이(fixed length) 역이진화 방법 및 절삭형 단항(truncated unary) 역이진화 방법 중 적어도 하나일 수 있다.The predetermined inverse binarization method may be at least one of a fixed length inverse binarization method and a truncated unary inverse binarization method.
상기 소정의 스캔 순서는 역 지그재그 스캔(inverse zig-zag scan)에 따른 순서 또는 역 대각 스캔(inverse diagonal scan)에 따른 순서일 수 있다.The predetermined scan order may be an order according to an inverse zig-zag scan or an order according to an inverse diagonal scan.
상기 소정의 스캔 순서는 상기 현재 블록 내 가장 우측에 위치하는 유효 변환 계수 픽셀의 수평방향 좌표 및 상기 현재 블록 내 가장 하측에 위치하는 유효 변환 계수 픽셀의 수직방향 좌표 중 적어도 하나에 기초하여 결정될 수 있다.The predetermined scan order may be determined based on at least one of a horizontal direction coordinate of the effective transformation coefficient pixel located at the rightmost position in the current block and a vertical direction coordinate of the effective transformation coefficient pixel located at the bottommost position in the current block .
상기 변환 계수에 관한 정보는, The information on the transform coefficients may be,
상기 변환 계수의 절대값이 소정의 값보다 큰지 여부를 나타내는 플래그 정보, 상기 변환 계수의 절대값에 관한 잔여 레벨(remaining level) 정보, 상기 변환 계수의 부호 정보, 상기 변환 계수의 역이진화에 이용되는 이진화 파라메터 정보 중 적어도 하나를 포함하고, 상기 소정의 값은 0, 1, 2 중 적어도 하나일 수 있다.A flag information indicating whether an absolute value of the transform coefficient is larger than a predetermined value, remaining level information about an absolute value of the transform coefficient, sign information of the transform coefficient, And binarization parameter information, and the predetermined value may be at least one of 0, 1, and 2.
상기 스캔된 변환 계수들에 관한 정보에 기초하여 상기 현재 블록의 변환 계수들을 획득하는 단계는,Wherein obtaining the transform coefficients of the current block based on the information about the scanned transform coefficients comprises:
상기 변환 계수들의 절대값이 소정의 값보다 큰지 여부를 나타내는 플래그 정보에 관한 컨텍스트 모델에 기초한 이진 산술 복호화 및 역이진화 중 적어도 하나를 수행하여 상기 현재 블록의 변환 계수들을 획득하는 단계를 포함할 수 있다.And performing binary arithmetic decoding and inverse binarization based on the context model on flag information indicating whether the absolute value of the transform coefficients is larger than a predetermined value to obtain transform coefficients of the current block .
상기 변환 계수들의 절대값이 소정의 값보다 큰지 여부를 나타내는 플래그 정보는 제1 변환 계수를 포함하고,Wherein the flag information indicating whether the absolute value of the transform coefficients is larger than a predetermined value includes a first transform coefficient,
상기 제1 변환 계수의 절대값이 소정의 값보다 큰지 여부를 나타내는 플래그 정보에 관한 컨텍스트 모델은 상기 소정의 스캔 순서에 따라 이전에 스캔된 적어도 하나의 제2 변환 계수에 관한 정보, 상기 현재 블록 내 제1 변환 계수의 위치 및 컬러 성분, 우측 또는 하측의 주변 변환 계수에 관한 정보 및 상기 제1 변환 계수의 스캔 위치, 상기 제1 변환 계수의 스캔영역에서의 상대 위치, 첫번째 스캔위치 여부 중 적어도 하나에 기초하여 결정될 수 있다.Wherein the context model of flag information indicating whether the absolute value of the first transform coefficient is larger than a predetermined value includes information on at least one second transform coefficient previously scanned in accordance with the predetermined scan order, At least one of a position and a color component of the first transformation coefficient, information on the right or lower peripheral transformation coefficient, and a scan position of the first transformation coefficient, a relative position in the scan region of the first transformation coefficient, . ≪ / RTI >
상기 변환 계수들에 관한 정보는 변환 계수의 절대값이 소정의 값보다 큰지 여부를 나타내는 플래그 정보를 포함하고,Wherein the information on the transform coefficients includes flag information indicating whether the absolute value of the transform coefficient is larger than a predetermined value,
비트스트림으로부터 획득될 수 있는 상기 플래그 정보의 최대 개수(maximum count)는 상기 스캔 영역의 크기에 기초하여 결정될 수 있다.The maximum count of the flag information that can be obtained from the bitstream may be determined based on the size of the scan area.
소정의 스캔 순서에 따라 상기 사각형 스캔 영역 내 각 변환 계수들의 스캔 순위가 결정되고, 상기 사각형 스캔 영역 내 변환 계수에 관한 정보를 소정의 스캔 순서에 따라 스캔하는 단계는, 상기 사각형 스캔 영역 내 변환 계수에 관한 정보를 사각형 스캔 영역 내 각 변환 계수들의 스캔 순위에 따라 스캔하는 단계를 포함할 수 있다.Wherein the scan order of each of the transformation coefficients in the rectangular scan region is determined according to a predetermined scan order, and the step of scanning information on the transformation coefficients in the rectangular scan region according to a predetermined scan order includes: May be scanned according to the scan order of each transform coefficient in the quadrangle scan area.
소정의 정방향 스캔 순서에 따라 상기 사각형 스캔 영역 내 소정의 복수개의 변환 계수를 포함하는 적어도 하나의 계수 그룹이 결정되고,At least one coefficient group including a predetermined plurality of transform coefficients in the rectangular scan region is determined according to a predetermined forward scan order,
상기 계수 그룹 단위로 적어도 하나의 변환 계수의 부호에 관한 정보를 숨기는지 여부가 결정될 수 있다.Whether to hide information on the sign of at least one transform coefficient in units of the coefficient group can be determined.
다양한 실시예에 따른 비디오 복호화 장치는 현재 블록 내 모든 유효 변환 계수를 포함하는 사각형 스캔 영역을 결정하고, 상기 사각형 스캔 영역 내 변환 계수에 관한 정보를 소정의 스캔 순서에 따라 스캔하고, 상기 스캔된 변환 계수들에 관한 정보에 기초하여 상기 현재 블록의 변환 계수들을 획득하는 엔트로피 복호화부; 및 상기 현재 블록의 변환 계수들에 대해 역양자화 및 역변환을 수행하여 현재 블록의 레지듀얼 블록을 생성하고, 상기 생성된 레지듀얼 블록에 기초하여 상기 현재 블록을 복원하는 영상 복원부를 포함할 수 있다.The video decoding apparatus according to various embodiments determines a quadrangular scan region including all the effective transform coefficients in the current block, scans the information about the transform coefficients in the quadrangular scan region according to a predetermined scan order, An entropy decoding unit for obtaining transform coefficients of the current block based on information on coefficients; And an image restoration unit for generating a residual block of the current block by performing inverse quantization and inverse transform on the transform coefficients of the current block and restoring the current block based on the generated residual block.
다양한 실시예에 따른 비디오 부호화 방법은 현재 블록의 변환 계수들을 획득하는 단계; 상기 현재 블록 내 모든 유효 변환 계수를 포함하는 사각형 스캔 영역을 결정하는 단계; 상기 사각형 스캔 영역에 포함된 변환 계수에 관한 정보를 소정의 스캔 순서에 따라 스캔하는 단계; 상기 스캔된 변환 계수에 관한 정보를 기초로 엔트로피 부호화하여 엔트로피 부호화된 정보를 생성하는 단계; 및 상기 엔트로피 부호화된 정보를 포함하는 비트스트림을 생성하는 단계를 포함할 수 있다.A video encoding method according to various embodiments includes: obtaining transform coefficients of a current block; Determining a rectangular scan area including all the effective transform coefficients in the current block; Scanning the information on the transform coefficients included in the quadrangular scan area according to a predetermined scan order; Generating entropy-encoded information by entropy encoding based on the information about the scanned transform coefficients; And generating a bitstream including the entropy-encoded information.
다양한 실시예에 따른 방법을 구현하기 위한 프로그램이 기록된 컴퓨터로 판독 가능한 기록 매체를 포함할 수 있다.Readable recording medium on which a program for implementing the method according to various embodiments is recorded.
다양한 실시예에 따라, 다양한 요소에 기초하여 스캔 영역을 결정하고, 계수에 관한 정보를 스캔하고, 이진화/역이진화 및 컨텍스트 모델에 기초한 이진 산술 부호화/복호화를 수행함으로써 엔트로피 부복호화 효율을 높일 수 있다. 특히, 변환 계수에 관한 정보를 엔트로피 부복호화하는 과정에서 현재 블록 내 모든 유효 변환 계수를 포함하는 사각형 스캔 영역을 결정하고, 사각형 스캔 영역 내 변환 계수를 스캔함으로써 불필요한 스캔을 줄이고, 서로 연관성이 있는 변환 계수들을 인접하여 스캔함으로써 엔트로피 부복호화 효율을 높일 수 있다. According to various embodiments, entropy decoding efficiency can be increased by determining scan areas based on various factors, scanning information about coefficients, and performing binary arithmetic coding / decoding based on binarization / inverse binarization and context model . Particularly, in the process of entropy decoding the information on the transform coefficients, a rectangular scan region including all the effective transform coefficients in the current block is determined, unnecessary scans are reduced by scanning the transform coefficients in the rectangular scan region, The entropy decoding efficiency can be improved by scanning the coefficients adjacent to each other.
도 1a는 다양한 실시예에 따른 비디오 복호화 장치의 블록도를 도시한다.FIG. 1A shows a block diagram of a video decoding apparatus according to various embodiments.
도 1b는 다양한 실시예에 따른 비디오 복호화 방법의 흐름도를 도시한다.1B shows a flow diagram of a video decoding method according to various embodiments.
도 1c는 다양한 실시예에 따른 비디오 부호화 장치의 블록도를 도시한다.1C shows a block diagram of a video encoding apparatus according to various embodiments.
도 1d는 다양한 실시예에 따른 비디오 부호화 방법의 흐름도를 도시한다.Figure 1D shows a flow diagram of a video encoding method according to various embodiments.
도 1e는 다양한 실시예에 따른 영상 복호화부의 블록도를 도시한다. FIG. 1E shows a block diagram of an image decoding unit according to various embodiments.
도 1f는 다양한 실시예에 따른 영상 복호화부의 블록도를 도시한다1F shows a block diagram of an image decoding unit according to various embodiments
도 2는 일 실시예에 따라서 블록 내 변환 계수를 스캔하는 방법을 설명하기 위한 도면이다.FIG. 2 is a diagram for explaining a method of scanning intra-block transform coefficients according to an embodiment.
도 3a는 다른 실시예에 따라서 블록 내 변환 계수를 스캔하는 방법을 설명하기 위한 도면이다.3A is a diagram for explaining a method of scanning an intra-block transform coefficient according to another embodiment.
도 3b는 다른 실시예에 따라서 블록 내 계수 그룹(서브 블록)을 결정하는 동작 및 계수 그룹 별로 수행되는 동작을 설명하기 위한 도면이다.FIG. 3B is a diagram for explaining an operation of determining intra-block coefficient groups (sub-blocks) and an operation performed for each coefficient group according to another embodiment.
도 4는 일 실시예에 따라서 변환 계수에 관한 정보를 컨텍스트 기반 이진 산술 부복호화하기 위한 컨텍스트 모델을 결정하는 과정을 설명하기 위한 도면이다.FIG. 4 is a diagram for explaining a process of determining a context model for decoding context-based binary arithmetic decoding information on transform coefficients according to an exemplary embodiment of the present invention.
도 5는 다른 실시예에 따라서 변환 계수에 관한 정보를 컨텍스트 기반 이진 산술 부복호화하기 위한 컨텍스트 모델을 결정하는 과정을 설명하기 위한 도면이다.FIG. 5 is a diagram for explaining a process of determining a context model for decoding context-based binary arithmetic decoding information on transform coefficients according to another embodiment.
도 6a는 일 실시예에 따라서 블록 내 변환 계수에 관한 정보를 스캔하기 위한 수평 우선 지그재그 스캔 순서를 설명하기 위한 도면이다.FIG. 6A is a diagram for explaining a horizontal priority zigzag scan order for scanning information on intra-block transform coefficients according to an exemplary embodiment.
도 6b는 일 실시예에 따라서 블록 내 변환 계수에 관한 정보를 스캔하기 위한 수직 우선 지그재그 스캔 순서를 설명하기 위한 도면이다.6B is a diagram for explaining a vertical priority zigzag scan order for scanning information on intra-block transform coefficients according to an embodiment.
도 7a는 일 실시예에 따라서 블록 내 변환 계수에 관한 정보를 스캔하기 위한 수평 스캔 순서를 설명하기 위한 도면이다.FIG. 7A is a diagram for explaining a horizontal scanning order for scanning information on intra-block transform coefficients according to an embodiment.
도 7b는 일 실시예에 따라서 블록 내 변환 계수에 관한 정보를 스캔하기 위한 수직 스캔 순서를 설명하기 위한 도면이다.FIG. 7B is a diagram for explaining a vertical scanning order for scanning information on intra-block transform coefficients according to an embodiment.
도 8은 일 실시예에 따라서 블록 내 변환 계수에 관한 정보를 스캔하기 위한 대각 스캔 순서를 설명하기 위한 도면이다.8 is a diagram for explaining a diagonal scan order for scanning information on intra-block transform coefficients according to an embodiment.
도 9a 내지 9c는 일 실시예에 따른 레지듀얼 부호화 신택스 구조를 설명하기 위한 도면이다.9A to 9C are diagrams for explaining a residual coding syntax structure according to an embodiment.
도 9d 내지 9f는 다른 실시예에 따른 레지듀얼 부호화 신택스 구조를 설명하기 위한 도면이다.9D to 9F are diagrams for explaining a residual coding syntax structure according to another embodiment.
도 10은 일 실시예에 따라 현재 부호화 단위가 분할되어 적어도 하나의 부호화 단위가 결정되는 과정을 도시한다.FIG. 10 illustrates a process in which at least one encoding unit is determined by dividing a current encoding unit according to an embodiment.
도 11은 일 실시예에 따라 비-정사각형의 형태인 부호화 단위가 분할되어 적어도 하나의 부호화 단위가 결정되는 과정을 도시한다.FIG. 11 illustrates a process in which at least one encoding unit is determined by dividing a non-square encoding unit according to an embodiment.
도 12는 일 실시예에 따라 블록 형태 정보 및 분할 형태 정보 중 적어도 하나에 기초하여 부호화 단위가 분할되는 과정을 도시한다.FIG. 12 illustrates a process in which an encoding unit is divided based on at least one of block type information and division type information according to an embodiment.
도 13은 일 실시예에 따라 홀수개의 부호화 단위들 중 소정의 부호화 단위가 결정되는 방법을 도시한다.FIG. 13 illustrates a method of determining a predetermined encoding unit among odd number of encoding units according to an embodiment.
도 14는 일 실시예에 따라 현재 부호화 단위가 분할되어 복수개의 부호화 단위들이 결정되는 경우, 복수개의 부호화 단위들이 처리되는 순서를 도시한다.FIG. 14 shows a sequence in which a plurality of encoding units are processed when a current encoding unit is divided to determine a plurality of encoding units according to an embodiment.
도 15는 일 실시예에 따라 소정의 순서로 부호화 단위가 처리될 수 없는 경우, 현재 부호화 단위가 홀수개의 부호화 단위로 분할되는 것으로 결정되는 과정을 도시한다.FIG. 15 illustrates a process in which, when an encoding unit can not be processed in a predetermined order according to an embodiment, it is determined that the current encoding unit is divided into odd number of encoding units.
도 16은 일 실시예에 따라 제1 부호화 단위가 분할되어 적어도 하나의 부호화 단위가 결정되는 과정을 도시한다.FIG. 16 illustrates a process in which a first encoding unit is divided into at least one encoding unit according to an embodiment of the present invention.
도 17은 일 실시예에 따라 제1 부호화 단위가 분할되어 결정된 비-정사각형 형태의 제2 부호화 단위가 소정의 조건을 만족하는 경우, 제2 부호화 단위가 분할될 수 있는 형태가 제한되는 것을 도시한다.FIG. 17 shows that when the non-square type second coding unit determined by dividing the first coding unit according to an embodiment satisfies a predetermined condition, the form in which the second coding unit can be divided is limited .
도 18은 일 실시예에 따라 분할 형태 정보가 4개의 정사각형 형태의 부호화 단위로 분할하는 것을 나타낼 수 없는 경우, 정사각형 형태의 부호화 단위가 분할되는 과정을 도시한다FIG. 18 illustrates a process of dividing a square-shaped encoding unit when the division type information can not indicate division into four square-shaped encoding units according to an embodiment
도 19는 일 실시예에 따라 복수개의 부호화 단위들 간의 처리 순서가 부호화 단위의 분할 과정에 따라 달라질 수 있음을 도시한 것이다.FIG. 19 illustrates that the processing order among a plurality of coding units may be changed according to the division process of the coding unit according to an embodiment.
도 20은 일 실시예에 따라 부호화 단위가 재귀적으로 분할되어 복수개의 부호화 단위가 결정되는 경우, 부호화 단위의 형태 및 크기가 변함에 따라 부호화 단위의 심도가 결정되는 과정을 도시한다.FIG. 20 illustrates a process of determining the depth of an encoding unit according to a change in type and size of an encoding unit when the encoding unit is recursively divided according to an embodiment to determine a plurality of encoding units.
도 21은 일 실시예에 따라 부호화 단위들의 형태 및 크기에 따라 결정될 수 있는 심도 및 부호화 단위 구분을 위한 인덱스(part index, 이하 PID)를 도시한다.FIG. 21 illustrates a depth index (PID) for coding unit classification and depth that can be determined according to the type and size of coding units according to an exemplary embodiment.
도 22는 일 실시예에 따라 픽쳐에 포함되는 복수개의 소정의 데이터 단위에 따라 복수개의 부호화 단위들이 결정된 것을 도시한다.22 shows that a plurality of coding units are determined according to a plurality of predetermined data units included in a picture according to an embodiment.
도 23은 일 실시예에 따라 픽쳐에 포함되는 기준 부호화 단위의 결정 순서를 결정하는 기준이 되는 프로세싱 블록을 도시한다.FIG. 23 shows a processing block serving as a reference for determining a determination order of a reference encoding unit included in a picture according to an embodiment.
다양한 실시예에 따른 비디오 복호화 방법은 현재 블록 내 모든 유효 변환 계수를 포함하는 사각형 스캔 영역을 결정하는 단계; 상기 사각형 스캔 영역 내 변환 계수에 관한 정보를 소정의 스캔 순서에 따라 스캔하는 단계; 및 상기 스캔된 변환 계수들에 관한 정보에 기초하여 상기 현재 블록의 변환 계수들을 획득하는 단계; 상기 현재 블록의 변환 계수들에 대해 역양자화 및 역변환을 수행하여 현재 블록의 레지듀얼 블록을 생성하는 단계; 및 상기 생성된 레지듀얼 블록에 기초하여 현재 블록을 복원하는 단계를 포함한다. The video decoding method according to various embodiments includes: determining a rectangular scan area including all effective transform coefficients in a current block; Scanning information on the transform coefficients in the quadrangular scan area according to a predetermined scan order; And obtaining transform coefficients of the current block based on information about the scanned transform coefficients; Performing inverse quantization and inverse transform on the transform coefficients of the current block to generate a residual block of the current block; And reconstructing a current block based on the generated residual block.
다양한 실시예에 따른 비디오 복호화 장치는 현재 블록 내 모든 유효 변환 계수를 포함하는 사각형 스캔 영역을 결정하고, 상기 사각형 스캔 영역 내 변환 계수에 관한 정보를 소정의 스캔 순서에 따라 스캔하고, 상기 스캔된 변환 계수들에 관한 정보에 기초하여 상기 현재 블록의 변환 계수들을 획득하는 엔트로피 복호화부; 및 상기 현재 블록의 변환 계수들에 대해 역양자화 및 역변환을 수행하여 현재 블록의 레지듀얼 블록을 생성하고, 상기 생성된 레지듀얼 블록에 기초하여 상기 현재 블록을 복원하는 영상 복원부를 포함할 수 있다.The video decoding apparatus according to various embodiments determines a quadrangular scan region including all the effective transform coefficients in the current block, scans the information about the transform coefficients in the quadrangular scan region according to a predetermined scan order, An entropy decoding unit for obtaining transform coefficients of the current block based on information on coefficients; And an image restoration unit for generating a residual block of the current block by performing inverse quantization and inverse transform on the transform coefficients of the current block and restoring the current block based on the generated residual block.
다양한 실시예에 따른 비디오 부호화 방법은 현재 블록의 변환 계수들을 획득하는 단계; 상기 현재 블록 내 모든 유효 변환 계수를 포함하는 사각형 스캔 영역을 결정하는 단계; 상기 사각형 스캔 영역에 포함된 변환 계수에 관한 정보를 소정의 스캔 순서에 따라 스캔하는 단계; 상기 스캔된 변환 계수에 관한 정보를 기초로 엔트로피 부호화하여 엔트로피 부호화된 정보를 생성하는 단계; 및 상기 엔트로피 부호화된 정보를 포함하는 비트스트림을 생성하는 단계를 포함할 수 있다.A video encoding method according to various embodiments includes: obtaining transform coefficients of a current block; Determining a rectangular scan area including all the effective transform coefficients in the current block; Scanning the information on the transform coefficients included in the quadrangular scan area according to a predetermined scan order; Generating entropy-encoded information by entropy encoding based on the information about the scanned transform coefficients; And generating a bitstream including the entropy-encoded information.
다양한 실시예에 따른 방법을 구현하기 위한 프로그램이 기록된 컴퓨터로 판독 가능한 기록 매체를 포함할 수 있다.Readable recording medium on which a program for implementing the method according to various embodiments is recorded.
이하, '영상'은 비디오의 정지영상이거나 동영상, 즉 비디오 그 자체를 나타낼 수 있다.Hereinafter, 'video' may be a still image of a video or a video, that is, a video itself.
이하 '샘플'은, 영상의 샘플링 위치에 할당된 데이터로서 프로세싱 대상이 되는 데이터를 의미한다. 예를 들어, 공간영역의 영상에서 픽셀들이 샘플들일 수 있다.Hereinafter, 'sample' means data to be processed as data assigned to a sampling position of an image. For example, pixels in an image in the spatial domain may be samples.
이하 '현재 블록(Current Block)'은, 부호화 또는 복호화하고자 하는 영상의 블록을 의미할 수 있다.Hereinafter, the 'current block' may refer to a block of an image to be encoded or decoded.
도 1a는 다양한 실시예에 따른 비디오 복호화 장치의 블록도를 도시한다.FIG. 1A shows a block diagram of a video decoding apparatus according to various embodiments.
다양한 실시예에 따른 비디오 복호화 장치(100)는 엔트로피 복호화부(105) 및 영상 복원부(120)을 포함할 수 있다.The video decoding apparatus 100 according to various embodiments may include an entropy decoding unit 105 and an image restoring unit 120.
엔트로피 복호화부(105)는 비트스트림으로부터 수신된 신택스 엘리먼트(syntax element) 정보를 획득하고, 신택스 엘리먼트 정보에 대해 엔트로피 복호화할 수 있다. 이때, 비트스트림으로부터 수신된 신택스 엘리먼트 정보는 영상에 관한 다양한 신택스 엘리먼트에 관한 정보일 수 있다.The entropy decoding unit 105 may obtain syntax element information received from the bitstream and entropy-decode the syntax element information. At this time, the syntax element information received from the bitstream may be information on various syntax elements related to the image.
엔트로피 복호화부(105)는 현재 블록 내 변환 계수에 관한 신택스 엘리먼트 정보들을 비트스트림으로부터 획득할 수 있고, 현재 블록 내 변환 계수에 관한 신택스 엘리먼트 정보에 대해 엔트로피 복호화할 수 있다. 이때, 현재 블록은 도 10 내지 도 23을 참조하여 설명되는 영상을 부/복호화하는 과정에서 이용할 수 있는 데이터 단위일 수 있다.The entropy decoding unit 105 can obtain syntax element information on the current intra-block transformation coefficient from the bitstream and entropy-decode the syntax element information on the current intra-block transformation coefficient. At this time, the current block may be a data unit that can be used in the process of attaching / decrypting an image described with reference to FIG. 10 to FIG.
엔트로피 복호화부(105)는 엔트로피 복호화된 현재 블록 내 변환 계수에 관한 신택스 엘리먼트 정보를 소정의 스캔 순서에 따라 스캔하여 현재 블록 내 변환 계수들에 관한 정보를 획득할 수 있다. 소정의 스캔 순서는 역방향의 다양한 스캔 순서일 수 있다. 여기서 역방향의 스캔 순서란, 블록 내 우측 하단의 픽셀로부터 블록 내 좌측 상단의 변환 계수 픽셀까지를 스캔하는 순서일 수 있다. 좌상측 변환 계수 픽셀부터 우하측에 위치한 변환 계수의 순서로 변환 계수들을 스캔하는 순서는 정방향 스캔 순서로 지칭될 수 있으며, 우하측에 위치한 마지막 변환 계수부터 좌상측 변환 계수의 순서로 변환 계수를 스캔하는 경우는 역방향 스캔 순서로 지칭될 수 있다. 현재 블록 내 변환 계수에 관한 신택스 엘리먼트 정보는 현재 블록 내 변환 계수가 소정의 값보다 큰 지 여부를 나타내는 플래그(flag) 정보일 수 있다. 이때, 소정의 값은 0보다 크거나 같은 정수 값일 수 있다. 예를 들어, 0, 1 또는 2일 수 있다. The entropy decoding unit 105 may obtain information on the current intra-block transform coefficients by scanning the syntax element information about the transform coefficients in the current entropy-decoded block according to a predetermined scan order. The predetermined scan order may be a reverse scan order. Here, the reverse scan order may be a scan order from the pixels on the lower right side in the block to the transform coefficient pixels on the upper left side in the block. The order in which the transform coefficients are scanned in the order of the transform coefficients located on the lower left side from the upper left side transform coefficient pixels can be referred to as the forward scan order and the transform coefficients are scanned from the last transform coefficient located on the lower right side to the order of the upper left side transform coefficients May be referred to as the reverse scan order. The syntax element information on the current intra-block conversion coefficient may be flag information indicating whether the intra-block conversion coefficient is larger than a predetermined value. At this time, the predetermined value may be an integer value equal to or greater than zero. For example, 0, 1 or 2.
또한, 현재 블록 내 변환 계수에 관한 신택스 엘리먼트 정보는 잔여 레벨 절대값(remaining level absolute value)을 나타내는 신택스 엘리먼트 정보일 수 있다. 잔여 레벨 절대값은 변환 계수의 레벨의 절대값과 베이스 레벨(base level)의 절대값 간의 차이를 의미할 수 있다. 베이스 레벨의 절대값은 변환 계수의 절대값이 소정의 값보다 큰 지를 나타내는 신택스 엘리먼트 정보에 기초하여 결정될 수 있다. 예를 들어, 변환 계수의 절대값이 0보다 큰지 여부(또는 변환 계수가 유효 변환 계수인지 여부; 여기서, 유효 변환 계수는 변환 계수의 절대값이 0보다 큰 변환 계수를 의미함.)를 나타내는 플래그 정보(Greater than 0 flag 또는 sig_coeff_flag; 이하, GT0 플래그라 함)의 값과 1보다 큰지 여부를 나타내는 플래그 정보(Greater than 1 flag 또는 coeff_abs_level_greater1_flag; 이하, GT1 플래그라 함)의 값과 2보다 큰지 여부를 나타내는 플래그 정보(Greater than 2 flag 또는 coeff_abs_level_greater2_flag; GT2 플래그라 함)의 값의 총 합이 베이스 레벨(base level)의 절대값이 될 수 있다. 여기서, 변환 계수의 절대값이 소정의 값보다 큰지 여부를 나타내는 플래그 정보가 소정의 값보다 큼을 나타내는 경우, 그 플래그 정보의 값은 1일 수 있고, 소정의 값보다 작음을 나타내는 경우, 그 플래그 정보의 값은 0일 수 있다. 한편, 플래그 정보들 중 일부는 비트스트림으로부터 획득되지 않을 수 있다. 일 실시예에 따르면, 변환 계수의 크기가 n(n은 정수)보다 큰지 여부를 나타내는 플래그를 GTn, 변환 계수의 크기가 (n+1)보다 큰지 여부를 나타내는 플래그 GT(n+1), 변환 계수의 크기가 (n+2)보다 큰지 여부를 나타내는 플래그 GT(n+2)라고 할 때, n, n+1 및 n+2의 기준값 중 상대적으로 더 작은값인 n이나 n+1보다 변환 계수의 절대값이 더 큰 지 여부를 나타내는 플래그들, 즉 GTn, GT(n+1)만을 전송하고, GT(n+2)는 비트스트림에 포함시키지 않을 수 있다.The syntax element information regarding the current intra-block transformation coefficient may be syntax element information indicating a remaining level absolute value. The residual level absolute value may mean the difference between the absolute value of the level of the transform coefficient and the absolute value of the base level. The absolute value of the base level may be determined based on the syntax element information indicating that the absolute value of the transform coefficient is larger than a predetermined value. For example, a flag indicating whether the absolute value of the transform coefficient is greater than 0 (or whether the transform coefficient is an effective transform coefficient, where the effective transform coefficient means a transform coefficient whose absolute value of the transform coefficient is larger than 0) Flag (Greater than 1 flag or coeff_abs_level_greater1_flag; hereinafter referred to as GT1 flag) indicating whether or not the value of the flag is greater than 2 and the value of the information (Greater than 0 flag or sig_coeff_flag; hereinafter referred to as GT0 flag) (The Greater than 2 flag or the coeff_abs_level_greater2_flag; referred to as the GT2 flag) may be the absolute value of the base level. Here, when the flag information indicating whether the absolute value of the transform coefficient is larger than the predetermined value is greater than the predetermined value, the value of the flag information may be 1, and if it is smaller than the predetermined value, May be zero. On the other hand, some of the flag information may not be obtained from the bitstream. According to one embodiment, a flag GTn indicating whether the magnitude of the transform coefficient is larger than n (n is an integer), a flag GT (n + 1) indicating whether the magnitude of the transform coefficient is larger than (n + 1) (N + 1), which is a relatively smaller value among the reference values of n, n + 1 and n + 2, when the coefficient GT (n + It is possible to transmit only the flags GTn, GT (n + 1) indicating whether the absolute value of the coefficient is larger and not to include GT (n + 2) in the bitstream.
예를 들어, GT0 플래그 정보 및 GT1 플래그 정보가 각각 변환 계수의 절대값이 0 및 1보다 큼을 나타내는 경우, GT2 플래그가 비트스트림에 포함되지 않는 경우 엔트로피 복호화부(105)는 GT2 플래그를 제외하고, GT0 플래그 정보 및 GT1 플래그 정보만을 이용하여 변환 계수의 절대값이 1보다 크기 때문에 변환 계수의 절대값에서 2를 뺀 나머지 절대값을 변환 계수의 잔여 레벨 절대값으로 결정할 수 있다.For example, when the GT0 flag information and the GT1 flag information each indicate that the absolute value of the transform coefficient is greater than 0 and 1, if the GT2 flag is not included in the bitstream, the entropy decoding unit 105 excludes the GT2 flag, The absolute value of the conversion coefficient obtained by subtracting 2 from the absolute value of the conversion coefficient can be determined as the absolute value of the residual level of the conversion coefficient using only the GT0 flag information and the GT1 flag information.
GT0 플래그 정보, GT1 플래그 정보, GT2 플래그 정보가 각각 0, 1, 2보다 큼을 나타내는 경우, 엔트로피 복호화부(105)는 변환 계수의 절대값이 2보다 크기 때문에 변환 계수의 절대값에서 3을 뺀 나머지 절대값을 변환 계수의 잔여 레벨의 절대값으로 결정할 수 있다. 즉, 잔여 레벨 절대값은 변환 계수의 절대값이 소정의 값보다 큰지를 나타내는 정보에 기초하여 결정된 소정의 절대값과 유효 변환 계수의 절대값 간의 절대값 차이를 나타낼 수 있다. When the GT0 flag information, the GT1 flag information, and the GT2 flag information indicate respectively greater than 0, 1, and 2, the entropy decoding unit 105 determines that the absolute value of the transform coefficient is larger than 2, The absolute value can be determined as the absolute value of the residual level of the transform coefficient. That is, the absolute value of the residual level may indicate an absolute value difference between the absolute value of the effective transform coefficient and a predetermined absolute value determined based on information indicating whether the absolute value of the transform coefficient is larger than a predetermined value.
엔트로피 복호화부(105)는 비트스트림으로부터 수신된 신택스 엘리먼트 정보를 획득하고, 신택스 엘리먼트 정보에 대해 이진 산술 복호화(binary arithmetic decoding)를 수행하고, 이진 산술 복호화를 수행하여 생성된 출력인 빈 스트링(bin string)에 대해 역이진화(inverse binarization)를 수행할 수 있다. 이때, 이진 산술 복호화 동작은 이진 산술 복호화부(110)에서 수행될 수 있고, 역이진화 동작은 역이진화부(115)에서 수행될 수 있다.The entropy decoding unit 105 obtains the syntax element information received from the bitstream, performs binary arithmetic decoding on the syntax element information, performs binary arithmetic decoding, and outputs an empty string bin string can be performed inverse binarization. In this case, the binary arithmetic decoding operation may be performed in the binary arithmetic decoding unit 110, and the inverse binarization operation may be performed in the inverse binarization unit 115. [
이진 산술 복호화부(110)는 비트스트림으로부터 획득된 신택스 엘리먼트 정보에 대해 소정의 컨텍스트 모델(context model)에 기초한 이진 산술 복호화를 수행할 수 있다. 여기서 컨텍스트 모델이란, 빈(bin)의 발생 확률에 관한 정보일 수 있다. 빈의 발생 확률에 관한 정보는 두 심볼 0과 1 중 발생 확률이 상대적으로 낮은 심볼인 LPS(Least Propbable Symbol) 및 반대로 높은 심볼인 MPS(Least Probable Symbol) 중 하나의 심볼을 나타내는 정보(valMPS) 및 하나의 심볼의 발생 확률에 관한 정보를 포함할 수 있다. 발생 확률은 0과 1 사이의 값을 갖는다. 따라서, MPS 및 LPS 중 하나의 심볼의 확률이 결정되면, 다른 심볼의 발생 확률에 관한 정보는 1에서 기결정된 심볼에 대한 발생 확률을 뺀 확률에 관한 정보이기 때문에 하나의 심볼에 대한 발생 확률이 결정되면, 이진 산술 복호화부(110)는 나머지 심볼에 대한 발생 확률을 결정할 수 있다. 이때, 먼저 결정되는 하나의 심볼에 대한 발생 확률은 LPS(Least Probable Symbol)의 발생 확률일 수 있다. 한편, 인덱스 값들에 대응하는 심볼의 발생 확률들이 테이블에 미리 결정될 수 있고, 심볼에 대한 발생 확률 정보는 테이블에 결정된 심볼의 발생 확률들을 나타내는 인덱스를 나타내는 정보(pStateIdx)일 수 있다.The binary arithmetic decoding unit 110 may perform binary arithmetic decoding based on a predetermined context model on the syntax element information obtained from the bitstream. Here, the context model may be information on the probability of occurrence of a bin. The information on the probability of occurrence of the bean includes information (valMPS) indicating one symbol of LPS (Least Propable Symbol), which is a relatively low probability of occurrence of two symbols 0 and 1, and a Least Probable Symbol (MPS) And information on the probability of occurrence of one symbol. The occurrence probability has a value between 0 and 1. Therefore, if the probability of one of the MPS and the LPS is determined, the information on the probability of occurrence of the other symbol is information on the probability of subtracting the occurrence probability for the predetermined symbol from 1, The binary arithmetic decoding unit 110 can determine the probability of occurrence of the remaining symbols. In this case, the probability of occurrence of one symbol to be determined first may be the probability of occurrence of LPS (Least Probable Symbol). On the other hand, the occurrence probabilities of symbols corresponding to the index values can be determined in advance in the table, and the occurrence probability information for the symbols can be information (pStateIdx) indicating an index indicating occurrence probabilities of symbols determined in the table.
소정의 컨텍스트 모델은 빈의 위치를 나타내는 인덱스(bin index), 빈이 포함된 블록의 주변 블록에 포함된 빈의 발생 확률 및 현재 블록 또는 주변 블록의 다양한 요소 등에 기초하여 결정될 수 있다.The predetermined context model may be determined based on an index (bin index) indicating the location of the bean, a probability of occurrence of a bean included in a neighboring block of the block including the bean, and various elements of the current block or neighboring blocks.
또는, 이진 산술 복호화부(110)는 비트스트림으부터 획득된 신택스 엘리먼트 정보에 대해 바이패스(by-pass) 모드에 따라 이진 산술 복호화를 수행할 수 있다. 이때, 현재 이진 산술 복호화되는 빈에 대한 0 또는 1이 나올 확률은 0.5로 고정되고, 이러한 확률에 기초하여 신택스 엘리먼트 정보에 대해 이진 산술 복호화를 수행할 수 있다.Alternatively, the binary arithmetic decoding unit 110 may perform binary arithmetic decoding on the syntax element information obtained from the bitstream according to a by-pass mode. At this time, the probability of 0 or 1 for the current binary arithmetic decoding is fixed to 0.5, and binary arithmetic decoding can be performed on the syntax element information based on this probability.
역이진화부(115)는 이진 산술 복호화를 수행하여 생성된 출력값인 빈 스트링(bin string)에 대해 역이진화를 수행할 수 있다. 역이진화부(115)는 소정의 이진화 방법에 대응되는 역이진화 방법에 기초하여 빈 스트링에 대해 역이진화를 수행할 수 있다. 소정의 이진화 방법은 고정 길이(Fixed Length) 이진화 방법, 라이스(Rice) 이진화 방법, 지수-골룸(Exponential-Golomb) 이진화 방법 및 골룸-라이스(Golomb-Rice) 이진화 방법을 포함할 수 있다. 또는, 소정의 이진화 방법은 제1 이진화 방법 및 제2 이진화 방법이 결합된 이진화 방법일 수 있다. 예를 들어, 역이진화부(115)는 신택스 엘리먼트의 빈 스트링 중 일부인 제1 빈 스트링에 대해서는 제1 이진화 방법에 대응되는 역이진화 방법에 기초하여 역이진화하고, 신택스 엘리먼트의 빈 스트링 중 일부인 제2 빈 스트링에 대해서는 제2 이진화 방법에 대응되는 역이진화 방법에 기초하여 역이진화를 수행할 수 있다. 상기 일부의 빈 스트링은 신택스 엘리먼트의 빈 스트링의 프리픽스(prefix) 또는 서픽스(suffix)일 수 있다.The inverse binarization unit 115 may perform inverse binarization on the bin string, which is an output value generated by performing binary arithmetic decoding. The inverse binarization unit 115 may perform inverse binarization on the bin string based on the inverse binarization method corresponding to the predetermined binarization method. The predetermined binarization method may include a fixed length binarization method, a Rice binarization method, an exponential-Golomb binarization method, and a Golomb-Rice binarization method. Alternatively, the predetermined binarization method may be a binarization method in which the first binarization method and the second binarization method are combined. For example, the inverse binarization unit 115 performs inverse binarization on the first bin string, which is a part of the bin string of the syntax element, based on the inverse binarization method corresponding to the first binarization method, For bin strings, inverse binarization may be performed based on an inverse binarization method corresponding to the second binarization method. The part of the empty string may be a prefix or suffix of the empty string of the syntax element.
이진화 방법이나 역이진화 방법 모두 신택스 엘리먼트의 값과 대응되는 적어도 하나의 빈을 포함하는 빈스트링의 1:1 대응 관계를 규정하는 일종의 코드 워드와 관련된 것이다. 인코딩 측면에서 전술한 다양한 방식의 이진화 방법 중 하나에 따라서, 신택스 엘리먼트의 값에 대응되는 적어도 하나의 빈을 포함하는 빈스트링이 결정되며, 디코딩 측면에서 역이진화 방법에 따라서 빈스트링에 해당되는 신택스 엘리먼트의 값이 결정될 수 있다. 예를 들어, 신택스 엘리먼트의 값 a(a는 실수)에 대응되는 빈 스트링 A가 소정 이진화/역이진화 방법에 따라 결정되는 경우, 신택스 엘리먼트의 값 a를 기준으로 빈 스트링 A를 결정하는 과정을 이진화 과정으로 지칭되며, 빈스트링 A를 기준으로 신택스 엘리먼트의 값 a를 결정하는 과정을 역이진화 과정으로 지칭할 수 있다. 그러나, 전술한 바와 같이, 이진화와 역이진화는 본질적으로 신택스 엘리먼트의 값과 빈스트링의 매핑 관계를 규정하는 것으로 이진화/역이진화는 실질적으로 동일함을 당업자는 용이하게 이해할 수 있다.Both the binarization method and the inverse binarization method relate to a kind of code word that defines a 1: 1 correspondence of the empty string including at least one bin corresponding to the value of the syntax element. In accordance with one of the various types of binarization methods described above in terms of encoding, an empty string containing at least one bin corresponding to the value of the syntax element is determined, and in accordance with an inverse binarization method in terms of decoding, Can be determined. For example, when the bin string A corresponding to the value a (a is a real number) of the syntax element is determined according to a predetermined binarization / inverse binarization method, the process of determining the bin string A based on the value a of the syntax element is binarized , And the process of determining the value a of the syntax element based on the bin string A can be referred to as an inverse binarization process. However, as described above, the binarization and inverse binarization essentially define the mapping relationship between the value of the syntax element and the bin string, and the person skilled in the art can easily understand that binarization / inverse binarization is substantially the same.
엔트로피 복호화부(105)는 현재 블록 내 변환 계수에 관한 신택스 엘리먼트 정보를 소정의 스캔 순서에 따라 스캔하여 엔트로피 복호화함으로써 현재 블록 내 변환 계수들에 관한 정보를 획득할 수 있다. 소정의 스캔 순서는 역방향의 지그재그 스캔(zigzag scan)에 따른 순서 또는 역방향의 대각 스캔(diagonal scan)에 따른 순서일 수 있다. 이에 제한되지 않고, 소정의 스캔 순서는 역방향의 수평 스캔에 따른 순서 및 수직 스캔에 따른 스캔 순서 등 다양한 스캔 순서일 수 있다. 소정의 스캔 순서는 현재 블록 내 가장 우측에 위치하는 유효 변환 계수 픽셀의 수평방향 좌표(예를 들어, 직교 좌표계의 x좌표(x는 정수)) 값 및 현재 블록 내 가장 하측에 위치하는 유효 변환 계수 픽셀의 수직방향 좌표(예를 들어, 직교 좌표계의 y좌표(y는 정수)) 값 중 적어도 하나에 기초하여 결정될 수 있다. 예를 들어, 엔트로피 복호화부(105)는 수평방향 좌표 값의 크기 및 수직방향 좌표 값의 크기에 기초하여 소정의 스캔 순서를 결정할 수 있다. 엔트로피 복호화부(105)는 수평 방향 좌표 값이 수직방향 좌표 값보다 큰 경우 역방향의 수직 스캔 순서를 소정의 스캔 순서로 결정할 수 있다. 엔트로피 복호화부(105)는 수직 방향 좌표 값이 수평방향 좌표 값보다 큰 경우 역방향의 수평 스캔 순서를 소정의 스캔 순서로 결정할 수 있다. The entropy decoding unit 105 can obtain information on the current intra-block transform coefficients by performing the entropy decoding by scanning the syntax element information about the current intra-block transform coefficient according to a predetermined scan order. The predetermined scan order may be a sequence according to a reverse zigzag scan or a sequence according to a diagonal scan in the reverse direction. However, the present invention is not limited to this, and the predetermined scan order may be various scan orders such as a reverse scan order according to a horizontal scan and a scan order according to a vertical scan. The predetermined scanning order is determined by the horizontal coordinate (for example, x coordinate (x is an integer) in the orthogonal coordinate system) of the effective conversion coefficient pixel located at the rightmost position in the current block and the effective conversion coefficient (E.g., the y coordinate of the Cartesian coordinate system (y is an integer)) values of the pixel. For example, the entropy decoding unit 105 may determine a predetermined scan order based on the size of the horizontal direction coordinate value and the size of the vertical direction coordinate value. The entropy decoding unit 105 can determine the vertical scanning order in the reverse direction in a predetermined scanning order when the horizontal direction coordinate value is larger than the vertical direction coordinate value. The entropy decoding unit 105 may determine a horizontal scanning order in the reverse direction as a predetermined scanning order when the vertical direction coordinate value is larger than the horizontal direction coordinate value.
또는, 엔트로피 복호화부(105)는 수평방향 좌표 값이 수직방향 좌표 값보다 큰 경우 역방향의 수직 우선 지그재그 스캔 순서(vertical first zigzag scan order)를 소정의 스캔 순서로 결정할 수 있다. 수직 우선 지그재그 스캔 순서에 대한 구체적인 내용은 도 6b를 참조하여 설명하겠다. 엔트로피 복호화부(105)는 수직방향 좌표 값이 수평방향 좌표 값보다 큰 경우, 역방향의 수평 우선 지그재그 스캔 순서(horizontal first zigzag scan order)를 소정의 스캔 순서로 결정할 수 있다. 수평 우선 지그재그 스캔 순서에 대한 구체적인 내용은 도 6a를 참조하여 설명하겠다. 엔트로피 복호화부(105)는 수직방향 좌표 값이 수평 방향 좌표 값과 동일한 경우, 역방향의 수직 우선 지그재그 스캔 순서 및 수평 우선 지그재그 스캔 순서 중 하나를 소정의 스캔 순서로 결정할 수 있다.Alternatively, the entropy decoding unit 105 may determine a vertical first zigzag scan order in a reverse scan direction in a predetermined scan order when the horizontal direction coordinate value is larger than the vertical direction coordinate value. Details of the vertical priority zigzag scan sequence will be described with reference to FIG. 6B. The entropy decoding unit 105 may determine a horizontal first zigzag scan order in a predetermined scanning order if the vertical direction coordinate value is larger than the horizontal direction coordinate value. The details of the horizontal priority zigzag scan sequence will be described with reference to FIG. 6A. The entropy decoding unit 105 may determine one of the reverse direction vertical priority zigzag scanning order and the horizontal priority zigzag scanning order in a predetermined scanning order when the vertical direction coordinate value is equal to the horizontal direction coordinate value.
또는, 엔트로피 복호화부(105)는 수평방향 좌표 값이 수직방향 좌표 값보다 큰 경우, 역방향의 수평 우선 지그재그 스캔 순서(horizontal first zigzag scan order)를 소정의 스캔 순서로 결정할 수 있다. 한편, 엔트로피 복호화부(105)는 수평 방향 좌표 값이 수직방향 좌표 값보다 크지 않은 경우, 역방향의 수직 우선 지그재그 스캔 순서(vertical first zigzag scan order)를 소정의 스캔 순서로 결정할 수 있다. Alternatively, if the horizontal coordinate value is larger than the vertical coordinate value, the entropy decoding unit 105 may determine a horizontal first zigzag scan order in a predetermined scanning order. On the other hand, if the horizontal direction coordinate value is not larger than the vertical direction coordinate value, the entropy decoding unit 105 may determine a reverse direction vertical first zigzag scan order in a predetermined scan order.
엔트로피 복호화부(105)는 변환 계수에 관한 정보를 스캔하기에 앞서, 현재 블록 내 모든 유효 변환 계수를 포함하는 사각형 스캔 영역을 결정할 수 있다. 이때, 사각형 스캔 영역 내에는 현재 블록 내 모든 유효 변환 계수를 포함하고, 사각형 스캔 영역을 제외한 현재 블록 내 나머지 영역은 유효 변환 계수가 아닌 0인 변환 계수만을 포함할 수 있다.The entropy decoding unit 105 may determine a rectangular scan area including all the effective transform coefficients in the current block before scanning the information on the transform coefficients. In this case, the rectangle scan region includes all the effective transform coefficients in the current block, and the remaining regions in the current block excluding the rectangular scan region may include only the transform coefficients that are 0, not the effective transform coefficients.
엔트로피 복호화부(105)는 비트스트림으로부터 사각형 스캔 영역을 특정하는 좌표에 관한 정보를 획득할 수 있다. 사각형 스캔 영역을 특정하는 좌표에 관한 정보는 현재 블록 내 가장 우측에 위치하는 유효 변환 계수에 대한 수평방향 좌표에 관한 정보 및 현재 블록 내 가장 하측에 위치하는 유효 변환 계수에 대한 수직방향 좌표에 관한 정보를 포함할 수 있다. 다만 이에 제한되지 않고, 사각형 스캔 영역을 특정하는 좌표에 관한 정보는 현재 블록 내 가장 우측에 위치하는 유효 변환 계수에 대한 수평방향의 좌표 값과 현재 블록 내 가장 하측에 위치하는 유효 변환 계수에 대한 수직방향 좌표 값 중 큰 값에 대한 정보만을 포함할 수 있다. 이때 특정되는 사각형 스캔 영역은 정사각형의 스캔 영역으로 비트스트림으로부터 획득된 하나의 방향에 대한 좌표 값을 이용하여 다른 방향의 좌표값을 결정하고, 상기 결정된 수평방향 좌표 값 및 수직방향 좌표 값을 기초로 정사각형의 스캔 영역이 결정될 수 있다. 이때, 상기 결정된 수평방향 좌표 값 및 수직방향 좌표 값은 사각형 스캔 영역의 우하측 모서리에 위치하는 픽셀의 좌표 값을 나타낼 수 있다. 즉, 비트스트림으로부터 하나의 방향에 대한 좌표만이 획득되는 경우, 엔트로피 복호화부(105)는 정사각형의 스캔 영역을 특정한다고 결정하고, 상기 획득된 하나의 방향에 대한 좌표 값을 기초로 정사각형 스캔 영역을 특정하는 좌표 값을 결정할 수 있고, 정사각형 스캔 영역을 특정하는 좌표 값을 기초로 정사각형 스캔 영역을 결정할 수 있다.The entropy decoding unit 105 can obtain information on the coordinates specifying the quadrangular scan area from the bitstream. The information on the coordinates specifying the rectangular scan area includes information on the horizontal direction coordinate of the effective transformation coefficient located at the rightmost position in the current block and information on the vertical direction coordinate of the effective transformation coefficient located at the lowermost position in the current block . ≪ / RTI > However, the present invention is not limited to this, and the information about the coordinates specifying the quadrangular scan area may be obtained by multiplying the coordinate value in the horizontal direction with respect to the effective conversion coefficient located at the rightmost position in the current block, And may include only information about a larger one of the direction coordinate values. At this time, the quadrangular scan area is determined by using coordinate values for one direction obtained from the bit stream as a square scan area, and based on the determined horizontal direction coordinate value and vertical direction coordinate value A square scan area can be determined. At this time, the determined horizontal direction coordinate values and vertical direction coordinate values may represent coordinate values of pixels positioned at the lower right corner of the quadrangular scan region. That is, when only the coordinates for one direction are obtained from the bitstream, the entropy decoding unit 105 determines that a square scan region is specified, and based on the obtained coordinate values for one direction, And a square scan area can be determined based on a coordinate value specifying a square scan area.
엔트로피 복호화부(105)는 사각형 스캔 영역을 특정하는 좌표에 관한 정보에 기초하여 현재 블록 내 모든 유효 변환 계수를 포함하는 사각형 스캔 영역을 결정할 수 있다.The entropy decoding unit 105 can determine a rectangular scan area including all the effective transformation coefficients in the current block based on the information on the coordinates specifying the rectangular scan area.
엔트로피 복호화부(105)는 사각형 스캔 영역을 특정하는 좌표에 관한 정보에 대해 컨텍스트 모델에 기초한 이진 산술 복호화를 수행할 수 있다. 엔트로피 복호화부(105)는 소정의 이진화 방법에 대응하는 역이진화 방법을 기초로 이진 산술 복호화된 정보에 대한 역이진화를 수행하여 사각형 스캔 영역을 특정하는 좌표에 관한 역이진화 정보를 획득할 수 있고, 상기 좌표에 관한 역이진화 정보로부터 사각형 스캔 영역을 특정하는 좌표를 획득할 수 있다. 이때, 컨텍스트 모델은 현재 블록의 크기, 현재 블록의 컬러 성분(color component) 및 빈 인덱스(bin index) 중 적어도 하나에 기초하여 결정될 수 있다. 컬러 성분은 휘도 성분 및 색차 성분을 포함할 수 있다. 빈 인덱스는 신택스 엘리먼트에 관한 빈 스트링 중 현재 이진 산술 복호화되는 빈의 위치를 나타내는 정보일 수 있다. 소정의 이진화 방법에 대응하는 역이진화 방법은 고정 길이(fixed length) 역이진화 방법 및 절삭형 단항(truncated unary) 역이진화 방법 중 적어도 하나일 수 있다. 예를 들어, 엔트로피 복호화부(105)는 이진 산술 복호화된 정보 중 제1 빈 스트링에 대해 고정 길이 역이진화 방법을 이용한 역이진화를 수행하여 제1 역이진화 정보를 획득하고, 이진 산술 복호화된 정보 중 제2 빈 스트링에 대해 절삭형 단항 역이진화 방법을 이용한 역이진화를 수행하여 제2 역이진화 정보를 획득할 수 있다. 엔트로피 복호화부(105)는 제1 역이진화 정보 및 제2 역이진화 정보를 기초로 사각형 스캔 영역을 특정하는 좌표를 획득할 수 있다.The entropy decoding unit 105 can perform binary arithmetic decoding based on the context model on the information on the coordinates specifying the quadrangular scan area. The entropy decoding unit 105 may perform inverse binarization on the binary arithmetic decoded information based on the inverse binarization method corresponding to the predetermined binarization method to obtain inverse binarization information on the coordinates specifying the quadrangular scan area, Coordinates from which the quadrangular scan area is specified can be obtained from the inverse binarization information regarding the coordinates. At this time, the context model may be determined based on at least one of the size of the current block, the color component of the current block, and the bin index. The color component may include a luminance component and a chrominance component. The empty index may be information indicating the position of the bin that is currently binary arithmetic decoded among the bin strings related to the syntax element. The inverse binarization method corresponding to a predetermined binarization method may be at least one of a fixed length inverse binarization method and a truncated unary inverse binarization method. For example, the entropy decoding unit 105 performs inverse binarization using the fixed length inverse binarization method on the first bin string of the binary arithmetic decoded information to obtain the first inverse binarization information, The second inverse binarization information may be obtained by performing inverse binarization using the cutting type unary inverse inverse binarization method for the second bin string. The entropy decoding unit 105 may obtain coordinates specifying the quadrangular scan area based on the first inverse binarization information and the second inverse binarization information.
엔트로피 복호화부(105)는 사각형 스캔 영역에서 스캔된 유효 변환 계수들에 관한 정보에 기초하여 변환 계수들에 관한 컨텍스트 모델에 기초한 이진 산술 복호화 및 역이진화 중 적어도 하나를 수행하여 현재 블록의 변환 계수들을 획득할 수 있다.The entropy decoding unit 105 performs at least one of binary arithmetic decoding and inverse binarization based on the context model for the transform coefficients based on the information about the valid transform coefficients scanned in the rectangular scan region, Can be obtained.
변환 계수들에 관한 정보가 현재 변환 계수의 절대값이 소정의 값보다 큰 지를 나타내는 정보 및 잔여레벨 절대값 정보 및 현재 변환 계수의 부호 정보인 경우, 엔트로피 복호화부(105)는 스캔된 변환 계수들에 관한 정보에 대해 컨텍스트 모델에 기초한 이진 산술 복호화를 수행할 수 있다. 엔트로피 복호화부(105)는 이진 산술 복호화된 변환 계수들에 관한 정보에 대해 역이진화를 수행하여 현재 블록의 변환 계수를 획득할 수 있다. 변환 계수들에 관한 제1 정보가 현재 변환 계수의 절대값이 소정의 값보다 큰 지를 나타내는 정보 및 잔여레벨 절대값 정보 및 현재 변환 계수의 부호 정보이고, 변환 계수들에 관한 제2 정보가 현재 변환 계수와 관련된 이진화 파라메터 정보인 경우, 엔트로피 복호화부(105)는 변환 계수에 관한 제1 정보에 대해 컨텍스트 모델에 기초한 이진 산술 복호화를 수행할 수 있다.If the information on the transform coefficients is information indicating whether the absolute value of the current transform coefficient is larger than a predetermined value, and the residual level absolute value information and the sign information of the current transform coefficient, the entropy decoding unit 105 outputs the transform coefficients It is possible to perform binary arithmetic decoding based on the context model. The entropy decoding unit 105 may perform inverse binarization on the information on the binary-arithmetically decoded transform coefficients to obtain a transform coefficient of the current block. The first information on the transform coefficients is information indicating whether the absolute value of the current transform coefficient is larger than a predetermined value and the residual level absolute value information and the sign information of the current transform coefficient, In the case of the binarization parameter information related to the coefficient, the entropy decoding unit 105 may perform binary arithmetic decoding based on the context model with respect to the first information on the transform coefficient.
엔트로피 복호화부(105)는 이진 산술 복호화된 제1 정보에 대해 제2 정보에 포함된 이진화 파라메터 정보에 기초한 역이진화를 수행하여 현재 블록의 변환 계수를 획득할 수 있다. 이진화 파라메터 정보는 현재 변환 계수에 대한 라이스 파라메터(Rice Parameter) 정보일 수 있다. 라이스 파라메터는 빈스트링에 포함된 프리픽스의 길이를 결정하기 위한 정보일 수 있다 이에 제한되지 않고, 이진화 파라메터 정보는 현재 변환 계수에 대한 다양한 이진화 파라메터 정보일 수 있다.The entropy decoding unit 105 may perform inverse binarization based on the binary parameter information included in the second information with respect to the first information subjected to the binary arithmetic decoding so as to obtain the transform coefficient of the current block. The binarization parameter information may be Rice Parameter information for the current transform coefficient. The Rice parameter may be information for determining the length of the prefix included in the bin string. Without being limited thereto, the binarization parameter information may be various binarization parameter information for the current transform coefficient.
변환 계수들에 관한 제1 정보가 현재 변환 계수의 잔여레벨 절대값 정보 인 경우, 엔트로피 복호화부(105)는 현재 변환 계수의 잔여레벨 절대값 정보에 대해 (절삭형)(truncated) 라이스 이진화 방법에 대응하는 역이진화 방법 및 지수 골룸 이진화 방법에 대응하는 역이진화 방법을 이용하여 현재 변환 계수의 잔여 레벨 절대값에 관한 값을 획득할 수 있다. 예를 들어, 엔트로피 복호화부(105)는 현재 변환 계수의 잔여레벨 절대값 정보의 빈 스트링의 프리픽스(prefix)에 대해 라이스 파라메터에 기초한 라이스 이진화 방법에 대응하는 역이진화 방법을 이용한 역이진화를 수행하여 현재 변환 계수의 잔여레벨 절대값에 관한 제1값을 획득하고, 잔여레벨 절대값 정보의 빈 스트링의 서픽스(suffix)에 대해 지수 골룸 이진화 방법에 대응하는 역이진화 방법을 이용한 역이진화를 수행하여 현재 변환 계수의 잔여레벨 절대값에 관한 제2값을 획득하고 상기 현재 변환 계수의 잔여레벨 절대값에 관한 제1값 및 상기 현재 변환 계수의 잔여레벨 절대값에 관한 제2값을 기초로 현재 블록의 잔여레벨 절대값에 관한 값을 획득할 수 있다.If the first information on the transform coefficients is the residual level absolute value information of the current transform coefficient, the entropy decoding unit 105 performs a (truncated) Rice binarization method on the residual level absolute value information of the current transform coefficient A value relating to the absolute value of the residual level of the current transform coefficient can be obtained by using the inverse binarization method corresponding to the corresponding inverse binarization method and the exponential Gollum binarization method. For example, the entropy decoding unit 105 performs inverse binarization on the prefix of the bin string of the residual level absolute value information of the current transform coefficient using an inverse binarization method corresponding to the Rice binarization method based on the Rice parameter The first value relating to the absolute value of the residual level of the current transform coefficient is obtained and the inverse binarization using the inverse binarization method corresponding to the exponential smoothed binarization method is performed on the suffix of the bin string of the residual level absolute value information Obtains a second value relating to an absolute value of a residual level of a current transform coefficient, and based on a first value relating to an absolute value of a residual level of the current transform coefficient and a second value relating to an absolute value of a residual level of the current transform coefficient, A value relating to the absolute value of the residual level of the residual level.
상기 변환 계수들에 관한 컨텍스트 모델 중 제1 변환 계수에 관한 컨텍스트 모델은 소정의 스캔 순서에 따라 이전에 스캔된 적어도 하나의 제2 변환 계수에 관한 정보, 현재 블록 내 제1 변환 계수의 위치 및 컬러 성분, 우측 또는 하측의 주변 변환 계수에 관한 정보 및 제1 변환 계수의 스캔 위치 중 적어도 하나에 기초하여 결정될 수 있다.The context model for the first transform coefficient among the context models related to the transform coefficients includes information on at least one second transform coefficient previously scanned in accordance with a predetermined scan order, position and color of the first transform coefficient in the current block, Information about the right or lower peripheral transformation coefficient, and the scan position of the first transformation coefficient.
예를 들어, 제1 변환 계수가 0보다 큰지를 나타내는 플래그 정보에 관한 컨텍스트 모델은 소정의 위치의 우측 또는 하측의 변환 계수들 중 절대값이 0보다 큰 우측 또는 하측의 변환 계수의 개수에 기초하여 결정될 수 있다.For example, the context model relating to the flag information indicating whether the first conversion coefficient is greater than 0 is based on the number of the right or lower conversion coefficients whose absolute value among the right or lower conversion coefficients of the predetermined position is larger than 0 Can be determined.
이에 제한되지 않고, 제1 변환 계수가 0보다 큰지를 나타내는 플래그 정보에 관한 컨텍스트 모델은 소정의 스캔 순서에 따라 이전에 스캔된 n(n은 양의 정수)개의 변환 계수들 중 절대값이 0보다 큰 유효 변환 계수의 개수에 기초하여 결정될 수 있다.The context model for flag information indicating whether the first transform coefficient is greater than 0 is not limited to this, and the absolute value of n (n is a positive integer) transform coefficients previously scanned according to a predetermined scan order is greater than 0 Can be determined based on the number of large effective conversion coefficients.
또는, 제1 변환 계수가 0보다 큰지를 나타내는 플래그 정보에 관한 컨텍스트 모델은 해당 계수 그룹 내 제1 변환 계수의 위치 및 대응하는 주변 우측 또는 하측의 유효 계수 그룹 플래그들에 기초하여 결정될 수 있다.Alternatively, the context model relating to the flag information indicating whether the first transform coefficient is greater than 0 may be determined based on the position of the first transform coefficient in the coefficient group and the corresponding peripheral right or lower effective coefficient group flags.
또는, 제1 변환 계수가 0보다 큰지를 나타내는 플래그 정보(GT0 플래그 정보)는 소정의 스캔 순서에 따라 이전에 스캔된 n(n은 양의 정수) 개의 변환 계수들의 GT0 플래그 정보 및 현재 블록 내 제1 변환 계수의 위치, 색상 성분 및 인접하는 우측 또는 하측의 n(n은 양의 정수) 개의 변환 계수들의 GT0 플래그 정보, 스캔 순서상 제1 변환 계수가 스캔 영역 내 최초 위치의 변환 계수인지 여부, 스캔 순서상 제1 변환 계수가 스캔 영역 내 최종 위치의 변환 계수인지 여부 중 적어도 하나에 기초하여 결정될 수 있다.Alternatively, the flag information (GT0 flag information) indicating whether the first transform coefficient is greater than 0 may be obtained by adding GT0 flag information of n (n is a positive integer) transform coefficients previously scanned according to a predetermined scan order, The GT0 flag information of the position, color component, and neighboring right or lower n (n is a positive integer) conversion coefficients of the first conversion coefficient, whether the first conversion coefficient on the scan order is the conversion coefficient of the first position in the scan area, And whether or not the first transformation coefficient in the scan order is a transformation coefficient of the final position in the scan area.
제1 변환 계수의 절대값이 1보다 큰지를 나타내는 플래그 정보에 관한 컨텍스트 모델은 소정의 위치의 우측 또는 하측의 변환 계수 중 절대값이 1보다 큰 우측 또는 하측의 유효 변환 계수의 개수에 기초하여 결정될 수 있다. The context model relating to the flag information indicating whether the absolute value of the first conversion coefficient is larger than 1 is determined based on the number of the right or lower effective conversion coefficients whose absolute value of the right or lower conversion coefficient of the predetermined position is larger than 1 .
이에 제한되지 않고, 제1 변환 계수의 절대값이 1보다 큰지를 나타내는 플래그 정보에 관한 컨텍스트 모델은 소정의 스캔 순서에 따라 이전에 스캔된 n(n은 양의 정수) 개의 변환 계수들 중 절대값이 1보다 큰 유효 변환 계수의 개수에 기초하여 결정될 수 있다. The context model relating to the flag information indicating whether the absolute value of the first transform coefficient is larger than 1 is not limited to the absolute value of n (n is a positive integer) transform coefficients previously scanned according to a predetermined scan order Can be determined based on the number of effective transform coefficients greater than one.
또는, 제1 변환 계수의 절대값이 1보다 큰지를 나타내는 플래그 정보에 관한 컨텍스트 모델은 해당 계수 그룹 내 이전에 복호화된 GT1 플래그 정보 및 이전에 복호화된 그룹 내 GT1 플래그 정보에 기초하여 결정될 수 있다.Alternatively, the context model relating to flag information indicating whether the absolute value of the first transform coefficient is greater than 1 may be determined based on GT1 flag information previously decoded in the corresponding coefficient group and GT1 flag information previously decoded in the group.
또는, 제1 변환 계수의 절대값이 1보다 큰지를 나타내는 플래그 정보(GT1 플래그 정보)는 소정의 스캔 순서에 따라 이전에 스캔된 n(n은 양의 정수) 개의 변환 계수들의 GT1 플래그 정보 및 현재 블록 내 제1 변환 계수의 위치, 색상 성분 및 인접하는 우측 또는 하측의 n(n은 양의 정수) 개의 변환 계수들의 GT1 플래그 정보, 제1 변환 계수가 스캔 영역 내 최초 위치의 변환 계수인지 여부, 제1 변환 계수가 스캔 영역 내 최종 위치의 변환 계수인지 여부 중 적어도 하나에 기초하여 결정될 수 있다.Alternatively, the flag information (GT1 flag information) indicating whether the absolute value of the first transform coefficient is larger than 1 is obtained by adding GT1 flag information of n (n is a positive integer) transform coefficients previously scanned according to a predetermined scan order, The GT1 flag information of the position, color component, and neighboring right or lower n (n is a positive integer) conversion coefficients of the first transform coefficient in the block, whether the first transform coefficient is the transform coefficient of the first position in the scan area, And whether or not the first transform coefficient is a transform coefficient of the final position in the scan area.
제1 변환 계수의 절대값이 2보다 큰지를 나타내는 플래그 정보에 관한 컨텍스트 모델은 절대값이 2보다 큰 우측 또는 하측의 유효 변환 계수의 개수에 기초하여 결정될 수 있다. The context model relating to the flag information indicating whether the absolute value of the first transform coefficient is larger than 2 can be determined based on the number of the right or lower effective transform coefficients whose absolute value is larger than 2.
이에 제한되지 않고, 제1 변환 계수가 2보다 큰지를 나타내는 플래그 정보에 관한 컨텍스트 모델은 소정의 스캔 순서에 따라 이전에 스캔된 n(n은 양의 정수) 개의 변환 계수들 중 절대값이 2보다 큰 유효 변환 계수의 개수에 기초하여 결정될 수 있다. The context model for flag information indicating whether the first transform coefficient is greater than 2 is not limited to this, and the absolute value of n (n is a positive integer) transform coefficients previously scanned according to a predetermined scan order is greater than 2 Can be determined based on the number of large effective conversion coefficients.
또는, 제1 변환 계수의 절대값이 2보다 큰지를 나타내는 플래그 정보에 관한 컨텍스트 모델은 해당 계수 그룹 내 이전에 복호화된 GT2 플래그 정보 및 이전에 복호화된 그룹 내 GT2 플래그 정보에 기초하여 결정될 수 있다.Alternatively, the context model on the flag information indicating whether the absolute value of the first transform coefficient is larger than 2 may be determined based on the previously decoded GT2 flag information and the previously decoded in-group GT2 flag information in the corresponding coefficient group.
또는, 제1 변환 계수의 절대값이 2보다 큰지를 나타내는 플래그 정보(이하 GT2 플래그 정보라 함)는 소정의 스캔 순서에 따라 이전에 스캔된 n(n은 양의 정수) 개의 변환 계수들의 GT2 플래그 정보 및 현재 블록 내 제1 변환 계수의 위치, 색상 성분 및 인접하는 우측 또는 하측의 n(n은 양의 정수) 개의 변환 계수들의 GT2 플래그 정보, 제1 변환 계수가 스캔 영역 내 최초 위치의 변환 계수인지 여부, 제1 변환 계수가 스캔 영역 내 최종 위치의 변환 계수인지 여부 중 적어도 하나에 기초하여 결정될 수 있다.Alternatively, the flag information (hereinafter referred to as GT2 flag information) indicating whether the absolute value of the first transform coefficient is greater than 2 may be used as the GT2 flag of the previously scanned n (n is a positive integer) Information and the position of the first transform coefficient in the current block, the color component, and GT2 flag information of the adjacent right or lower n (n is a positive integer) transform coefficients, the transform coefficient of the first position in the scan area And whether or not the first transform coefficient is a transform coefficient of the final position in the scan area.
또는, 제1 변환 계수가 m(m은 2보다 큰 정수)보다 큰지를 나타내는 플래그 정보(이하 GTm 플래그 정보라 함)는 소정의 스캔 순서에 따라 이전에 스캔된 n(n은 양의 정수) 개의 변환 계수들의 GTm 플래그 정보 및 현재 블록 내 제1 변환 계수의 위치, 색상 성분 및 인접하는 우측 또는 하측의 n(n은 양의 정수) 개의 변환 계수들의 GTm 플래그 정보, 제1 변환 계수가 스캔 영역 내 최초 위치의 변환 계수인지 여부, 제1 변환 계수가 스캔 영역 내 최종 위치의 변환 계수인지 여부 중 적어도 하나에 기초하여 결정될 수 있다.Alternatively, flag information (hereinafter referred to as GTm flag information) indicating whether the first transform coefficient is larger than m (m is an integer larger than 2) is n (n is a positive integer) scanned previously according to a predetermined scan order The GTm flag information of the transform coefficients, the position of the first transform coefficient in the current block, the chrominance component, and the GTm flag information of the adjacent right or lower n (n is a positive integer) transform coefficients, Whether it is a transform coefficient of the initial position, and whether or not the first transform coefficient is a transform coefficient of the final position in the scan area.
한편, 제1 변환 계수의 잔여 레벨 값에 관한 이진화 파라메터 정보는 제1 변환 계수의 우측 또는 하측의 주변 유효 변환 계수의 레벨 절대값에 기초하여 결정될 수 있다.On the other hand, the binarization parameter information on the residual level value of the first transform coefficient may be determined based on the absolute level of the level of the peripheral effective transform coefficient on the right side or the lower side of the first transform coefficient.
예를 들어, 제1 변환 계수에 관한 이진화 파라메터 정보는 제1 변환 계수의 우측 또는 하측의 소정의 주변 유효 변환 계수의 레벨 절대값의 합에 기초하여 결정될 수 있다.For example, the binarization parameter information on the first transform coefficient may be determined based on the sum of the absolute levels of the values of the predetermined peripheral effective transform coefficients on the right side or the lower side of the first transform coefficient.
또는, 제1 변환 계수의 잔여 레벨 값에 관한 이진화 파라메터 정보는 이전에 부호화된 레벨 값에 기초하여 결정될 수 있다.Alternatively, the binarization parameter information regarding the residual level value of the first transform coefficient may be determined based on the previously encoded level value.
또는, 제1 변환 계수에 관한 이진화 파라메터 정보는 소정의 스캔 순서에 따라 이전에 스캔된 n(n은 정수)개의 변환 계수의 레벨, 현재 블록 내 제1 변환 계수의 위치, 색상 성분 및 인접하는 우측 또는 하측의 n(n은 양의 정수) 개의 변환 계수들의 레벨, 스캔 순서상 제1 변환 계수가 스캔 영역 내 최초 위치의 변환 계수인지 여부, 스캔 순서상 제1 변환 계수가 스캔 영역 내 최종 위치의 변환 계수인지 여부, 스캔 순서상 제1 변환 계수가 계수 그룹(Coefficient Group) 내 최초 위치의 계수인지 여부, 제1변환 계수의 위치가 스캔 영역에서의 상대 위치 등 중 적어도 하나에 기초하여 결정될 수 있다.Alternatively, the binarization parameter information on the first transform coefficient may include information on the level of n (n is an integer) transform coefficients previously scanned according to a predetermined scan order, the position of the first transform coefficient in the current block, (N is a positive integer) number of conversion coefficients on the lower side, whether the first conversion coefficient on the scan order is a conversion coefficient of the first position in the scan area, whether the first conversion coefficient on the scan order is Whether or not the first transform coefficient is a transform coefficient, whether the first transform coefficient in the scan order is a coefficient of an initial position in a coefficient group, the position of the first transform coefficient is a relative position in the scan region, and the like .
엔트로피 복호화부(105)는 스캔 영역 내 현재 스캔되는 변환 계수의 위치가 [SRx,0](SRx는 정수, SRx는 스캔 영역의 좌상단 모서리 좌표를 기준으로 스캔 영역의 우측 경계 픽셀의 수평방향 좌표 값을 의미함)이고, 소정의 스캔 순서에 따라 이전에 스캔된 [SRx,Y](Y는 0보다 크고 SRy보다 작거나 같은 정수, SRy는 스캔 영역의 좌상단 모서리 좌표를 기준으로 스캔 영역의 하측 경계 픽셀의 수직방향 좌표 값을 의미함) 위치의 변환 계수들이 모두 0인 계수라면, 비트스트림으로부터 현재 스캔되는 변환 계수의 GT0 플래그 정보를 획득하지 않고, GT0 플래그 정보의 값을 1로 결정할 수 있다. The entropy decoding unit 105 determines whether or not the position of the transform coefficient currently scanned in the scan region is [SRx, 0] (where SRx is an integer and SRx is the horizontal coordinate value of the right boundary pixel of the scan region on the basis of the left upper- (Y is an integer greater than 0 and less than or equal to SRy, and SRy represents a lower boundary of the scan region with respect to the upper left corner coordinate of the scan region in accordance with a predetermined scan order) The GT0 flag information of the transform coefficient currently scanned from the bit stream is not acquired and the value of the GT0 flag information can be determined to be 1. [
마찬가지로, 엔트로피 복호화부(105)는 스캔 영역 내 현재 스캔되는 변환 계수의 위치가 [0,SRy](SRy는 정수, SRy는 스캔 영역의 좌상단 모서리 좌표를 기준으로 스캔 영역의 하측 경계의 수직방향 좌표 값을 의미함)이고, 소정의 스캔 순서에 따라 이전에 스캔된 [X,SRy](X는 0보다 크고 SRx보다 작거나 같은 정수, SRx는 스캔 영역의 좌상단 모서리 좌표를 기준으로 스캔 영역의 우측 경계 픽셀의 수직방향 좌표 값을 의미함) 위치의 변환 계수들이 모두 0인 계수라면, 비트스트림으로부터 현재 스캔되는 변환 계수의 GT0 플래그 정보를 획득하지 않고, GT0 플래그 정보의 값을 1로 결정할 수 있다. Likewise, the entropy decoding unit 105 determines that the position of the transform coefficient currently scanned in the scan region is [0, SRy] (where SRy is an integer and SRy is the vertical coordinate of the lower boundary of the scan region on the basis of the upper left corner coordinate of the scan region) (X, SRy) (where X is an integer greater than 0 and less than or equal to SRx, SRx is an integer equal to or greater than 0, The GT0 flag information of the currently scanned transform coefficient is not obtained from the bit stream and the value of the GT0 flag information can be determined to be 1 .
한편, 엔트로피 복호화부(105)는 현재 블록 내 유효 변환 계수의 GT1 플래그 정보의 최대 개수를 결정하고, 상기 결정된 유효 변환 계수의 최대 계수 내에서 현재 블록 내 GT1 플래그 정보를 비트스트림으로부터 수신할 수 있다. 즉, 엔트로피 복호화부(105)는 비트스트림으로부터 수신된 유효 변환 계수의 GT1 플래그 정보를 최대 개수만큼 수신하면, 이후에 엔트로피 복호화부(105)는 비트스트림에 유효 변환 계수의 GT1 플래그 정보가 있는지를 더 이상 확인하지 않을 수 있다.On the other hand, the entropy decoding unit 105 can determine the maximum number of GT1 flag information of the current effective conversion coefficient in the block, and receive the GT1 flag information in the current block from the bit stream within the maximum coefficient of the determined effective conversion coefficient . That is, when the entropy decoding unit 105 receives the maximum number of GT1 flag information of the effective conversion coefficient received from the bitstream, the entropy decoding unit 105 determines whether the GT1 flag information of the effective conversion coefficient exists in the bitstream I can not check it anymore.
엔트로피 복호화부(105)는 모든 0이 아닌 유효 변환 계수를 현재 블록 내 GT1 플래그 정보의 최대 개수로 결정할 수 있다. 또는, 엔트로피 복호화부(105)는 스캔 영역의 크기에 기초하여 현재 블록 내 GT1 플래그 정보의 최대 개수를 결정할 수 있다. 예를 들어, 엔트로피 복호화부(105)는 GT1 플래그 정보의 최대 개수 MaxCount_GT1를 하기와 같은 수학식 1에 기초하여 결정할 수 있다.The entropy decoding unit 105 can determine all non-zero effective conversion coefficients as the maximum number of GT1 flag information in the current block. Alternatively, the entropy decoding unit 105 can determine the maximum number of GT1 flag information in the current block based on the size of the scan area. For example, the entropy decoding unit 105 can determine the maximum number MaxCount_GT1 of the GT1 flag information based on the following expression (1).
수학식 1
Figure PCTKR2018003820-appb-M000001
Equation 1
Figure PCTKR2018003820-appb-M000001
이때, sizeSR은 사각형 스캔 영역의 크기(넓이)를 의미할 수 있고, sizeSR은 (Sr_x+1)*(Sr_y+1)일 수 있다. Sr_x는 스캔 영역의 좌측 상단 모서리 좌표를 기준으로 가장 우측의 유효 변환 계수 픽셀의 수평방향 좌표를 의미할 수 있다. 다시 말해, Sr_x는 스캔 영역의 좌측 상단 모서리 좌표를 기준으로 우측 경계 픽셀의 수평 방향 좌표를 의미할 수 있다. Sr_y는 스캔 영역의 좌측 상단 모서리 좌표를 기준으로 가장 하측의 유효 변환 계수 픽셀의 수직방향 좌표를 의미할 수 있다. 다시 말해, Sr_y는 스캔 영역의 좌측 상단 모서리 좌표를 기준으로 하측 경계 픽셀의 수직 방향 좌표를 의미할 수 있다. In this case, sizeSR may mean the size (width) of the square scan area, and sizeSR may be (Sr_x + 1) * (Sr_y + 1). Sr_x can be the horizontal coordinate of the rightmost effective transformation coefficient pixel based on the upper left corner coordinate of the scan area. In other words, Sr_x can mean the horizontal coordinate of the right boundary pixel based on the upper left corner coordinate of the scan area. Sr_y may mean the vertical coordinate of the lowest effective conversion factor pixel based on the upper left corner coordinate of the scan area. In other words, Sr_y may mean the vertical coordinate of the lower boundary pixel based on the upper left corner coordinate of the scan area.
K1은 스캔 영역의 크기와 GT1 플래그 간 조절 계수일 수 있다. 예를 들어, 1보다 큰 정수일 수 있다. Th1은 미리 정해진 임계값일 수 있다. 예를 들어, Th1은 16,8 일 수 있다. 다만 이에 제한되지 않고, K1 및 Th1은 다양한 값을 가질 수 있음을 당업자는 용이하게 이해할 수 있다.K1 can be the magnitude of the scan area and the adjustment factor between the GT1 flags. For example, it may be an integer greater than one. Th1 may be a predetermined threshold value. For example, Th1 may be 16,8. Those skilled in the art can easily understand that K1 and Th1 can have various values, without being limited thereto.
엔트로피 복호화부(105)는 현재 블록 내 GT2 플래그 정보의 최대 개수를 결정하고, 상기 결정된 유효 변환 계수의 최대 계수 내에서 현재 블록 내 GT2 플래그 정보를 비트스트림으로부터 수신할 수 있다. 즉, 엔트로피 복호화부(105)는 비트스트림으로부터 수신된 유효 변환 계수의 GT2 플래그 정보를 최대 개수만큼 수신하면, 이후에 엔트로피 복호화부(105)는 비트스트림에 유효 변환 계수의 GT2 플래그 정보가 있는지를 더 이상 확인하지 않을 수 있다.The entropy decoding unit 105 may determine the maximum number of GT2 flag information in the current block and receive GT2 flag information in the current block from the bit stream within the maximum coefficient of the determined effective transform coefficient. That is, when the entropy decoding unit 105 receives the maximum number of GT2 flag information of the effective conversion coefficient received from the bitstream, the entropy decoding unit 105 determines whether the GT2 flag information of the effective conversion coefficient exists in the bitstream I can not check it anymore.
엔트로피 복호화부(105)는 모든 0이 아닌 유효 변환 계수를 현재 블록 내 GT2 플래그 정보의 최대 개수로 결정할 수 있다. 또는, 엔트로피 복호화부(105)는 스캔 영역의 크기에 기초하여 현재 블록 내 GT2 플래그 정보의 최대 개수를 결정할 수 있다. 예를 들어, 엔트로피 복호화부(105)는 GT2 플래그 정보의 최대 개수 MaxCount_GT2를 하기와 같은 수학식 2에 기초하여 결정할 수 있다.The entropy decoding unit 105 can determine all non-zero effective conversion coefficients as the maximum number of GT2 flag information in the current block. Alternatively, the entropy decoding unit 105 can determine the maximum number of GT2 flag information in the current block based on the size of the scan area. For example, the entropy decoding unit 105 can determine the maximum number MaxCount_GT2 of the GT2 flag information based on the following expression (2).
수학식 2
Figure PCTKR2018003820-appb-M000002
Equation 2
Figure PCTKR2018003820-appb-M000002
이때, sizeSR은 사각형 스캔 영역의 크기(넓이)를 의미할 수 있고, sizeSR은 (Sr_x+1)*(Sr_y+1)일 수 있다. Sr_x는 스캔 영역의 좌측 상단 모서리 좌표를 기준으로 가장 우측의 유효 변환 계수 픽셀의 수평방향 좌표를 의미할 수 있다. 다시 말해, Sr_x는 스캔 영역의 좌측 상단 모서리 좌표를 기준으로 우측 경계 픽셀의 수평 방향 좌표를 의미할 수 있다. Sr_y는 스캔 영역의 좌측 상단 모서리 좌표를 기준으로 가장 하측의 유효 변환 계수 픽셀의 수직방향 좌표를 의미할 수 있다. 다시 말해, Sr_y는 스캔 영역의 좌측 상단 모서리 좌표를 기준으로 하측 경계 픽셀의 수직 방향 좌표를 의미할 수 있다. K2는 스캔 영역의 크기와 GT2 플래그 간 조절 계수일 수 있다. 예를 들어, 1보다 큰 정수일 수 있다. K2는 미리 정해진 임계값일 수 있다. 예를 들어, Th2는 16,8 일 수 있다. 다만 이에 제한되지 않고, K2 및 Th2는 다양한 값을 가질 수 있음을 당업자는 용이하게 이해할 수 있다.In this case, sizeSR may mean the size (width) of the square scan area, and sizeSR may be (Sr_x + 1) * (Sr_y + 1). Sr_x can be the horizontal coordinate of the rightmost effective transformation coefficient pixel based on the upper left corner coordinate of the scan area. In other words, Sr_x can mean the horizontal coordinate of the right boundary pixel based on the upper left corner coordinate of the scan area. Sr_y may mean the vertical coordinate of the lowest effective conversion factor pixel based on the upper left corner coordinate of the scan area. In other words, Sr_y may mean the vertical coordinate of the lower boundary pixel based on the upper left corner coordinate of the scan area. K2 can be the magnitude of the scan area and the adjustment factor between GT2 flags. For example, it may be an integer greater than one. K2 may be a predetermined threshold value. For example, Th2 may be 16,8. Those skilled in the art can easily understand that K2 and Th2 can have various values, without being limited thereto.
엔트로피 복호화부(105)는 비트스트림으로부터 현재 블록 내 계수 그룹에 관한 정보를 획득할 수 있다. 여기서, 계수 그룹에 관한 정보는 계수 그룹에 적어도 하나의 유효 변환 계수를 포함하고 있는지 여부(또는, 계수 그룹에 0인 변환 계수만을 포함하고 있는지 여부)를 나타내는 플래그 정보일 수 있다. 상기 플래그 정보는 유효 계수 그룹 플래그(significant coefficient group flag) 정보라고 칭할 수 있다. 엔트로피 복호화부(105)는 비트스트림으로부터 획득된 현재 계수 그룹에 관한 정보를 기초로 현재 계수 그룹 내 변환 계수에 관한 정보를 스캔할 수 있다. 예를 들어, 계수 그룹에 관한 정보가 계수 그룹에 적어도 하나의 유효 변환 계수를 포함하고 있지 않음을 나타내면, 엔트로피 복호화부(105)는 변환 계수에 대한 정보의 스캔없이 계수 그룹 내 변환 계수의 값을 0으로 유도할 수 있다. 계수 그룹에 관한 정보가 계수 그룹에 적어도 하나의 유효 변환 계수를 포함하고 있음을 나타내면 엔트로피 복호화부(105)는 변환 계수에 대한 정보를 소정의 스캔 순서에 따라 스캔하여 계수 그룹 내 변환 계수를 획득할 수 있다.The entropy decoding unit 105 can obtain information on the current intra-block coefficient group from the bitstream. Here, the information on the coefficient group may be flag information indicating whether or not the coefficient group includes at least one effective transform coefficient (or whether or not the coefficient group includes only a transform coefficient of zero). The flag information may be referred to as significant coefficient group flag information. The entropy decoding unit 105 can scan information on the current coefficient group intra-coefficient transform coefficients based on the information on the current coefficient group obtained from the bit stream. For example, if the information on the coefficient group indicates that the coefficient group does not contain at least one effective transform coefficient, the entropy decoding unit 105 sets the value of the transform coefficient in the coefficient group without scanning the information about the transform coefficient 0 < / RTI > If the information on the coefficient group indicates that the coefficient group includes at least one effective transform coefficient, the entropy decoding unit 105 scans information on the transform coefficient according to a predetermined scan order to acquire a transform coefficient in the coefficient group .
이때, 엔트로피 복호화부(105)는 스캔 영역에 포함된 변환 계수들을 소정의 스캔 순서에 따라 스캔된 소정의 K개(K는 정수)의 변환 계수마다 하나의 계수 그룹을 결정할 수 있다. 즉, 하나의 계수 그룹은 K개의 변환 계수를 포함할 수 있다. 이때, 스캔 순서는 소정의 역방향 스캔 순서의 반대 방향인 정방향 스캔 순서일 수 있다.At this time, the entropy decoding unit 105 can determine one coefficient group for every predetermined K number of transform coefficients included in the scan region (K is an integer) scanned according to a predetermined scan order. That is, one coefficient group may include K transform coefficients. In this case, the scan order may be a forward scan order that is the opposite direction of the predetermined reverse scan order.
따라서, 엔트로피 복호화부(105)는 현재 블록 내 좌상측 모서리에 인접하는 계수인 DC 계수로부터 정방향의 스캔 순서에 따라 스캔하여 계수 그룹을 결정할 수 있다. 이때, 현재 블록에 포함된 변환 계수의 개수가 K의 정수배가 아닌 경우, 정방향의 스캔 순서에 따라 스캔되는 계수의 그룹들 중 최종 계수 그룹은 K보다 작은 개수의 변환 계수를 포함할 수 있다. Accordingly, the entropy decoding unit 105 can determine a coefficient group by scanning in a forward scan order from a DC coefficient that is a coefficient adjacent to the upper left corner in the current block. If the number of transform coefficients included in the current block is not an integral multiple of K, the last coefficient group among the groups of coefficients scanned according to the forward scan order may include a smaller number of transform coefficients.
다만 이에 제한되지 않고, 엔트로피 복호화부(105)는 현재 블록에 포함된 변환 계수들 중 우측 하단에 위치하는 계수부터 현재 블록에 포함된 변환 계수들 중 좌측 상단에 위치하는 계수까지 스캔하는 역방향 스캔 순서에 따라 스캔하여 계수 그룹을 결정할 수 있음을 당업자는 용이하게 이해할 수 있다.However, the present invention is not limited to this, and the entropy decoding unit 105 may perform a reverse scan order in which the coefficients located at the lower right end among the transform coefficients included in the current block are scanned up to a coefficient located at the upper left of the transform coefficients included in the current block It will be readily appreciated by those skilled in the art that scanning may be performed in accordance with the present invention to determine a coefficient group.
다만 이에 제한되지 않고, 엔트로피 복호화부(105)는 비트스트림으로부터 현재 블록 내 계수 그룹에 관한 정보를 획득하지 않고, 소정의 스캔 순서에 따라 계수 그룹을 결정할 수 있음을 당업자는 용이하게 이해할 수 있다. 계수 그룹을 결정하는 이유는 엔트로피 복호화부(105)가 계수 그룹에 따라 처리하는 동작(부호 데이터 숨김(Sign Data Hiding) 등의 동작)을 수행하기 위함이다. 엔트로피 복호화부(105)는 소정의 스캔 순서에 따라 스캔되는 계수의 그룹들 중 하나의 계수 그룹이 1개의 변환 계수만을 포함하는 경우, 비트스트림으로부터 해당 계수 그룹에 관한 정보를 획득하지 않고, GT0 플래그 정보를 비트스트림으로부터 획득할 수 있다. Those skilled in the art can easily understand that the entropy decoding unit 105 can determine a coefficient group according to a predetermined scanning order without acquiring information on the current intra-block coefficient group from the bitstream. The reason for determining the coefficient group is to perform an operation (such as sign data hiding) for the entropy decoding unit 105 to process according to the coefficient group. If one of the groups of coefficients scanned according to a predetermined scan order includes only one transform coefficient, the entropy decoding unit 105 does not acquire information on the corresponding coefficient group from the bitstream, Information can be obtained from the bitstream.
엔트로피 복호화부(105)는 현재 블록에 포함된 각 계수 그룹에 대해 적어도 하나의 변환 계수의 부호(sign)를 숨긴다고 결정할 수 있다. 예를 들어, 엔트로피 복호화부는 현재 블록에 포함된 각 계수 그룹에 대해 하나 또는 두개의 변환 계수의 부호를 숨긴다고 결정할 수 있다.The entropy decoding unit 105 can determine that the sign of at least one transform coefficient is hidden for each coefficient group included in the current block. For example, the entropy decoding unit may decide to hide the sign of one or two transform coefficients for each coefficient group included in the current block.
엔트로피 복호화부(105)는 사각형 스캔 영역 내 변환 계수에 관한 정보를 소정의 스캔 순서에 따라 스캔할 수 있다. 소정의 스캔 순서는 역방향의 지그재그 스캔 순서, 역방향의 대각 스캔 순서, 역방향의 수직 스캔 순서, 수평 스캔 순서를 포함할 수 있다. 다만, 소정의 스캔 순서는 상기 언급한 역방향 스캔 순서에 제한되지 않고, 다양한 역방향 스캔 순서를 포함할 수 있음을 당업자는 용이하게 이해할 수 있을 것이다.The entropy decoding unit 105 may scan the information on the transform coefficients in the quadrangular scan area according to a predetermined scan order. The predetermined scan order may include a reverse zigzag scan order, a reverse diagonal scan order, a reverse vertical scan order, and a horizontal scan order. However, those skilled in the art will readily understand that the predetermined scan order is not limited to the above-mentioned reverse scan order and may include various reverse scan orders.
엔트로피 복호화부(105)는 스캔된 변환 계수들에 관한 정보에 기초하여 현재 블록의 변환 계수를 획득할 수 있다. The entropy decoding unit 105 can obtain the transform coefficients of the current block based on the information about the scanned transform coefficients.
영상 복원부(120)는 현재 블록의 변환 계수들에 대해 역양자화 및 역변환을 수행하여 현재 블록의 레지듀얼 블록을 생성할 수 있다. The image restoring unit 120 may generate a residual block of the current block by performing inverse quantization and inverse transformation on the transform coefficients of the current block.
영상 복원부(120)는 현재 블록의 레지듀얼 블록에 기초하여 현재 블록을 복원할 수 있다.The image restoring unit 120 may restore the current block based on the residual block of the current block.
영상 복원부(120)는 현재 블록에 대하여 인터 예측 또는 인트라 예측을 수행하여 현재 블록의 예측 블록을 생성할 수 있다. 영상 복원부(120)는 현재 블록의 예측 블록 및 현재 블록의 레지듀얼 블록에 기초하여 현재 블록을 복원할 수 있다. 즉, 영상 복원부(120)는 예측 블록에 포함된 픽셀들의 값과 레지듀얼 블록에 포함된 픽셀들의 값을 합하여 현재 블록에 포함된 픽셀들의 값을 복원할 수 있다. The image restoring unit 120 may perform inter-prediction or intra-prediction on the current block to generate a prediction block of the current block. The image restoring unit 120 may restore the current block based on the prediction block of the current block and the residual block of the current block. That is, the image restoring unit 120 may restore the values of the pixels included in the current block by adding the values of the pixels included in the prediction block and the values of the pixels included in the residual block.
비디오 복호화 장치(100)는 영상 복호화부(미도시)를 포함할 수 있고, 영상 복호화부(미도시)는 엔트로피 복호화부(105) 및 영상 복원부(120)를 포함할 수 있다. 영상 복호화부에 대해서는 도 1e를 참조하여 설명하도록 한다.The video decoding apparatus 100 may include an image decoding unit (not shown), and the image decoding unit (not shown) may include an entropy decoding unit 105 and an image restoring unit 120. The video decoding unit will be described with reference to FIG.
도 1b는 다양한 실시예에 따른 비디오 복호화 방법의 흐름도를 도시한다.1B shows a flow diagram of a video decoding method according to various embodiments.
S105 단계에서, 비디오 복호화 장치(100)는 현재 블록 내 모든 유효 변환 계수를 포함하는 사각형 스캔 영역을 결정할 수 있다. 이때, 사각형 스캔 영역을 특정하는 좌표는 현재 블록 내 유효 변환 계수들 중 가장 오른쪽에 위치하는 유효 변환 계수 픽셀의 수평방향 좌표 및 현재 블록 내 유효 변환 계수들 중 가장 아래쪽에 위치하는 유효 변환 계수 픽셀의 수직방향 좌표를 나타낼 수 있다. 비디오 복호화 장치(100)는 비트스트림으로부터 사각형 스캔 영역을 특정하는 좌표에 관한 정보를 획득하고, 상기 획득된 사각형 스캔 영역을 특정하는 좌표를 기초로 사각형 스캔 영역을 결정할 수 있다.In step S105, the video decoding apparatus 100 may determine a rectangular scan area including all the effective transform coefficients in the current block. At this time, the coordinates specifying the quadrangular scan area include the horizontal coordinate of the effective conversion coefficient pixel located at the rightmost of the effective conversion coefficients in the current block and the coordinates of the effective conversion coefficient pixel located at the lowermost one of the effective conversion coefficients in the current block Vertical direction coordinates. The video decoding apparatus 100 may obtain information on the coordinates specifying the quadrangular scan region from the bit stream and determine the quadrangular scan region based on the coordinates specifying the obtained quadrangular scan region.
S110 단계에서, 비디오 복호화 장치(100)는 사각형 스캔 영역 내 변환 계수에 관한 정보를 소정의 스캔 순서에 따라 스캔할 수 있다. 소정의 스캔 순서는 역방향의 지그재그 스캔 순서 또는 역방향의 대각 스캔 순서를 포함할 수 있다. 지그재그 스캔 순서는 수직 우선 지그재그 스캔 순서 또는 수평 우선 지그재그 스캔 순서를 포함할 수 있다.In step S110, the video decoding apparatus 100 may scan the information on the transform coefficients in the quadrangular scan area according to a predetermined scan order. The predetermined scan order may include a reverse zigzag scan order or a reverse diagonal scan order. The zigzag scan order may include a vertical priority zigzag scan order or a horizontal priority zigzag scan order.
S115 단계에서, 비디오 복호화 장치(100)는 스캔된 변환 계수들에 관한 정보에 기초하여 현재 블록의 변환 계수들을 획득할 수 있다.In step S115, the video decoding apparatus 100 may acquire the transform coefficients of the current block based on the information about the scanned transform coefficients.
S120 단계에서, 비디오 복호화 장치(100)는 현재 블록의 변환 계수들에 대해 역양자화 및 역변환을 수행하여 현재 블록의 레지듀얼 블록을 생성할 수 있다.In step S120, the video decoding apparatus 100 may perform inverse quantization and inverse transform on the transform coefficients of the current block to generate a residual block of the current block.
S125 단계에서, 비디오 복호화 장치(100)는 레지듀얼 블록에 기초하여 현재 블록을 복원할 수 있다. 비디오 복호화 장치(100)는 인터 예측 또는 인트라 예측을 수행하여 현재 블록의 예측 블록을 생성하고, 비디오 복호화 장치(100)는 현재 블록의 예측 블록에 포함된 픽셀 값과 레지듀얼 블록의 픽셀 값을 합하여 현재 블록의 복원 블록의 픽셀 값을 생성할 수 있다.In step S125, the video decoding apparatus 100 can restore the current block based on the residual block. The video decoding apparatus 100 performs inter prediction or intra prediction to generate a prediction block of a current block. The video decoding apparatus 100 adds the pixel values of the residual blocks to the pixel values included in the prediction blocks of the current block The pixel value of the reconstruction block of the current block can be generated.
도 1c는 다양한 실시예에 따른 비디오 부호화 장치의 블록도를 도시한다.1C shows a block diagram of a video encoding apparatus according to various embodiments.
다양한 실시예에 따른 비디오 부호화 장치(150)는 엔트로피 부호화부(155) 및 비트스트림 생성부(170)를 포함한다.The video encoding apparatus 150 according to various embodiments includes an entropy encoding unit 155 and a bitstream generation unit 170.
엔트로피 부호화부(155)는 현재 블록 내 변환 계수에 관한 신택스 엘리먼트에 대해 엔트로피 부호화할 수 있다. 엔트로피 부호화부(155)는 현재 블록 내 변환 계수들에 관한 2차원 배열 정보를 소정의 스캔 순서에 따라 스캔하여 현재 블록 내 변환 계수들에 관한 1차원 배열 정보를 생성하고, 현재 블록 내 변환 계수들에 관한 1차원 배열 정보에 대해 엔트로피 부호화할 수 있다. The entropy encoding unit 155 can perform entropy encoding on the syntax element related to the intra-block transformation coefficient. The entropy encoding unit 155 scans the two-dimensional array information about the current intra-block transform coefficients according to a predetermined scan order to generate one-dimensional array information about the current intra-block transform coefficients, Can be entropy-encoded with respect to the one-dimensional array information about the one-dimensional array information.
변환 계수에 관한 신택스 엘리먼트는 변환 계수가 소정의 값보다 큰 지를 나타내는 플래그일 수 있다. 이때, 소정의 값은 0보다 크거나 같은 값일 수 있다. 예를 들어, 0, 1 또는 2일 수 있다. 또한, 변환 계수에 관한 잔여 레벨(remaining level) 절대값을 나타내는 신택스 엘리먼트일 수 있다. 즉, 잔여 레벨(remaining level) 절대값은 변환 계수 절대값과 소정의 값보다 큰 지에 기초하여 결정된 소정의 절대값 간의 절대값 차이를 나타낼 수 있다. 또한, 유효 변환 계수에 관한 신택스 엘리먼트는 유효 변환 계수의 부호에 관한 신택스 엘리먼트일 수 있다. The syntax element related to the conversion coefficient may be a flag indicating whether the conversion coefficient is larger than a predetermined value. At this time, the predetermined value may be a value equal to or greater than zero. For example, 0, 1 or 2. It may also be a syntax element indicating the absolute level of the remaining level with respect to the transform coefficients. That is, the absolute value of the remaining level may indicate an absolute value difference between a predetermined absolute value determined based on whether the absolute value of the conversion coefficient is larger than a predetermined value. The syntax element related to the effective conversion coefficient may be a syntax element related to the sign of the effective conversion coefficient.
먼저, 엔트로피 부호화부(155)는 신택스 엘리먼트에 대해 이진화를 수행하여 빈 스트링(bin)을 생성하고, 빈 스트링에 대해 이진 산술 부호화를 수행하여 신택스 엘리먼트에 대해 엔트로피 부호화된 정보를 생성할 수 있다. 이때, 이진화는 이진화부(160)에서 수행될 수 있고, 이진 산술 부호화는 이진 산술 부호화부(165)에서 수행될 수 있다.First, the entropy encoding unit 155 may perform binarization on the syntax element to generate an empty string, and perform binary arithmetic encoding on the empty string to generate entropy-encoded information for the syntax element. At this time, the binarization may be performed in the binarization unit 160, and the binary arithmetic encoding may be performed in the binary arithmetic encoding unit 165.
이진화부(160)는 소정의 신택스 엘리먼트에 대해 이진화를 수행하여 빈 스트링을 생성할 수 있다. 이진화부(160)는 소정의 이진화 방법에 기초하여 소정의 신택스 엘리먼트에 대해 이진화를 수행할 수 있다. 소정의 이진화 방법은 고정 길이(Fixed Length) 이진화 방법, 라이스(Rice) 이진화 방법, 지수-골룸(Exponential Golomb) 이진화 방법 및 골룸-라이스(Golomb-Rice) 이진화 방법을 포함할 수 있다. 또는 소정의 이진화 방법은 제1 이진화 방법 및 제2 이진화 방법이 결합된 이진화 방법일 수 있다. 예를 들어, 이진화부(160)는 신택스 엘리먼트의 일부에 대해서는 제1 이진화 방법에 기초하여 이진화하여 제1 빈 스트링(bin string)을 생성할 수 있고, 신택스 엘리먼트 중 다른 일부에 대해서는 제2 이진화 방법에 기초하여 이진화를 수행하여 제2 빈 스트링(bin string)을 생성할 수 있다. 이 때, 제1 빈 스트링은 신택스 엘리먼트의 빈 스트링의 일부이고, 제2 빈 스트링은 신택스 엘리먼트의 빈 스트링의 다른 일부일 수 있다. 빈 스트링의 일부는 프리픽스(prefix) 또는 서픽스(suffix)일 수 있다.The binarization unit 160 may perform binarization on a predetermined syntax element to generate an empty string. The binarization unit 160 may perform binarization on a predetermined syntax element based on a predetermined binarization method. The predetermined binarization method may include a fixed length binarization method, a Rice binarization method, an exponential Golomb binarization method, and a Golomb-Rice binarization method. Or the predetermined binarization method may be a binarization method in which the first binarization method and the second binarization method are combined. For example, the binarization unit 160 may binarize a portion of a syntax element based on a first binarization method to generate a first bin string, and for another portion of the syntax element, a second binarization method To generate a second bin string. ≪ RTI ID = 0.0 > Here, the first empty string may be part of the empty string of the syntax element, and the second empty string may be another part of the empty string of the syntax element. A portion of the empty string may be a prefix or a suffix.
이진 산술 부호화부(165)는 소정의 신택스 엘리먼트에 관한 빈 스트링에 대해 소정의 컨텍스트 모델에 기초한 이진 산술 부호화를 수행할 수 있다. 또는, 이진 산술 부호화부(165)는 소정의 신택스 엘리먼트에 관한 빈 스트링에 대해 소정의 컨텍스트 모델 없이 이진 산술 부호화를 수행할 수 있다. 이때, 현재 이진 산술 부호화되는 빈(bin)에 대한 0 또는 1이 나올 확률은 0,5로 고정되고, 이러한 확률에 기초하여 이진 산술 부호화를 수행할 수 있다.The binary arithmetic coding unit 165 may perform binary arithmetic coding based on a predetermined context model for an empty string regarding a predetermined syntax element. Alternatively, the binary arithmetic coding unit 165 may perform binary arithmetic coding on a bin string relating to a predetermined syntax element without a predetermined context model. At this time, the probability of 0 or 1 for the current binary arithmetic coding bin is fixed to 0, and binary arithmetic coding can be performed based on this probability.
엔트로피 부호화부(155)는 현재 블록의 변환 계수를 획득할 수 있다. 즉, 비디오 부호화 장치(150)는 인터 예측 또는 인트라 예측을 수행하여 현재 블록의 예측 블록을 생성할 수 있고, 현재 블록의 원본 블록 및 현재 블록의 예측 블록에 기초하여 현재 블록의 레지듀얼 블록을 생성할 수 있다. 비디오 부호화 장치(150)는 현재 블록의 레지듀얼 블록에 대해 변환 및 양자화를 수행하여 현재 블록의 변환 계수를 생성할 수 있다. 엔트로피 부호화부(155)는 상기 생성된 현재 블록의 변환 계수를 획득할 수 있다.The entropy encoding unit 155 can obtain the transform coefficients of the current block. That is, the video encoding apparatus 150 can generate a prediction block of the current block by performing inter prediction or intra prediction, and generates a residual block of the current block based on the original block of the current block and the prediction block of the current block can do. The video encoding apparatus 150 may convert and quantize the residual block of the current block to generate a transform coefficient of the current block. The entropy encoding unit 155 may obtain the transform coefficients of the generated current block.
엔트로피 부호화부(155)는 현재 블록의 변환 계수에 관한 정보를 결정하고, 현재 블록의 변환 계수에 관한 정보를 소정의 스캔 순서에 따라 스캔하여 현재 블록의 변환 계수에 관한 1차원 배열 정보를 생성하고, 1차원 배열 정보에 대해 엔트로피 부호화를 수행할 수 있다. 소정의 스캔 순서는 역 지그재그 스캔에 따른 순서 또는 역 대각 스캔에 따른 순서일 수 있다 이에 제한되지 않고, 역 수평 스캔에 따른 순서 및 역 수직 스캔에 따른 스캔 순서 등 다양한 스캔 순서일 수 있다. 소정의 스캔 순서는 현재 블록 내 가장 우측에 위치하는 유효 변환 계수 픽셀의 수평방향 좌표 및 현재 블록 내 가장 하측에 위치하는 유효 변환 계수 픽셀의 수직방향 중 적어도 하나에 기초하여 결정될 수 있다. 엔트로피 부호화부(155)는 수평방향 좌표 값의 크기 및 수직방향 좌표 값의 크기에 기초하여 소정의 스캔 순서를 결정할 수 있다. 예를 들어, 엔트로피 부호화부(155)는 수평 방향 좌표 값이 수직방향 좌표 값보다 큰 경우, 역방향의 수직 스캔 순서를 소정의 스캔 순서로 결정할 수 있다. 엔트로피 부호화부(155)는 수직 방향 좌표 값이 수평방향 좌표 값보다 큰 경우 역방향의 수평 스캔 순서를 소정의 스캔 순서로 결정할 수 있다. The entropy encoding unit 155 determines information on the transform coefficients of the current block, generates information about the transform coefficients of the current block in accordance with a predetermined scan order, generates one-dimensional array information on the transform coefficients of the current block , And entropy encoding can be performed on the one-dimensional array information. The predetermined scan order may be a sequence according to the reverse zigzag scan or an order according to the reverse diagonal scan. However, the order may be various scan orders such as a reverse horizontal scan order and a scan order according to reverse vertical scan. The predetermined scan order may be determined based on at least one of the horizontal coordinate of the effective conversion coefficient pixel located at the rightmost position in the current block and the vertical direction of the effective conversion coefficient pixel located at the bottommost position in the current block. The entropy encoding unit 155 can determine a predetermined scan order based on the size of the horizontal direction coordinate value and the size of the vertical direction coordinate value. For example, if the horizontal direction coordinate value is larger than the vertical direction coordinate value, the entropy encoding unit 155 can determine the reverse vertical scanning order in a predetermined scanning order. The entropy encoding unit 155 may determine the horizontal scan order in the reverse direction as a predetermined scan order when the vertical direction coordinate value is larger than the horizontal direction coordinate value.
또는, 엔트로피 부호화부(155)는 수평방향 좌표 값이 수직방향 좌표 값보다 큰 경우 역방향의 수직 우선 지그재그 스캔 순서를 소정의 스캔 순서로 결정할 수 있다. 엔트로피 부호화부(155)는 수직방향 좌표 값이 수평방향 좌표 값보다 큰 경우, 역방향의 수평 우선 지그재그 스캔 순서를 소정의 스캔 순서로 결정할 수 있다. 엔트로피 부호화부(155)는 수직방향 좌표 값이 수평 방향 좌표 값과 동일한 경우, 역방향의 수직 우선 지그재그 스캔 순서 및 수평 우선 지그재그 스캔 순서 중 하나를 소정의 스캔 순서로 결정할 수 있다.Alternatively, the entropy encoding unit 155 may determine the reverse direction vertical priority zigzag scan order in a predetermined scan order when the horizontal direction coordinate value is larger than the vertical direction coordinate value. The entropy encoding unit 155 can determine the horizontal priority zigzag scan order in the reverse direction in a predetermined scan order when the vertical direction coordinate value is larger than the horizontal direction coordinate value. The entropy encoding unit 155 may determine one of the vertical first zigzag scan order and the horizontal priority zigzag scan order in the reverse direction in a predetermined scan order when the vertical direction coordinate value is equal to the horizontal direction coordinate value.
또는, 엔트로피 부호화부(155)는 수평방향 좌표 값이 수직방향 좌표 값보다 큰 경우, 역방향의 수평 우선 지그재그 스캔 순서를 소정의 스캔 순서로 결정할 수 있다. 엔트로피 부호화부(155)는 수평 방향 좌표 값이 수직방향 좌표 값보다 크지 않은 경우, 역방향의 수평 우선 지그재그 스캔 순서(horizontal first zigzag scan order)를 소정의 스캔 순서로 결정할 수 있다.Alternatively, if the horizontal direction coordinate value is larger than the vertical direction coordinate value, the entropy encoding unit 155 can determine the reverse horizontal zigzag scanning order in a predetermined scanning order. The entropy encoding unit 155 may determine a horizontal first zigzag scan order in the reverse direction in a predetermined scan order when the horizontal direction coordinate value is not larger than the vertical direction coordinate value.
먼저, 엔트로피 부호화부(155)는 현재 블록 내 모든 유효 변환 계수를 포함하는 사각형 스캔 영역을 결정할 수 있다. 이때, 사각형 스캔 영역 내에는 현재 블록 내 모든 유효 변환 계수를 포함하고, 사각형 스캔 영역을 제외한 현재 블록 내 나머지 영역은 유효 변환 계수가 아닌 0의 값을 갖는 변환 계수만을 포함할 수 있다. 엔트로피 부호화부(155)는 사각형 스캔 영역을 특정하는 좌표를 결정하고, 사각형 스캔 영역을 특정하는 좌표에 관한 정보를 엔트로피 부호화할 수 있다. 즉, 엔트로피 부호화부(155)는 사각형 스캔 영역을 특정하는 좌표에 관한 신택스 엘리먼트에 대해 소정의 이진화 방법에 기초한 이진화를 수행하여 빈 스트링(bin string)을 생성할 수 있다. 여기서, 소정의 이진화 방법은 고정 길이 이진화 방법 및 절삭형 단항 이진화 방법 중 적어도 하나일 수 있다.First, the entropy encoding unit 155 can determine a rectangular scan area including all the effective transform coefficients in the current block. In this case, the square scan region includes all the effective transformation coefficients in the current block, and the remaining regions in the current block excluding the rectangular scan region may include only transformation coefficients having a value of 0, which is not an effective transformation coefficient. The entropy encoding unit 155 may determine the coordinates specifying the quadrangular scan area and may entropy encode information on the coordinates specifying the quadrangular scan area. That is, the entropy encoding unit 155 may generate a bin string by performing a binarization based on a predetermined binarization method on a syntax element related to a coordinate specifying a quadrangular scan area. Here, the predetermined binarization method may be at least one of a fixed length binarization method and a cutting type unary binarization method.
엔트로피 부호화부(155)는 사각형 스캔 영역을 특정하는 좌표에 관한 신택스 엘리먼트에 관한 빈 스트링에 대해 컨텍스트 모델에 기초한 이진 산술 부호화를 수행할 수 있다. 이때, 컨텍스트 모델은 현재 블록의 크기, 현재 블록의 컬러 성분 및 빈 인덱스 중 적어도 하나에 기초하여 결정될 수 있다. 컬러 성분은 휘도 성분 및 색차 성분을 포함할 수 있다. 빈 인덱스는 신택스 엘리먼트에 관한 빈 스트링 중 현재 이진 산술 부호화되는 빈의 위치를 나타내는 정보일 수 있다.The entropy encoding unit 155 can perform binary arithmetic coding based on the context model on the bin string regarding the syntax element related to the coordinates specifying the quadrangular scan area. At this time, the context model may be determined based on at least one of the size of the current block, the color component of the current block, and the empty index. The color component may include a luminance component and a chrominance component. The empty index may be information indicating the position of the bin that is currently binary arithmetic-coded among the bin strings related to the syntax element.
엔트로피 부호화부(155)는 스캔된 변환 계수들에 관한 정보에 기초하여 이진화 및 변환 계수들에 관한 컨텍스트 모델에 기초한 이진 산술 부호화 중 적어도 하나를 수행하여 엔트로피 부호화된 정보를 생성할 수 있다.The entropy encoding unit 155 may generate at least one of binarization based on information on the scanned transform coefficients and binary arithmetic encoding based on the context model of the transform coefficients to generate entropy-encoded information.
변환 계수들에 관한 제1 정보가 현재 변환 계수의 절대값이 소정의 값보다 큰 지를 나타내는 정보, 잔여레벨 절대값 정보 및 현재 변환 계수의 부호 정보이고, 변환 계수들에 관한 제2 정보가 이진화 파라메터 정보인 경우, 엔트로피 부호화부(155)는 변환 계수들에 관한 제1 정보에 대해 제2 정보에 기초한 이진화를 수행하여 제1 정보에 관한 빈 스트링(bin string)을 생성할 수 있다. 엔트로피 부호화부(155)는 제1 정보에 관한 빈 스트링(bin string)에 대해 이진 산술 부호화를 수행하여 엔트로피 부호화된 정보를 생성할 수 있다.The first information on the transform coefficients is information indicating whether the absolute value of the current transform coefficient is larger than a predetermined value, the residual level absolute value information and the sign information of the current transform coefficient, and the second information on the transform coefficients is the binarization parameter Information, the entropy encoding unit 155 may perform binarization on the first information on the transform coefficients based on the second information to generate a bin string for the first information. The entropy encoding unit 155 may perform binary arithmetic encoding on a bin string related to the first information to generate entropy-encoded information.
제 2 정보는 소정의 스캔 순서에 따라 이전에 스캔된 적어도 하나의 제2 변환 계수에 관한 정보, 현재 블록 내 제1 변환 계수의 위치, 컬러 성분, 우측 또는 하측의 주변 변환 계수에 관한 정보 및 제1 변환 계수의 스캔 위치 중 적어도 하나에 기초하여 결정될 수 있다. 예를 들어, 제1 변환 계수에 관한 이진화 파라메터 정보는 제1 변환 계수의 우측 또는 하측의 주변 유효 변환 계수의 레벨 절대값에 기초하여 결정될 수 있다. 제1 변환 계수에 관한 이진화 파라메터 정보는 제1 변환 계수의 우측 또는 하측의 주변 유효 변환 계수의 레벨 절대값의 합에 기초하여 결정될 수 있다.The second information includes information on at least one second transform coefficient previously scanned in accordance with a predetermined scan order, information on the position, color component, right or lower peripheral transformation coefficient of the first transform coefficient in the current block, 1 < / RTI > conversion coefficient. For example, the binarization parameter information on the first transform coefficient may be determined based on the absolute level of the level of the peripheral effective transform coefficient on the right side or the lower side of the first transform coefficient. The binarization parameter information on the first transform coefficient may be determined based on the sum of the absolute levels of the levels of the peripheral effective transform coefficients on the right side or the lower side of the first transform coefficient.
또는, 제1 변환 계수에 관한 이진화 파라메터 정보는 소정의 스캔 순서에 따라 이전에 스캔된 n(n은 정수)개의 변환 계수의 레벨, 현재 블록 내 제1 변환 계수의 위치, 색상 성분 및 인접하는 우측 또는 하측의 n(n은 양의 정수) 개의 변환 계수들의 레벨, 스캔 순서상 제1 변환 계수가 스캔 영역 내 최초 위치의 변환 계수인지 여부, 스캔 순서상 제1 변환 계수가 스캔 영역 내 최종 위치의 변환 계수인지 여부, 스캔 순서상 제1 변환 계수가 계수 그룹(Coefficient Group) 내 첫번째 위치의 계수인지 여부 중 적어도 하나에 기초하여 결정될 수 있다.Alternatively, the binarization parameter information on the first transform coefficient may include information on the level of n (n is an integer) transform coefficients previously scanned according to a predetermined scan order, the position of the first transform coefficient in the current block, (N is a positive integer) number of conversion coefficients on the lower side, whether the first conversion coefficient on the scan order is a conversion coefficient of the first position in the scan area, whether the first conversion coefficient on the scan order is Whether the transform coefficient is a transform coefficient, whether or not the first transform coefficient on the scan order is a coefficient of the first position in the coefficient group, and the like.
변환 계수들에 관한 정보가 현재 변환 계수의 절대값이 소정의 값보다 큰 지를 나타내는 정보, 잔여레벨 절대값 정보 및 현재 변환 계수의 부호 정보인 경우, 엔트로피 부호화부(155)는 변환 계수들에 관한 정보에 대해 이진화를 수행하여 빈 스트링(bin string)을 생성할 수 있다. 엔트로피 부호화부(155)는 빈 스트링(bin string)에 대해 변환 계수들에 관한 컨텍스트 모델에 기초한 이진 산술 부호화를 수행하여 이진 산술 부호화된 정보를 생성할 수 있다. 상기 변환 계수들에 관한 컨텍스트 모델 중 제1 변환 계수에 관한 컨텍스트 모델은 소정의 스캔 순서에 따라 이전에 스캔된 적어도 하나의 제2 변환 계수에 관한 정보, 현재 블록 내 제1 변환 계수의 위치, 컬러 성분, 우측 또는 하측의 주변 변환 계수에 관한 정보 및 제1 변환 계수의 스캔 위치 중 적어도 하나에 기초하여 결정될 수 있다.If the information on the transform coefficients is information indicating whether the absolute value of the current transform coefficient is larger than a predetermined value, the residual level absolute value information, and the sign information of the current transform coefficient, the entropy coding unit 155 calculates You can perform binarization on the information to create an empty string. The entropy encoding unit 155 may perform binary arithmetic coding based on the context model on the bin strings to generate binary arithmetic coded information. The context model of the first transform coefficient among the context models related to the transform coefficients includes information on at least one second transform coefficient previously scanned in accordance with a predetermined scan order, position of the first transform coefficient in the current block, Information about the right or lower peripheral transformation coefficient, and the scan position of the first transformation coefficient.
제1 변환 계수가 0보다 큰지를 나타내는 플래그 정보에 관한 컨텍스트 모델은 절대값이 0보다 큰 우측 또는 하측의 유효 변환 계수의 개수에 기초하여 결정될 수 있다. The context model relating to the flag information indicating whether the first conversion coefficient is larger than 0 can be determined based on the number of the right or lower effective conversion coefficients whose absolute values are larger than zero.
이에 제한되지 않고, 제1 변환 계수가 0보다 큰지를 나타내는 플래그 정보에 관한 컨텍스트 모델은 소정의 스캔 순서에 따라 이전에 스캔된 n(n은 양의 정수) 개의 변환 계수들 중 절대값이 0보다 큰 유효 변환 계수의 개수에 기초하여 결정될 수 있다. The context model for flag information indicating whether the first transform coefficient is greater than 0 is not limited to this, and the absolute value of n (n is a positive integer) transform coefficients previously scanned according to a predetermined scan order is greater than 0 Can be determined based on the number of large effective conversion coefficients.
제1 변환 계수가 1보다 큰지를 나타내는 플래그 정보에 관한 컨텍스트 모델은 절대값이 1보다 큰 우측 또는 하측의 유효 변환 계수의 개수에 기초하여 결정될 수 있다. The context model relating to the flag information indicating whether the first conversion coefficient is larger than 1 can be determined based on the number of the right or lower effective conversion coefficients whose absolute values are larger than 1.
이에 제한되지 않고, 제1 변환 계수가 1보다 큰지를 나타내는 플래그 정보에 관한 컨텍스트 모델은 소정의 스캔 순서에 따라 이전에 스캔된 n(n은 양의 정수) 개의 변환 계수들 중 절대값이 1보다 큰 유효 변환 계수의 개수에 기초하여 결정될 수 있다. The context model of the flag information indicating whether the first transform coefficient is greater than 1 is not limited to this, and the absolute value of n (n is a positive integer) transform coefficients previously scanned according to a predetermined scan order is larger than 1 Can be determined based on the number of large effective conversion coefficients.
제1 변환 계수가 2보다 큰지를 나타내는 플래그 정보에 관한 컨텍스트 모델은 절대값이 2보다 큰 우측 또는 하측의 유효 변환 계수의 개수에 기초하여 결정될 수 있다. The context model relating to the flag information indicating whether the first conversion coefficient is larger than 2 can be determined based on the number of the right or lower effective conversion coefficients whose absolute values are larger than 2.
이에 제한되지 않고, 제1 변환 계수가 2보다 큰지를 나타내는 플래그 정보에 관한 컨텍스트 모델은 소정의 스캔 순서에 따라 이전에 스캔된 n(n은 양의 정수) 개의 변환 계수들 중 절대값이 2보다 큰 유효 변환 계수의 개수에 기초하여 결정될 수 있다. The context model for flag information indicating whether the first transform coefficient is greater than 2 is not limited to this, and the absolute value of n (n is a positive integer) transform coefficients previously scanned according to a predetermined scan order is greater than 2 Can be determined based on the number of large effective conversion coefficients.
엔트로피 부호화부(155)는 스캔 영역 내 현재 스캔되는 변환 계수의 위치가 [SRx,0](SRx는 정수, SRx는 스캔 영역의 좌상단 모서리 좌표를 기준으로 스캔 영역의 우측 경계 픽셀의 수평방향 좌표 값을 의미함)이고, 소정의 스캔 순서에 따라 이전에 스캔된 [SRx,Y](Y는 0보다 크고 SRy보다 작거나 같은 정수, SRy는 스캔 영역의 좌상단 모서리 좌표를 기준으로 스캔 영역의 하측 경계 픽셀의 수직방향 좌표 값을 의미함) 위치의 변환 계수들이 모두 0인 계수라면, 현재 스캔되는 변환 계수의 GT0 플래그 정보를 생성하지 않을 수 있다.The entropy encoding unit 155 encodes the position of the transform coefficient currently scanned in the scan region by [SRx, 0] (where SRx is an integer and SRx is the horizontal coordinate value of the right boundary pixel of the scan region on the basis of the left upper- (Y is an integer greater than 0 and less than or equal to SRy, and SRy represents a lower boundary of the scan region with respect to the upper left corner coordinate of the scan region in accordance with a predetermined scan order) (I.e., the vertical direction coordinate value of the pixel), the GT0 flag information of the currently scanned conversion coefficient may not be generated.
마찬가지로, 엔트로피 부호화부(155)는 스캔 영역 내 현재 스캔되는 변환 계수의 위치가 [0,SRy](SRy는 정수, SRy는 스캔 영역의 좌상단 모서리 좌표를 기준으로 스캔 영역의 하측 경계의 수직방향 좌표 값을 의미함)이고, 소정의 스캔 순서에 따라 이전에 스캔된 [X,SRy](X는 0보다 크고 SRx보다 작거나 같은 정수, SRx는 스캔 영역의 좌상단 모서리 좌표를 기준으로 스캔 영역의 우측 경계 픽셀의 수직방향 좌표 값을 의미함) 위치의 변환 계수들이 모두 0인 계수라면, 현재 스캔되는 변환 계수의 GT0 플래그 정보를 생성하지 않을 수 있다.Likewise, the entropy encoding unit 155 determines whether or not the position of the transform coefficient currently scanned in the scan region is [0, SRy] (where SRy is an integer and SRy is the vertical coordinate of the lower boundary of the scan region on the basis of the upper left corner coordinate of the scan region (X, SRy) (where X is an integer greater than 0 and less than or equal to SRx, SRx is an integer equal to or greater than 0, (I.e., the vertical direction coordinate value of the boundary pixel). If the transform coefficients of the positions are all zeros, the GT0 flag information of the currently scanned transform coefficients may not be generated.
한편, 엔트로피 부호화부(155)는 현재 블록 내 유효 변환 계수의 GT1 플래그 정보의 최대 개수를 결정하고, 상기 결정된 유효 변환 계수의 최대 계수 내에서 현재 블록 내 GT1 플래그 정보를 생성할 수 있다. 즉, 엔트로피 부호화부(155)는 유효 변환 계수의 GT1 플래그 정보를 최대 개수만큼 생성하면, 이후에 엔트로피 부호화부(155)는 유효 변환 계수의 GT1 플래그 정보를 더 이상 생성하지 않을 수 있다.On the other hand, the entropy encoding unit 155 can determine the maximum number of GT1 flag information of the current intra-block effective transform coefficient and generate the GT1 flag information in the current block within the maximum coefficient of the determined effective transform coefficient. That is, if the entropy encoding unit 155 generates the maximum number of GT1 flag information of the effective conversion coefficient, the entropy encoding unit 155 may not generate the GT1 flag information of the effective conversion coefficient thereafter.
엔트로피 부호화부(155)는 모든 0이 아닌 유효 변환 계수를 현재 블록 내 GT1 플래그 정보의 최대 개수로 결정할 수 있다. 또는 엔트로피 부호화부(155)는 스캔 영역의 크기에 기초하여 현재 블록 내 GT1 플래그 정보의 최대 개수를 결정할 수 있다. 예를 들어, 엔트로피 부호화부(155)는 GT1 플래그 정보의 최대 개수 MaxCount_GT1를 하기와 같은 수학식 3에 기초하여 결정할 수 있다.The entropy encoding unit 155 can determine all non-zero effective conversion coefficients as the maximum number of GT1 flag information in the current block. Or the entropy encoding unit 155 can determine the maximum number of GT1 flag information in the current block based on the size of the scan area. For example, the entropy encoding unit 155 can determine the maximum number of GT1 flag information MaxCount_GT1 based on Equation (3) below.
수학식 3
Figure PCTKR2018003820-appb-M000003
Equation 3
Figure PCTKR2018003820-appb-M000003
이때, sizeSR은 사각형 스캔 영역의 크기(넓이)를 의미할 수 있고, sizeSR은 (Sr_x+1)*(Sr_y+1)일 수 있다. Sr_x는 스캔 영역의 좌측 상단 모서리 좌표를 기준으로 가장 우측의 유효 변환 계수 픽셀의 수평방향 좌표를 의미할 수 있다. 다시 말해, Sr_x는 스캔 영역의 좌측 상단 모서리 좌표를 기준으로 우측 경계 픽셀의 수평 방향 좌표를 의미할 수 있다. Sr_y는 스캔 영역의 좌측 상단 모서리 좌표를 기준으로 가장 하측의 유효 변환 계수 픽셀의 수직방향 좌표를 의미할 수 있다. 다시 말해, Sr_y는 스캔 영역의 좌측 상단 모서리 좌표를 기준으로 하측 경계 픽셀의 수직 방향 좌표를 의미할 수 있다. K1은 스캔 영역의 크기와 GT1 플래그 간 조절 계수일 수 있다. 예를 들어, K1은 1보다 큰 정수일 수 있다. Th1은 미리 정해진 임계값일 수 있다. 예를 들어, Th1은 16,8 일 수 있다. 다만 이에 제한되지 않고, K1 및 Th1은 다양한 값을 가질 수 있음을 당업자는 용이하게 이해할 수 있다.In this case, sizeSR may mean the size (width) of the square scan area, and sizeSR may be (Sr_x + 1) * (Sr_y + 1). Sr_x can be the horizontal coordinate of the rightmost effective transformation coefficient pixel based on the upper left corner coordinate of the scan area. In other words, Sr_x can mean the horizontal coordinate of the right boundary pixel based on the upper left corner coordinate of the scan area. Sr_y may mean the vertical coordinate of the lowest effective conversion factor pixel based on the upper left corner coordinate of the scan area. In other words, Sr_y may mean the vertical coordinate of the lower boundary pixel based on the upper left corner coordinate of the scan area. K1 can be the magnitude of the scan area and the adjustment factor between the GT1 flags. For example, K1 may be an integer greater than one. Th1 may be a predetermined threshold value. For example, Th1 may be 16,8. Those skilled in the art can easily understand that K1 and Th1 can have various values, without being limited thereto.
엔트로피 부호화부(155)는 현재 블록 내 GT2 플래그 정보의 최대 개수를 결정하고, 상기 결정된 유효 변환 계수의 최대 계수 내에서 현재 블록 내 GT2 플래그 정보를 생성할 수 있다. 즉, 엔트로피 부호화부(155)는 유효 변환 계수의 GT2 플래그 정보를 최대 개수만큼 생성하면, 이후에 엔트로피 부호화부(155)는 유효 변환 계수의 GT2 플래그 정보를 더 이상 생성하지 않을 수 있다.The entropy encoding unit 155 can determine the maximum number of GT2 flag information in the current block and generate the GT2 flag information in the current block within the maximum coefficient of the determined effective transform coefficient. That is, if the entropy encoding unit 155 generates the maximum number of GT2 flag information of the effective conversion coefficient, the entropy encoding unit 155 may not generate the GT2 flag information of the effective conversion coefficient thereafter.
엔트로피 부호화부(155)는 모든 0이 아닌 유효 변환 계수를 현재 블록 내 GT2 플래그 정보의 최대 개수로 결정할 수 있다. 또는, 엔트로피 부호화부(155)는 스캔 영역의 크기에 기초하여 현재 블록 내 GT2 플래그 정보의 최대 개수를 결정할 수 있다. 예를 들어, 엔트로피 부호화부(155)는 GT2 플래그 정보의 최대 개수 MaxCount_GT2를 하기와 같은 수학식 4에 기초하여 결정할 수 있다.The entropy encoding unit 155 can determine all non-zero effective conversion coefficients as the maximum number of GT2 flag information in the current block. Alternatively, the entropy encoding unit 155 can determine the maximum number of GT2 flag information in the current block based on the size of the scan area. For example, the entropy encoding unit 155 can determine the maximum number MaxCount_GT2 of the GT2 flag information based on the following expression (4).
수학식 4
Figure PCTKR2018003820-appb-M000004
Equation 4
Figure PCTKR2018003820-appb-M000004
이때, sizeSR은 사각형 스캔 영역의 크기(넓이)를 의미할 수 있고, sizeSR은 (Sr_x+1)*(Sr_y+1)일 수 있다. Sr_x는 스캔 영역의 좌측 상단 모서리 좌표를 기준으로 가장 우측의 유효 변환 계수 픽셀의 수평방향 좌표를 의미할 수 있다. 다시 말해, Sr_x는 스캔 영역의 좌측 상단 모서리 좌표를 기준으로 우측 경계 픽셀의 수평 방향 좌표를 의미할 수 있다. Sr_y는 스캔 영역의 좌측 상단 모서리 좌표를 기준으로 가장 하측의 유효 변환 계수 픽셀의 수직방향 좌표를 의미할 수 있다. 다시 말해, Sr_y는 스캔 영역의 좌측 상단 모서리 좌표를 기준으로 하측 경계 픽셀의 수직 방향 좌표를 의미할 수 있다. K2는 스캔 영역의 크기와 GT2 플래그 간 조절 계수일 수 있다. 예를 들어, K2는 1보다 큰 정수일 수 있다. Th2는 미리 정해진 임계값일 수 있다. 예를 들어, Th2는 16,8 일 수 있다. 다만 이에 제한되지 않고, K2 및 Th2는 다양한 값을 가질 수 있음을 당업자는 용이하게 이해할 수 있다.In this case, sizeSR may mean the size (width) of the square scan area, and sizeSR may be (Sr_x + 1) * (Sr_y + 1). Sr_x can be the horizontal coordinate of the rightmost effective transformation coefficient pixel based on the upper left corner coordinate of the scan area. In other words, Sr_x can mean the horizontal coordinate of the right boundary pixel based on the upper left corner coordinate of the scan area. Sr_y may mean the vertical coordinate of the lowest effective conversion factor pixel based on the upper left corner coordinate of the scan area. In other words, Sr_y may mean the vertical coordinate of the lower boundary pixel based on the upper left corner coordinate of the scan area. K2 can be the magnitude of the scan area and the adjustment factor between GT2 flags. For example, K2 may be an integer greater than one. Th2 may be a predetermined threshold value. For example, Th2 may be 16,8. Those skilled in the art can easily understand that K2 and Th2 can have various values, without being limited thereto.
엔트로피 부호화부(155)는 현재 블록 내 계수 그룹에 관한 정보를 생성할 수 있다. 계수 그룹에 관한 정보는 계수 그룹에 적어도 하나의 유효 변환 계수를 포함하고 있는지를 나타내는 플래그 정보일 수 있다. 이때, 엔트로피 부호화부(155)는 스캔 영역에 포함된 변환 계수들을 스캔 순서에 따라 스캔된 소정의 K개(K는 정수)의 변환 계수마다 하나의 계수 그룹을 결정할 수 있다. 즉, 하나의 계수 그룹은 K개의 변환 계수를 포함할 수 있다. 이때, 스캔 순서는 소정의 역방향 스캔 순서의 반대 방향인 정방향 스캔 순서일 수 있다. 여기서 말하는 소정의 역방향 스캔 순서는 현재 블록에 포함된 변환 계수들 중 우측 하단에 위치하는 계수부터 현재 블록에 포함된 변환 계수들 중 좌측 상단에 위치하는 계수까지 스캔하는 순서를 의미할 수 있다.The entropy encoding unit 155 can generate information on the current intra-block coefficient group. The information on the coefficient group may be flag information indicating whether the coefficient group includes at least one effective transform coefficient. At this time, the entropy encoding unit 155 can determine one coefficient group for every predetermined K number of transform coefficients included in the scan region (K is an integer) scanned according to the scan order. That is, one coefficient group may include K transform coefficients. In this case, the scan order may be a forward scan order that is the opposite direction of the predetermined reverse scan order. The predetermined backward scan order referred to herein may mean a scan order from a coefficient located at the lower right of the transform coefficients included in the current block to a coefficient located at the upper left of the transform coefficients included in the current block.
따라서, 엔트로피 부호화부(155)는 현재 블록 내 좌상측 모서리에 인접하는 계수인 DC 계수으로부터 정방향의 스캔 순서에 따라 스캔하여 계수 그룹을 결정할 수 있다. 이때, 현재 블록에 포함된 변환 계수의 개수가 K의 정수배가 아닌 경우, 정방향의 스캔 순서에 따라 스캔되는 계수의 그룹들 중 최종 계수 그룹은 K보다 작은 개수의 변환 계수를 포함할 수 있다. 다만 이에 제한되지 않고, 엔트로피 부호화부(155)는 현재 블록에 포함된 변환 계수들 중 우측 하단에 위치하는 계수부터 현재 블록에 포함된 변환 계수들 중 좌측 상단에 위치하는 계수까지 스캔하는 역방향 스캔 순서에 따라 스캔하여 계수 그룹을 결정할 수 있음을 당업자는 용이하게 이해할 수 있다.Accordingly, the entropy encoding unit 155 can determine the coefficient group by scanning in the forward scan order from the DC coefficient, which is a coefficient adjacent to the upper left corner in the current block. If the number of transform coefficients included in the current block is not an integral multiple of K, the last coefficient group among the groups of coefficients scanned according to the forward scan order may include a smaller number of transform coefficients. However, the present invention is not limited to this, and the entropy coding unit 155 may perform the inverse scanning order in which the coefficients located in the lower right of the transform coefficients included in the current block are scanned up to the coefficient located in the upper left of the transform coefficients included in the current block It will be readily appreciated by those skilled in the art that scanning may be performed in accordance with the present invention to determine a coefficient group.
엔트로피 부호화부(155)는 소정의 스캔 순서에 따라 스캔되는 계수의 그룹들 중 하나의 계수 그룹이 1개의 변환 계수만을 포함하는 경우, 해당 계수 그룹에 관한 정보를 생성하지 않고, GT0 플래그 정보를 바로 생성할 수 있다.If one of the groups of coefficients scanned according to a predetermined scan order includes only one transform coefficient, the entropy encoding unit 155 does not generate information about the corresponding coefficient group and outputs the GT0 flag information immediately Can be generated.
엔트로피 부호화부(155)는 현재 블록에 포함된 각 계수 그룹에 대해 적어도 하나의 변환 계수의 부호(sign)를 숨기는지 여부를 결정할 수 있다.. 예를 들어, 엔트로피 부호화부(155)는 경우에 따라 현재 블록에 포함된 각 계수 그룹에 대해 하나 또는 두개의 변환 계수의 부호를 숨긴다고 결정할 수 있다.The entropy encoding unit 155 may determine whether to hide the sign of at least one transform coefficient for each coefficient group included in the current block. For example, the entropy encoding unit 155 may determine It can be determined that the sign of one or two transform coefficients is hidden for each coefficient group included in the current block.
엔트로피 부호화부(155)는 사각형 스캔 영역 내 변환 계수에 관한 정보를 소정의 스캔 순서에 따라 스캔할 수 있다. 소정의 스캔 순서는 역방향의 지그재그 스캔 순서, 역방향의 대각 스캔 순서, 역방향의 수직 스캔 순서, 수평 스캔 순서를 포함할 수 있다. 다만, 소정의 스캔 순서는 상기 언급한 역방향 스캔 순서에 제한되지 않고, 다양한 역방향 스캔 순서를 포함할 수 있음을 당업자는 용이하게 이해할 수 있을 것이다.The entropy encoding unit 155 may scan the information on the transform coefficients in the quadrangular scan area according to a predetermined scan order. The predetermined scan order may include a reverse zigzag scan order, a reverse diagonal scan order, a reverse vertical scan order, and a horizontal scan order. However, those skilled in the art will readily understand that the predetermined scan order is not limited to the above-mentioned reverse scan order and may include various reverse scan orders.
비트스트림 생성부(170)는 엔트로피 부호화된 정보를 포함하는 비트스트림을 생성할 수 있다. 즉, 비트스트림 생성부(170)는 엔트로피 부호화부(155)에서 변환 계수에 관한 정보를 스캔하고, 스캔된 변환 계수에 관한 정보를 기초로 엔트로피 부호화된 정보를 포함하는 비트스트림을 생성할 수 있다.The bitstream generator 170 may generate a bitstream including entropy-encoded information. That is, the bitstream generating unit 170 may scan the information about the transform coefficients in the entropy encoding unit 155 and generate a bitstream including the entropy-encoded information based on the information about the scanned transform coefficients .
비트스트림 생성부(170)는 변환 계수에 관한 정보를 스캔하기 위한 영역인 사각형 스캔 영역을 특정하는 좌표에 관한 정보를 포함하는 비트스트림을 생성할 수 있다. 이때, 사각형 스캔 영역을 특정하는 좌표에 관한 정보는 현재 블록에 포함된 유효 변환 계수 픽셀들 중 가장 우측에 위치하는 유효 변환 계수 픽셀의 수평방향 좌표 값 및 현재 블록에 포함된 유효 변환 계수 픽셀들 중 가장 하측에 위치하는 유효 변환 계수 픽셀의 수직방향 좌표 값을 나타내는 정보를 포함할 수 있다. 다만 이에 제한되지 않고, 사각형 스캔 영역을 특정하는 좌표에 관한 정보는 현재 블록에 포함된 유효 변환 계수 픽셀들 중 가장 우측에 위치하는 유효 변환 계수 픽셀의 수평방향 좌표 값 및 현재 블록에 포함된 유효 변환 계수 픽셀들 중 가장 하측에 위치하는 유효 변환 계수 픽셀의 수직방향 좌표 값 중 큰 값을 갖는 좌표 값을 나타내는 정보를 포함할 수 있다. 즉, 비트스트림 생성부(170)은 경우에 따라 유효 변환 계수 픽셀들 중 가장 우측에 위치하는 유효 변환 계수 픽셀의 수평방향 좌표 값 및 현재 블록에 포함된 유효 변환 계수 픽셀들 중 가장 하측에 위치하는 유효 변환 계수 픽셀의 수직방향 좌표 값이 서로 다른 경우에도 직사각형 스캔 영역을 결정하지 않고, 그 중 큰 값에 기초하여 정사각형의 스캔 영역을 결정할 수 있다. 이 경우, 직사각형 스캔 영역보다는 큰 정사각형의 스캔 영역이 결정될 수 있으나, 비디오 부호화 장치(150)는 하나의 방향에 대한 좌표 값만을 나타내는 정보만을 전송하게 됨으로써 시그널링하는 비트수를 줄일 수 있다.The bitstream generating unit 170 may generate a bitstream including information on coordinates specifying a quadrangle scan area, which is an area for scanning information on transform coefficients. At this time, the information on the coordinates specifying the quadrangular scan area is obtained by dividing the horizontal coordinate value of the effective conversion coefficient pixel located at the rightmost of the effective conversion coefficient pixels included in the current block and the horizontal coordinate value of the effective conversion coefficient pixels included in the current block And information indicating the vertical coordinate value of the effective transformation coefficient pixel located at the lowermost position. However, the present invention is not limited to this, and the information on the coordinates specifying the quadrangular scan area may be obtained by adding the horizontal coordinate values of the effective conversion coefficient pixels located at the rightmost of the effective conversion coefficient pixels included in the current block, And information indicating a coordinate value having a larger value among the vertical coordinate values of the effective conversion coefficient pixel located at the lowermost one of the coefficient pixels. In other words, the bitstream generating unit 170 generates the bit stream of the effective transform coefficient pixel located at the bottom of the effective transform coefficient pixels included in the current block and the horizontal direction coordinate value of the effective transform coefficient pixel located at the right- Even if the vertical coordinate values of the effective conversion coefficient pixels are different from each other, the square scan region can be determined based on the larger of the rectangular scan regions. In this case, a scan area of a square larger than a rectangular scan area can be determined, but the video encoding device 150 transmits only information indicating only a coordinate value in one direction, thereby reducing the number of signaling bits.
비디오 부호화 장치(150)는 영상 부호화부(미도시)를 포함할 수 있고, 영상 부호화부(미도시)는 엔트로피 부호화부(155) 및 비트스트림 생성부(170)를 포함할 수 있다. 영상 부호화부에 대해서는 도 1f를 참조하여 설명하도록 한다.The video encoding apparatus 150 may include an image encoding unit (not shown), and the image encoding unit (not shown) may include an entropy encoding unit 155 and a bitstream generating unit 170. The image encoding unit will be described with reference to FIG.
도 1d는 다양한 실시예에 따른 비디오 부호화 방법의 흐름도를 도시한다.Figure 1D shows a flow diagram of a video encoding method according to various embodiments.
도 1d를 참조하면, S150 단계에서, 비디오 부호화 장치(150)는 현재 블록의 변환 계수들을 획득할 수 있다. 현재 블록은 도 10 내지 도 23을 참조하여 설명되는 영상을 부/복호화하는 과정에서 이용할 수 있는 데이터 단위일 수 있다.Referring to FIG. 1D, in operation S150, the video encoding apparatus 150 may obtain the transform coefficients of the current block. The current block may be a data unit that can be used in the process of attaching / decrypting an image described with reference to FIGS.
비디오 부호화 장치(150)는 인터 예측 또는 인트라 예측을 수행하여 현재 블록의 예측 블록을 생성할 수 있고, 현재 블록의 원본 블록 및 현재 블록의 예측 블록에 기초하여 현재 블록의 레지듀얼 블록을 생성할 수 있다. 비디오 부호화 장치(150)는 현재 블록의 레지듀얼 블록에 대해 변환 및 양자화를 수행하여 현재 블록의 변환 계수들을 생성할 수 있다.The video encoding apparatus 150 can generate a prediction block of the current block by performing inter prediction or intra prediction and generate a residual block of the current block based on the original block of the current block and the prediction block of the current block have. The video encoding apparatus 150 may transform and quantize the residual block of the current block to generate transform coefficients of the current block.
S155 단계에서, 비디오 부호화 장치(150)는 현재 블록 내 모든 유효 변환 계수를 포함하는 사각형 스캔 영역을 결정할 수 있다. 이때, 사각형 스캔 영역 내에는 현재 블록 내 모든 유효 변환 계수를 포함하고, 사각형 스캔 영역을 제외한 현재 블록 내 나머지 영역은 유효 변환 계수가 아닌 0의 값을 갖는 계수만을 포함할 수 있다. 비디오 부호화 장치(150)는 사각형 스캔 영역을 특정하는 좌표를 결정하고, 사각형 스캔 영역을 특정하는 좌표에 관한 정보를 엔트로피 부호화할 수 있다. 즉, 비디오 부호화 장치(150)는 사각형 스캔 영역을 특정하는 좌표에 관한 신택스 엘리먼트 정보에 대해 소정의 이진화 방법에 기초한 이진화를 수행하여 빈 스트링(bin string)을 생성할 수 있다. 여기서, 소정의 이진화 방법은 고정 길이 이진화 방법 및 절삭형 단항 이진화 방법 중 적어도 하나일 수 있다. 비디오 부호화 장치(150)는 사각형 스캔 영역을 특정하는 좌표에 관한 신택스에 관한 빈 스트링에 대해 컨텍스트 모델에 기초한 이진 산술 부호화를 수행할 수 있다. 이때, 컨텍스트 모델은 현재 블록의 크기, 현재 블록의 컬러 성분 및 빈 인덱스 중 적어도 하나에 기초하여 결정될 수 있다.In step S155, the video encoding apparatus 150 may determine a rectangular scan area including all effective transformation coefficients in the current block. In this case, the square scan region includes all the effective transform coefficients in the current block, and the remaining region in the current block excluding the square scan region may include only coefficients having a value of 0, which is not an effective transform coefficient. The video encoding apparatus 150 may determine the coordinates specifying the quadrangular scan region and entropy-encode information on the coordinates specifying the quadrangular scan region. That is, the video encoding apparatus 150 may generate a bin string by performing binarization on the syntax element information on the coordinates specifying the quadrangular scan area based on a predetermined binarization method. Here, the predetermined binarization method may be at least one of a fixed length binarization method and a cutting type unary binarization method. The video encoding apparatus 150 may perform binary arithmetic coding based on the context model on the bin string regarding the syntax regarding the coordinates specifying the quadrangular scan area. At this time, the context model may be determined based on at least one of the size of the current block, the color component of the current block, and the empty index.
S160 단계에서, 비디오 부호화 장치(150)는 사각형 스캔 영역에 포함된 변환 계수에 관한 정보를 소정의 스캔 순서에 따라 스캔할 수 있다. 변환 계수에 관한 정보는 변환 계수가 소정의 값보다 큰지 여부를 나타내는 플래그 정보를 포함할 수 있다. 이때, 소정의 값은 0, 1, 2 중 적어도 하나일 수 있다. 변환 계수의 잔여 레벨 절대값 정보, 변환 계수의 부호 정보, 이진화 파라메터 정보 중 적어도 하나를 포함할 수 있다. 이진화 파라메터는 라이스 파라메터 및 다양한 이진화 파라메터 중 적어도 하나를 포함할 수 있다. 소정의 스캔 순서는 역방향의 지그재그 스캔 순서, 역방향의 대각 스캔 순서, 역방향의 수직 스캔 순서, 수평 스캔 순서를 포함할 수 있다. 다만, 소정의 스캔 순서는 상기 언급한 역방향 스캔 순서에 제한되지 않고, 다양한 역방향 스캔 순서를 포함할 수 있음을 당업자는 용이하게 이해할 수 있을 것이다.In step S160, the video encoding device 150 may scan the information on the transform coefficients included in the quadrangular scan area according to a predetermined scan order. The information on the transform coefficient may include flag information indicating whether the transform coefficient is larger than a predetermined value. At this time, the predetermined value may be at least one of 0, 1, and 2. The residual level information of the transform coefficient, the sign information of the transform coefficient, and the binarization parameter information. The binarization parameter may include at least one of a race parameter and various binarization parameters. The predetermined scan order may include a reverse zigzag scan order, a reverse diagonal scan order, a reverse vertical scan order, and a horizontal scan order. However, those skilled in the art will readily understand that the predetermined scan order is not limited to the above-mentioned reverse scan order and may include various reverse scan orders.
S165 단계에서, 비디오 부호화 장치(150)는 스캔된 변환 계수에 관한 정보를 기초로 엔트로피 부호화하여 엔트로피 부호화된 정보를 생성할 수 있다. 비디오 부호화 장치(150)는 스캔된 변환 계수들에 관한 정보에 기초하여 이진화 및 컨텍스트 모델에 기초한 이진 산술 부호화 중 적어도 하나를 수행하여 엔트로피 부호화된 정보를 생성할 수 있다. 변환 계수들에 관한 제1 정보가 현재 변환 계수의 절대값이 소정의 값보다 큰 지를 나타내는 정보, 잔여레벨 절대값 정보 및 현재 변환 계수의 부호 정보이고, 유효 변환 계수들에 관한 제2 정보가 이진화 파라메터 정보인 경우, 비디오 부호화 장치(150)는 유효 변환 계수들에 관한 제1 정보에 대해 제2 정보에 기초한 이진화를 수행하여 제1 정보에 관한 빈 스트링(bin string)을 생성할 수 있다. 비디오 부호화 장치(150)는 제1 정보에 관한 빈 스트링(bin string)에 대해 이진 산술 부호화를 수행하여 엔트로피 부호화된 정보를 생성할 수 있다. In step S165, the video encoding device 150 can generate entropy-encoded information by entropy encoding based on information about the scanned transform coefficients. The video encoding apparatus 150 may generate at least one of binarization based on information on the scanned transform coefficients and binary arithmetic encoding based on the context model to generate entropy-encoded information. The first information on the transform coefficients is information indicating whether the absolute value of the current transform coefficient is larger than a predetermined value, the residual level absolute value information, and the current transform coefficient information, and the second information on the effective transform coefficients is binarized In case of the parameter information, the video encoding apparatus 150 may generate bin strings for the first information by performing binarization based on the second information on the first information on the effective transform coefficients. The video encoding apparatus 150 may perform binary arithmetic coding on a bin string related to the first information to generate entropy-encoded information.
제 2 정보는 소정의 스캔 순서에 따라 이전에 스캔된 적어도 하나의 제2 변환 계수에 관한 정보, 현재 블록 내 제1 변환 계수의 위치 및 컬러 성분, 우측 또는 하측의 주변 변환 계수에 관한 정보 및 제1 변환 계수의 스캔 위치 중 적어도 하나에 기초하여 결정될 수 있다. 한편, 제1 변환 계수에 관한 이진화 파라메터 정보는 제1 변환 계수의 우측 또는 하측의 주변 유효 변환 계수의 레벨 절대값에 기초하여 결정될 수 있다. 예를 들어, 제1 변환 계수에 관한 이진화 파라메터 정보는 제1 변환 계수의 우측 또는 하측의 주변 유효 변환 계수의 레벨 절대값의 합에 기초하여 결정될 수 있다.The second information includes information on at least one second transform coefficient previously scanned in accordance with a predetermined scan order, position and color components of the first transform coefficient in the current block, information on the right or lower peripheral transformation coefficient, 1 < / RTI > conversion coefficient. On the other hand, the binarization parameter information on the first transform coefficient can be determined based on the absolute level of the level of the peripheral effective transform coefficient on the right side or the lower side of the first transform coefficient. For example, the binarization parameter information on the first transform coefficient may be determined based on the sum of the absolute levels of the levels of the peripheral effective transform coefficients on the right side or the lower side of the first transform coefficient.
변환 계수들에 관한 정보가 현재 유효 변환 계수의 절대값이 소정의 값보다 큰 지를 나타내는 정보, 잔여레벨 절대값 정보 및 현재 유효 변환 계수의 부호 정보인 경우, 비디오 부호화 장치(150)는 변환 계수들에 관한 정보에 대해 이진화를 수행하여 빈 스트링(bin string)을 생성할 수 있다. 비디오 부호화 장치(150)는 빈 스트링(bin string)에 대해 유효 변환 계수들에 관한 컨텍스트 모델에 기초한 이진 산술 부호화를 수행하여 이진 산술 부호화된 정보를 생성할 수 있다. 상기 유효 변환 계수들에 관한 컨텍스트 모델 중 제1 변환 계수에 관한 컨텍스트 모델은 소정의 스캔 순서에 따라 이전에 스캔된 적어도 하나의 제2 변환 계수에 관한 정보, 현재 블록 내 제1 변환 계수의 위치 및 컬러 성분, 우측 또는 하측의 주변 변환 계수에 관한 정보 및 제1 변환 계수의 스캔 위치 중 적어도 하나에 기초하여 결정될 수 있다.If the information on the transform coefficients is the information indicating whether the absolute value of the current effective transform coefficient is larger than a predetermined value, the residual level absolute value information, and the current effective transform coefficient information, the video coding apparatus 150 outputs the transform coefficients Can be binarized to generate a bin string. The video encoding apparatus 150 may perform binary arithmetic coding based on the context model on the valid transform coefficients for bin strings to generate binary arithmetic coded information. The context model of the first transform coefficient among the context models related to the valid transform coefficients includes information on at least one second transform coefficient previously scanned according to a predetermined scan order, position of the first transform coefficient in the current block, Information on the color component, the right or lower peripheral transformation coefficient, and the scan position of the first transformation coefficient.
S170 단계에서, 비디오 부호화 장치(150)는 엔트로피 부호화된 정보를 포함하는 비트스트림을 생성할 수 있다. 비디오 부호화 장치(150)는 엔트로피 부호화부(155)에서 변환 계수에 관한 정보를 스캔하고, 스캔된 변환 계수에 관한 정보를 기초로 엔트로피 부호화된 정보를 포함하는 비트스트림을 생성할 수 있다. In operation S170, the video encoding apparatus 150 may generate a bitstream including entropy-encoded information. The video encoding apparatus 150 may scan the information on the transform coefficients in the entropy encoding unit 155 and generate a bit stream including the entropy encoded information based on the information about the scanned transform coefficients.
또한, 비디오 부호화 장치(150)는 변환 계수에 관한 정보를 스캔하기 위한 영역인 사각형 스캔 영역을 특정하는 좌표에 관한 정보를 포함하는 비트스트림을 생성할 수 있다.In addition, the video encoding device 150 may generate a bitstream including information on coordinates specifying a quadrangular scan area, which is an area for scanning information on the transform coefficients.
도 1e 는 다양한 실시예에 따른 영상 복호화부(6000)의 블록도를 도시한다.FIG. 1E shows a block diagram of an image decoding unit 6000 according to various embodiments.
다양한 실시예에 따른 영상 복호화부(6000)는, 비디오 복호화 장치(100)의 영상 복호화부(미도시)에서 영상 데이터를 부호화하는데 거치는 작업들을 수행한다. The image decoding unit 6000 according to various embodiments performs operations to encode image data in a video decoding unit (not shown) of the video decoding apparatus 100. [
도 1e를 참조하면, 엔트로피 복호화부(6150)는 비트스트림(6050)으로부터 복호화 대상인 부호화된 영상 데이터 및 복호화를 위해 필요한 부호화 정보를 파싱한다. 부호화된 영상 데이터는 양자화된 변환계수로서, 역양자화부(6200) 및 역변환부(6250)는 양자화된 변환 계수로부터 레지듀 데이터를 복원한다. 도 1e의 엔트로피 복호화부(6150)는 도 1a의 엔트로피 복호화부(105)에 대응될 수 있다.Referring to FIG. 1E, the entropy decoding unit 6150 parses the encoded image data to be decoded and the encoding information necessary for decoding from the bitstream 6050. The encoded image data is a quantized transform coefficient, and the inverse quantization unit 6200 and the inverse transform unit 6250 reconstruct the residue data from the quantized transform coefficients. The entropy decoding unit 6150 of FIG. 1E may correspond to the entropy decoding unit 105 of FIG. 1A.
인트라 예측부(6400)는 블록 별로 인트라 예측을 수행한다. 인터 예측부(6350)는 블록 별로 복원 픽처 버퍼(6300)에서 획득된 참조 영상을 이용하여 인터 예측을 수행한다. 인트라 예측부(6400) 또는 인터 예측부(6350)에서 생성된 각 블록에 대한 예측 데이터와 레지듀 데이터가 더해짐으로써 현재 영상(6050)의 블록에 대한 공간 영역의 데이터가 복원되고, 디블로킹부(6450) 및 SAO 수행부(6500)는 복원된 공간 영역의 데이터에 대해 루프 필터링을 수행하여 필터링된 복원 영상(6600)을 출력할 수 있다. 또한, 복원 픽쳐 버퍼(6300)에 저장된 복원 영상들은 참조 영상으로서 출력될 수 있다.The intra prediction unit 6400 performs intra prediction on a block-by-block basis. The inter-prediction unit 6350 performs inter-prediction using the reference image obtained in the reconstruction picture buffer 6300 for each block. The spatial data for the block of the current image 6050 is restored by adding the predictive data and residue data for each block generated by the intra predictor 6400 or the inter predictor 6350, 6450 and the SAO performing unit 6500 may perform loop filtering on the data of the reconstructed spatial region and output the filtered reconstructed image 6600. [ In addition, restored images stored in the restored picture buffer 6300 can be output as a reference image.
비디오 복호화 장치(100)의 복호화부(미도시)에서 영상 데이터를 복호화하기 위해, 다양한 실시예에 따른 영상 복호화부(6000)의 단계별 작업들이 블록별로 수행될 수 있다. In order to decode the image data in the decoding unit (not shown) of the video decoding apparatus 100, the stepwise operations of the image decoding unit 6000 according to various embodiments may be performed block by block.
도 1f는 다양한 실시예에 따른 영상 부호화부의 블록도를 도시한다. FIG. 1F shows a block diagram of an image encoding unit according to various embodiments.
다양한 실시예에 따른 영상 부호화부(7000)는, 비디오 부호화 장치(150)의 영상 부호화부(미도시)에서 영상 데이터를 부호화하는데 거치는 작업들을 수행한다. The image encoding unit 7000 according to various embodiments performs operations to encode image data in an image encoding unit (not shown) of the video encoding device 150.
즉, 인트라 예측부(7200)는 현재 영상(7050) 중 블록별로 인트라 예측을 수행하고, 인터 예측부(7150)는 블록별로 현재 영상(7050) 및 복원 픽처 버퍼(7100)에서 획득된 참조 영상을 이용하여 인터 예측을 수행한다. That is, the intra predictor 7200 performs intraprediction on a block-by-block basis among the current image 7050, and the inter-prediction unit 7150 performs intra prediction on the current image 7050 and the reference image obtained from the reconstructed picture buffer 7100 To perform inter prediction.
인트라 예측부(7200) 또는 인터 예측부(7150)로부터 출력된 각 블록에 대한 예측 데이터를 현재 영상(7050)의 인코딩되는 블록에 대한 데이터로부터 빼줌으로써 레지듀 데이터를 생성하고, 변환부(7250) 및 양자화부(7300)는 레지듀 데이터에 대해 변환 및 양자화를 수행하여 블록별로 양자화된 변환 계수를 출력할 수 있다. 역양자화부(7450), 역변환부(7500)는 양자화된 변환 계수에 대해 역양자화 및 역변환을 수행하여 공간 영역의 레지듀 데이터를 복원할 수 있다. 복원된 공간 영역의 레지듀 데이터는 인트라 예측부(7200) 또는 인터 예측부(7150)로부터 출력된 각 블록에 대한 예측 데이터와 더해짐으로써 현재 영상(7050)의 블록에 대한 공간 영역의 데이터로 복원된다. 디블로킹부(7550) 및 SAO 수행부는 복원된 공간 영역의 데이터에 대해 인루프 필터링을 수행하여, 필터링된 복원 영상을 생성한다. 생성된 복원 영상은 복원 픽쳐 버퍼(7100)에 저장된다. 복원 픽처 버퍼(7100)에 저장된 복원 영상들은 다른 영상의 인터예측을 위한 참조 영상으로 이용될 수 있다. 엔트로피 부호화부(7350)는 양자화된 변환 계수에 대해 엔트로피 부호화하고, 엔트로피 부호화된 계수가 비트스트림(7400)으로 출력될 수 있다. 도 1f의 엔트로피 부호화부(7350)는 도 1c의 엔트로피 부호화부(155) 에 대응될 수 있다.The transform unit 7250 generates residue data by subtracting the prediction data for each block output from the intra prediction unit 7200 or the inter prediction unit 7150 from the data for the block to be encoded of the current image 7050, And quantization unit 7300 may perform conversion and quantization on the residue data and output the quantized transform coefficients on a block-by-block basis. The inverse quantization unit 7450 and the inverse transformation unit 7500 can perform inverse quantization and inverse transformation on the quantized transform coefficients to restore the residue data in the spatial domain. Residue data of the reconstructed spatial region is reconstructed into spatial domain data for a block of the current image 7050 by adding predictive data for each block output from the intra predictor 7200 or the inter predictor 7150 . The deblocking unit 7550 and the SAO performing unit perform in-loop filtering on the data of the reconstructed spatial region to generate a filtered reconstructed image. The generated restored image is stored in the restored picture buffer 7100. The reconstructed images stored in the reconstructed picture buffer 7100 can be used as reference images for inter prediction of other images. The entropy encoding unit 7350 entropy-codes the quantized transform coefficients, and the entropy-encoded coefficients can be output as a bitstream 7400. The entropy encoding unit 7350 of FIG. 1F may correspond to the entropy encoding unit 155 of FIG. 1C.
다양한 실시예에 따른 영상 부호화부(7000)가 비디오 부호화 장치(150)에 적용되기 위해서, 다양한 실시예에 따른 영상 부호화부(7000)의 단계별 작업들이 블록별로 수행될 수 있다.In order for the image encoding unit 7000 according to various embodiments to be applied to the video encoding device 150, the stepwise operations of the image encoding unit 7000 according to various embodiments may be performed for each block.
이하 도 2, 도 3a 내지 3b 의 현재 블록 내 픽셀들에 대해 도시된 '0', '1'은 유효 변환 계수 플래그(계수의 절대값이 0보다 큰지 여부를 나타내는 프플래그)의 값임을 전제로 블록 내 변환 계수를 스캔하는 방법을 상세하게 설명하겠다.Hereinafter, '0' and '1' shown for the pixels in the current block of FIG. 2 and FIGS. 3A and 3B are assumed to be values of the effective conversion coefficient flag (flag indicating whether the absolute value of the coefficient is greater than 0) The method of scanning the in-block transform coefficients will be described in detail.
도 2는 일 실시예에 따라서 블록 내 변환 계수를 스캔하는 방법을 설명하기 위한 도면이다.FIG. 2 is a diagram for explaining a method of scanning intra-block transform coefficients according to an embodiment.
도 2를 참조하면, 현재 블록(200)은 복수의 변환 계수를 포함하는 블록이다. 현재 블록(200)은 역변환 동작을 수행하는 데이터 단위로, MxN(M,N은 양의 정수) 크기의 블록일 수 있다. 예를 들어, 도 2에 도시된 바와 같이, 현재 블록(200)은 16x16 크기의 블록일 수 있다.Referring to FIG. 2, the current block 200 is a block including a plurality of transform coefficients. The current block 200 is a data unit for performing an inverse transform operation, and may be a block of MxN (M, N is a positive integer) size. For example, as shown in FIG. 2, the current block 200 may be a 16x16 block.
비디오 복호화 장치(100)는 현재 블록(200)을 소정의 크기를 갖는 계수 그룹(또는 서브 블록)(205)들로 분할할 수 있다. 계수 그룹은 XxY(X,Y는 양의 정수)의 크기의 블록일 수 있다. 예를 들어, 도 2에 도시된 바와 같이, 계수 그룹(205)은 4x4 크기의 블록일 수 있다.The video decoding apparatus 100 may divide the current block 200 into coefficient groups (or sub-blocks) 205 having a predetermined size. The coefficient group may be a block of size XxY (where X and Y are positive integers). For example, as shown in FIG. 2, the coefficient group 205 may be a 4x4 block.
비디오 복호화 장치(100)는 정방향의 스캔 순서에 따라 현재 블록(200)을 좌측 상단의 변환 계수로부터 우측 하단의 변환 계수까지 스캔하는 과정에서 스캔되는 모든 유효 변환 계수들 중 최종 유효 변환 계수의 픽셀(210)의 좌표에 관한 정보를 비트스트림으로부터 획득할 수 있다. 최종 유효 변환 계수의 픽셀(210)의 좌표에 관한 정보는 최종 유효 변환 계수의 픽셀의 수평방향 좌표에 관한 정보 및 최종 유효 변환 계수의 픽셀의 수직방향 좌표에 관한 정보를 포함할 수 있다.The video decoding apparatus 100 performs a process of scanning the current block 200 from the upper left transform coefficient to the lower right transform coefficient in accordance with the forward scan order, 210 from the bit stream. Information on the coordinates of the pixels 210 of the final effective conversion coefficients may include information on the horizontal direction coordinates of the pixels of the final effective conversion coefficients and information on the vertical direction coordinates of the pixels of the final effective conversion coefficients.
비디오 복호화 장치(100)는 최종 유효 변환 계수의 픽셀(210)의 좌표에 관한 정보를 기초로 최종 유효 변환 계수의 픽셀(210)의 좌표를 획득하고, 최종 유효 변환 계수의 픽셀(210)의 좌표를 기초로 최종 유효 변환 계수(210)에 관한 유효 변환 계수부터 소정의 역방향 스캔 순서(215)에 따라 변환 계수의 정보를 스캔할 수 있다. 예를 들어, 도 2에 도시된 바와 같이, 소정의 역방향 스캔 순서(215)는 역방향의 대각 스캔 순서일 수 있다.The video decoding apparatus 100 obtains the coordinates of the pixel 210 of the final effective conversion coefficient based on the information on the coordinates of the pixel 210 of the final effective conversion coefficient, The information of the transform coefficient may be scanned from the effective transform coefficient related to the final effective transform coefficient 210 according to a predetermined reverse scan order 215. [ For example, as illustrated in FIG. 2, the predetermined reverse scan order 215 may be a reverse diagonal scan order.
비디오 복호화 장치(100)는 계수 그룹들(205)에 대하여 소정의 스캔 순서에 따라 스캔을 수행하고, 각 계수 그룹(205)에 대해 소정의 스캔 순서에 따라 스캔을 수행할 수 있다. 비디오 복호화 장치(100)는 계수 그룹들에 대하여 소정의 스캔 순서에 따라 계수 그룹에 관한 정보를 스캔할 수 있다. 계수 그룹에 관한 정보는 비트스트림으로부터 획득되거나 유도될 수 있다. 계수 그룹에 관한 정보는, 정방향(역방향)의 스캔 순서에 따라 스캔되는 첫번째 계수 그룹 및 마지막 계수 그룹에 대하여 적어도 하나의 유효 변환 계수를 포함함을 나타내도록 유도될 수 있다. 즉, 계수 그룹에 관한 정보는, 정방향(역방향)의 스캔 순서에 따라 스캔되는 첫번째 계수 그룹 및 마지막 계수 그룹에 대하여 비트스트림에 포함되지 않을 수 있다.The video decoding apparatus 100 may scan the coefficient groups 205 according to a predetermined scanning order and perform a scanning operation on each coefficient group 205 according to a predetermined scanning order. The video decoding apparatus 100 may scan information about the coefficient groups according to a predetermined scanning order with respect to the coefficient groups. Information about the coefficient group may be obtained or derived from the bitstream. The information about the coefficient group may be derived to indicate that it includes at least one effective transform coefficient for the first coefficient group scanned according to the forward (reverse) scan order and for the last coefficient group. That is, the information about the coefficient group may not be included in the bitstream for the first coefficient group and the last coefficient group scanned in the forward (reverse) scan order.
이때, 비디오 복호화 장치(100)는 블록의 크기 및 예측 모드 중 적어도 하나에 기초하여 소정의 역방향 스캔 순서를 결정할 수 있다. 예를 들어, 비디오 복호화 장치(100)는 현재 블록의 크기가 4x4이고, 현재 블록의 예측 모드가 인트라 예측 모드인 경우, 역방향의 수평 스캔 순서, 수직 스캔 순서, 또는 대각 스캔 순서 중 하나를 소정의 역방향 스캔 순서로 결정할 수 있다. 또한, 비디오 복호화 장치(100)는 현재 블록의 크기가 8x8이고, 현재 블록의 예측 모드가 인트라 예측 모드인 경우, 역방향의 수평 스캔 순서, 수직 스캔 순서, 또는 대각 스캔 순서 중 하나를 소정의 역방향 스캔 순서로 결정할 수 있다.At this time, the video decoding apparatus 100 may determine a predetermined reverse scan order based on at least one of the size of the block and the prediction mode. For example, when the current block size is 4x4 and the prediction mode of the current block is the intra prediction mode, the video decoding apparatus 100 may set one of the reverse horizontal scanning order, vertical scanning order, It can be determined in reverse scan order. When the current block size is 8x8 and the prediction mode of the current block is the intra prediction mode, the video decoding apparatus 100 performs one of the reverse horizontal scanning order, the vertical scanning order, or the diagonal scanning order in a predetermined reverse scan Can be determined in order.
비디오 복호화 장치(100)는 현재 블록의 크기가 4x4 또는 8x8이 아니거나, 현재 블록의 예측 모드가 인터 예측 모드가 아닌 경우, 역방향의 대각 스캔 순서를 소정의 역방향 스캔 순서로 결정할 수 있다.The video decoding apparatus 100 can determine the reverse diagonal scanning order in a predetermined reverse scanning order if the current block size is not 4x4 or 8x8 or if the prediction mode of the current block is not the inter prediction mode.
비디오 복호화 장치(100)는 계수 그룹(205)에 관한 정보가 계수 그룹(205)에 적어도 하나의 유효 계수를 포함함을 나타내는 경우, 해당 계수 그룹(205) 내 변환 계수들에 관한 정보를 역방향의 소정의 스캔 순서(215)에 따라 계수 그룹 내 변환 계수들에 관한 정보를 스캔할 수 있다.When the video decoding apparatus 100 indicates that the information on the coefficient group 205 includes at least one coefficient of validity in the coefficient group 205, The information on the transform coefficients in the coefficient group can be scanned according to a predetermined scanning order 215. [
한편, 비디오 복호화 장치(100)는 각 계수 그룹(205)에 포함된 유효 변환 계수들 중 적어도 하나의 부호(sign)를 숨긴다고 결정할 수 있다.On the other hand, the video decoding apparatus 100 may determine that at least one sign among the effective transform coefficients included in each coefficient group 205 is hidden.
도 3a는 다른 실시예에 따라서 블록 내 변환 계수를 스캔하는 방법을 설명하기 위한 도면이다.3A is a diagram for explaining a method of scanning an intra-block transform coefficient according to another embodiment.
도 3a를 참조하면, 현재 블록(300)은 복수의 변환 계수를 포함하는 블록이다. 현재 블록(300)은 역변환 동작을 수행하는 데이터 단위로, MxN (M,N은 양의 정수) 크기의 블록일 수 있다. 예를 들어, 도 3a에 도시된 바와 같이, 현재 블록(300)은 16x16 크기의 블록일 수 있다.Referring to FIG. 3A, a current block 300 is a block including a plurality of transform coefficients. The current block 300 is a unit of data for performing an inverse transform operation, and may be a block of MxN (M, N is a positive integer) size. For example, as shown in FIG. 3A, the current block 300 may be a 16x16 block.
도 3a를 참조하면, 비디오 복호화 장치(100)는 현재 블록(300)에 존재하는 모든 유효 변환 계수를 포함하는 사각형 스캔 영역(340)을 결정할 수 있다. 이때, 사각형 스캔 영역(340)은 사각형 스캔 영역(340) 우측 하단에 위치하는 픽셀(330)의 좌표에 의해 결정될 수 있다. 스캔 영역(340)의 우측 하단에 위치하는 픽셀(330)의 수평방향 좌표는 현재 블록(300) 내 모든 유효 변환 계수들 중 가장 오른쪽에 위치하는 유효 변환 계수 픽셀(320)의 수평방향 좌표일 수 있다. 스캔 영역(340)의 우측 하단에 위치하는 픽셀(330)의 수직 방향 좌표는 현재 블록(300) 내 모든 유효 변환 계수들 중 가장 아래쪽에 위치하는 유효 변환 계수 픽셀(310)의 수직방향 좌표일 수 있다. 픽셀(330)에 관한 정보는 픽셀(330)의 좌측 상단 모서리 위치에 관한 정보를 포함할 수 있다. 다만 이에 제한되지 않고, 픽셀(330)에 관한 정보는 픽셀(330)의 우측 하단 모서리 위치에 관한 정보를 포함할 수도 있다.Referring to FIG. 3A, the video decoding apparatus 100 may determine a rectangular scan area 340 including all the effective transform coefficients existing in the current block 300. At this time, the quadrangular scan region 340 may be determined by the coordinates of the pixel 330 located at the lower right of the quadrangular scan region 340. The horizontal coordinate of the pixel 330 positioned at the lower right of the scan region 340 is the horizontal coordinate of the effective transformation coefficient pixel 320 located at the rightmost of all the effective transformation coefficients in the current block 300 have. The vertical direction coordinate of the pixel 330 positioned at the lower right of the scan region 340 is the vertical direction coordinate of the effective transformation coefficient pixel 310 located at the bottom of all the effective transformation coefficients in the current block 300 have. The information about the pixel 330 may include information about the upper left corner position of the pixel 330. The information about the pixel 330 may include information about the position of the bottom right corner of the pixel 330. [
비디오 복호화 장치(100)는 사각형 스캔 영역(340)을 특정하는 픽셀(330)의 좌표에 관한 정보를 비트스림으로부터 수신하고, 수신된 픽셀(330)에 관한 정보를 기초로 사각형 스캔 영역(340)을 결정할 수 있다. 비디오 복호화 장치(100)는 픽셀(330)부터 사각형의 스캔 영역(340)의 좌측 상단의 픽셀(345)까지 소정의 역방향 스캔 순서(355)에 따라 변환 계수에 관한 정보를 스캔할 수 있다. 이때, 계수 그룹은 사각형의 스캔 영역(340)의 좌측 상단의 변환 계수로부터 소정의 정방향 스캔 순서에 따라 스캔되는 K개(K는 양의 정수)의 스캔 계수마다 결정될 수 있다. 다만 이에 제한되지 않고, 우측 하단의 변환 계수로부터 소정의 역방향 스캔 순서에 따라 스캔되는 K개(K는 양의 정수)의 스캔 계수마다 결정될 수 있음을 당업자는 용이하게 이해할 수 있다. 계수 그룹에 대한 상세한 내용은 도 3b를 참조하여 후술하도록 하겠다.The video decoding apparatus 100 receives information on the coordinates of the pixel 330 specifying the quadrangular scan region 340 from the bit stream and generates the quadrangular scan region 340 based on the information about the received pixel 330. [ Can be determined. The video decoding apparatus 100 can scan information on the transform coefficients from the pixel 330 to the upper left pixel 345 of the rectangular scan area 340 according to a predetermined reverse scan order 355. [ At this time, the coefficient group may be determined for every K (K is a positive integer) scan coefficient scanned according to a predetermined forward scan order from the upper left transform coefficient of the rectangular scan region 340. [ It is easily understood by those skilled in the art that the number of K (K is a positive integer) scan coefficient scanned according to a predetermined reverse scan order can be determined from the transform coefficient at the lower right end. Details of the coefficient group will be described later with reference to FIG. 3B.
한편, 비디오 복호화 장치(100)는 각 계수 그룹에 대하여 적어도 하나의 유효 변환 계수에 대한 부호(Sign)가 숨겨져 있음을 결정할 수 있고, 숨겨져 있는 적어도 하나의 유효 변환 계수에 대한 부호를 복원할 수 있다. 각 계수 그룹에 대하여 숨겨진 부호를 복원하는 동작을 수행하는 것에 대한 상세한 내용은 도 3b를 참조하여 후술하도록 하겠다.On the other hand, the video decoding apparatus 100 can determine that a sign for at least one effective transform coefficient is hidden for each coefficient group, and can restore the sign for at least one effective transform coefficient that is hidden . Details of performing the operation of restoring the hidden code for each coefficient group will be described later with reference to FIG. 3B.
도 3b는 다른 실시예에 따라서 블록 내 계수 그룹(서브 블록)을 결정하는 동작 및 계수 그룹 별로 수행되는 동작을 설명하기 위한 도면이다.FIG. 3B is a diagram for explaining an operation of determining intra-block coefficient groups (sub-blocks) and an operation performed for each coefficient group according to another embodiment.
비디오 복호화 장치(100)는 현재 블록(350)에서 정방향의 소정의 스캔 순서(355)에 따라 K(K는 양의 정수)개의 변환 계수 픽셀마다 계수 그룹을 결정할 수 있다. 비디오 복호화 장치(100)는 K개의 변환 계수 픽셀을 포함하는 계수 그룹을 결정할 수 있다. 예를 들어, 도 3b에 도시된 바와 같이, 비디오 복호화 장치(100)는 16개의 픽셀마다 계수 그룹(360)을 결정할 수 있다.The video decoding apparatus 100 can determine a coefficient group for each of K (K is a positive integer) conversion coefficient pixels according to a predetermined scanning order 355 in the current block 350 in the forward direction. The video decoding apparatus 100 may determine a coefficient group including K transform coefficient pixels. For example, as shown in FIG. 3B, the video decoding apparatus 100 may determine the coefficient group 360 for every 16 pixels.
비디오 복호화 장치(100)는 계수 그룹(360)마다 적어도 하나의 유효 변환 계수에 대한 부호(Sign)가 숨겨져 있다고 결정하고, 계수 그룹(360)마다 적어도 하나의 유효 변환 계수에 대한 부호(Sign)가 숨겨져 있다고 결정할 수 있다. 예를 들어, 비디오 복호화 장치(100)는 현재 계수 그룹 내 이전에 복호화된 유효 변환 계수들의 거리에 기초하여 현재 계수 그룹에 대하여 적어도 하나의 유효 변환 계수에 대한 부호(Sign)가 숨겨져 있다고 결정할 수 있다. 구체적으로, 비디오 복호화 장치(100)는 소정의 역방향 스캔 순서에 따라 스캔된 최초 유효 변환 계수 및 최종 유효 변환 계수 간의 거리에 기초하여 현재 계수 그룹에 대하여 적어도 하나의 유효 변환 계수에 대한 부호(Sign)가 숨겨져 있다고 결정할 수 있다. 이때, 거리는 역방향의 스캔 순서에 따라 스캔되는 계수의 위치의 차이일 수 있다.The video decoding apparatus 100 determines that a sign for at least one effective transform coefficient is hidden for every coefficient group 360 and a sign for at least one effective transform coefficient for each coefficient group 360 is You can decide that it is hidden. For example, the video decoding apparatus 100 can determine that a sign (Sign) for at least one effective transform coefficient is hidden for the current coefficient group based on the distance of previously decoded effective transform coefficients in the current coefficient group . Specifically, the video decoding apparatus 100 encodes a sign for at least one effective transform coefficient for the current coefficient group based on the distance between the first effective transform coefficient and the last valid transform coefficient scanned in a predetermined reverse scan order, Can be determined to be hidden. In this case, the distance may be a difference in the positions of the coefficients scanned in the reverse scan order.
예를 들어 비디오 복호화 장치(100)는 소정의 역방향 스캔 순서에 따라 스캔된 최초 유효 변환 계수 및 최종 유효 변환 계수 간의 거리가 소정의 값보다 큰 경우 현재 계수 그룹에 대하여 적어도 하나의 유효 변환 계수에 대한 부호(Sign)가 숨겨져 있다고 결정할 수 있다. 이때, 소정의 값은 다양한 정수값일 수 있다. 예를 들어, 소정의 값은 3일 수 있다.For example, when the distance between the first effective conversion coefficient and the last effective conversion coefficient scanned according to a predetermined reverse scan order is greater than a predetermined value, the video decoding apparatus 100 may determine It can be determined that the sign is hidden. At this time, the predetermined value may be various integer values. For example, the predetermined value may be three.
비디오 복호화 장치(100)는 현재 계수 그룹에 대하여 적어도 하나의 유효 변환 계수에 대한 부호(Sign)가 숨겨져 있다고 결정되면, 현재 계수 그룹에 대하여 비트스트림으로부터 부호에 관한 정보의 획득없이 현재 계수 그룹 내 적어도 하나의 유효 변환 계수에 대해 숨겨진 부호를 복원할 수 있다. 예를 들어, 비디오 복호화 장치(100)는 현재 계수 그룹 내 유효 변환 계수들의 레벨에 대한 패리티 합(parity sum)이 홀수 또는 짝수인 경우, 적어도 하나의 유효 변환 계수에 관한 부호를 0 또는 1로 결정할 수 있다. 이때, 복원되는 유효 변환 계수의 부호는 역방향의 스캔 순서에 따라 스캔되는 최종 유효 변환 계수에 관한 부호를 포함할 수 있다. 다만, 이에 제한되지 않고, 소정의 스캔 순서에 따라 계수 그룹 내 소정의 위치에 있는 부호를 복원할 수 있음을 당업자는 용이하게 이해할 수 있다.If it is determined that the sign for at least one effective transform coefficient is hidden for the current coefficient group, the video decoding apparatus 100 determines whether or not the current coefficient group includes at least A hidden code for one effective transform coefficient can be restored. For example, when the parity sum with respect to the level of the effective transform coefficients in the current coefficient group is odd or even, the video decoding apparatus 100 determines the sign of at least one effective transform coefficient as 0 or 1 . At this time, the sign of the effective transform coefficient to be reconstructed may include a sign related to the final effective transform coefficient scanned in the reverse scan order. However, it is easily understood by those skilled in the art that a code at a predetermined position in a coefficient group can be restored according to a predetermined scanning order without being limited thereto.
비디오 복호화 장치(100)는 역방향의 소정 스캔 순서에 따라 비트스트림으로부터 해당 계수 그룹에 관한 정보를 획득하고, 해당 계수 그룹에 관한 정보가 계수 그룹에 적어도 하나의 변환 계수를 포함함을 나타내는 경우, 해당 계수 그룹 내 변환 계수에 관한 정보를 스캔할 수 있다. 해당 계수 그룹에 관한 정보가 계수 그룹에 0의 값을 갖는 변환 계수만을 포함함을 나타내는 경우, 해당 계수 그룹 내 변환 계수를 모두 0으로 결정할 수 있다.The video decoding apparatus 100 acquires information on the coefficient group from the bitstream according to a predetermined scanning order in the reverse direction and when the information on the coefficient group indicates that the coefficient group includes at least one transform coefficient, Information about the transform coefficient in the coefficient group can be scanned. When the information on the coefficient group indicates that the coefficient group includes only the transform coefficient having a value of 0, all of the transform coefficients in the coefficient group can be determined as 0.
한편, 현재 블록(300) 내 사각형 스캔 영역에 포함된 변환 계수의 개수가 K개의 정수배가 아닌 경우, 정방향의 스캔 순서에 따라 마지막에 위치하는 계수 그룹을 결정하는 과정에서 K개보다 적은 개수의 변환 계수 픽셀이 존재할 수 있다. 이 경우, 비디오 복호화 장치(100)는 K개보다 적은 개수의 변환 계수 픽셀을 포함하는 계수 그룹(365)을 결정할 수 있다. 예를 들어, 도 3b에 도시된 바와 같이, 비디오 복호화 장치(100)는 2개의 변환 계수를 포함하는 계수 그룹(365)를 결정할 수 있다.If the number of transform coefficients included in the square scan region in the current block 300 is not K integer times, the process of determining the last coefficient group according to the forward scan order may perform a smaller number of transforms A coefficient pixel may be present. In this case, the video decoding apparatus 100 may determine a coefficient group 365 that includes fewer than K number of conversion coefficient pixels. For example, as shown in FIG. 3B, the video decoding apparatus 100 may determine a coefficient group 365 including two transform coefficients.
비디오 복호화 장치(100)는 비트스트림으로부터 계수 그룹(355, 360)에 관한 정보를 획득할 수 있다. 여기서, 계수 그룹(355,360)에 관한 정보는 계수 그룹(355,360)에 포함된 변환 계수들 중 적어도 하나가 유효 변환 계수인지 또는 계수 그룹(355,360)에 0인 변환 계수들만 포함하는지를 나타내는 플래그 정보(유효 계수 그룹 플래그 정보)일 수 있다.The video decoding apparatus 100 can obtain information on the coefficient groups 355 and 360 from the bitstream. Here, the information on the coefficient groups 355 and 360 includes flag information indicating whether at least one of the conversion coefficients included in the coefficient groups 355 and 360 is an effective conversion coefficient or only conversion coefficients whose coefficient groups 355 and 360 are 0 Group flag information).
한편, 비디오 복호화 장치(100)는 1개의 변환 계수만을 포함하는 계수 그룹이 결정된다면, 비트스트림으로부터 해당 계수 그룹에 관한 정보(예를 들어, 유효 계수 그룹 플래그 정보)를 획득하지 않고, 1개의 변환 계수에 관한 정보을 획득할 수 있다.On the other hand, if the coefficient group including only one transform coefficient is determined, the video decoding apparatus 100 does not acquire information (for example, effective coefficient group flag information) about the coefficient group from the bitstream, Information about the coefficient can be obtained.
비디오 복호화 장치(100)는 역방향의 소정의 스캔 순서(355)에 따라 현재 계수 그룹보다 이전에 스캔된 계수 그룹의 계수 그룹에 관한 정보를 기초로 현재 계수 그룹에 관한 정보를 이진 산술 복호화하기 위한 컨텍스트 모델을 결정할 수 있다.The video decoding apparatus 100 generates a context for binary arithmetic decoding information on the current coefficient group on the basis of the information on the coefficient group of the coefficient group scanned earlier than the current coefficient group according to the predetermined scanning order 355 in the reverse direction The model can be determined.
도 4는 일 실시예에 따라서 변환 계수에 관한 정보를 컨텍스트 기반 이진 산술 부복호화하기 위한 컨텍스트 모델을 결정하는 과정을 설명하기 위한 도면이다.FIG. 4 is a diagram for explaining a process of determining a context model for decoding context-based binary arithmetic decoding information on transform coefficients according to an exemplary embodiment of the present invention.
도 4를 참조하면, 비디오 복호화 장치(100)는 현재 스캔되는 변환 계수 픽셀(405)에 관한 정보의 컨텍스트 모델을 주변 변환 계수 픽셀들(410)에 기초하여 결정할 수 있다. 도 4에서, 주변 변환 계수 픽셀들(405)은 현재 스캔되는 변환 계수 픽셀(405)의 우측 또는 하측의 소정의 위치에 존재하는 5개의 픽셀일 수 있다. 다만 이에 제한되지 않고, 주변 변환 계수 픽셀들(405)이 우측 또는 하측의 소정의 위치에 존재하는 n(n은 양의 정수)개의 픽셀일 수 있음을 당업자는 용이하게 이해할 수 있다.Referring to FIG. 4, the video decoding apparatus 100 may determine a context model of the information about the currently scanned transform coefficient pixel 405 based on the transform coefficient pixels 410. FIG. In FIG. 4, the neighboring transform coefficient pixels 405 may be five pixels existing at a predetermined position on the right side or the lower side of the currently scanned transform coefficient pixel 405. It is easily understood by those skilled in the art that the peripheral transformation coefficient pixels 405 may be n (n is a positive integer) pixels existing at a predetermined position on the right side or the lower side, without limitation thereto.
예를 들어, 비디오 복호화 장치(100)는 현재 스캔되는 변환 계수 픽셀(405)의 레벨 절대값이 0보다 큰지를 나타내는 플래그 정보의 컨텍스트 모델을 주변 변환 계수 픽셀들(410) 중 레벨 절대값이 0보다 큰 계수 픽셀들의 개수에 기초하여 결정할 수 있다.For example, the video decoding apparatus 100 may compare the context model of the flag information indicating whether the level absolute value of the currently scanned conversion coefficient pixel 405 is greater than 0, Can be determined based on the number of larger coefficient pixels.
또한, 비디오 복호화 장치(100)는 현재 스캔되는 변환 계수 픽셀(405)의 레벨 절대값이 1보다 큰지를 나타내는 플래그 정보의 컨텍스트 모델을 주변 변환 계수 픽셀들(410) 중 절대값이 1보다 큰 계수 픽셀들의 개수에 기초하여 결정할 수 있다The video decoding apparatus 100 further includes a context model of flag information indicating whether the level absolute value of the currently scanned conversion coefficient pixel 405 is greater than 1, Can be determined based on the number of pixels
비디오 복호화 장치(100)는 현재 스캔되는 변환 계수 픽셀(405)의 레벨 절대값이 2보다 큰지를 나타내는 플래그 정보의 컨텍스트 모델을 주변 변환 계수 픽셀들(410) 중 절대값이 2보다 큰 계수 픽셀들의 개수에 기초하여 결정할 수 있다.The video decoding apparatus 100 converts the context model of the flag information indicating whether the level absolute value of the currently scanned conversion coefficient pixel 405 is greater than 2, Can be determined based on the number.
비디오 복호화 장치(100)는 현재 스캔되는 변환 계수 픽셀(405)의 레벨 값이 N(N은 2보다 큰 정수)보다 큰지를 나타내는 플래그 정보의 컨텍스트 모델을 주변 변환 계수 픽셀들(410) 중 절대값이 N보다 큰 계수 픽셀들의 개수에 기초하여 결정할 수 있다.The video decoding apparatus 100 converts the context model of the flag information indicating whether the level value of the currently scanned conversion coefficient pixel 405 is larger than N (N is an integer larger than 2) Can be determined based on the number of coefficient pixels larger than N. [
비디오 복호화 장치(100)는 현재 스캔 되는 변환 계수 픽셀(405)의 잔여 레벨 절대값을 이진화하기 위한 파라메터를 주변 변환 계수 픽셀들(410)의 레벨 절대값의 합을 기초로 결정할 수 있다. 이때, 이진화 파라메터는 라이스 파라메터일 수 있다.The video decoding apparatus 100 may determine a parameter for binarizing the residual level absolute value of the currently scanned conversion coefficient pixel 405 based on the sum of the absolute level values of the peripheral conversion coefficient pixels 410. [ At this time, the binarization parameter may be a Rice parameter.
도 5는 일 실시예에 따라서 변환 계수에 관한 정보를 컨텍스트 기반 이진 산술 부복호화하기 위한 컨텍스트 모델을 결정하는 과정을 설명하기 위한 도면이다.FIG. 5 is a diagram for explaining a process of determining a context model for decoding context-based binary arithmetic decoding information on transform coefficients according to an embodiment.
도 5를 참조하면, 비디오 복호화 장치(100)는 현재 스캔되는 변환 계수 픽셀(505)에 관한 정보의 컨텍스트 모델을 소정의 역방향 스캔 순서(515)에 따라 이전에 스캔된 변환 계수 픽셀들(510)에 기초하여 결정할 수 있다. 도 5에 도시된 바와 같이, 변환 계수 픽셀들(510)은 현재 스캔되는 변환 계수 픽셀(505)보다 소정의 역반향 스캔 순서(515)에 따라 이전에 스캔된 5개의 픽셀일 수 있다. 다만 이에 제한되지 않고, 변환 계수 픽셀들(505)이 소정의 역반향 스캔 순서(515)에 따라 이전에 스캔된 n(n은 양의 정수)개의 픽셀일 수 있음을 당업자는 용이하게 이해할 수 있다. 도 5에 도시된 바와 같이 소정의 역방향 스캔 순서(515)는 역방향의 지그재그 스캔 순서일 수 있으나, 이에 제한되지 않고, 수평 스캔 순서, 수직 스캔 순서, 대각 스캔 순서 등을 포함할 수 있음을 당업자는 용이하게 이해할 수 있다. 특히, 소정의 역방향 스캔 순서는 스캔 영역을 특정하는 수평 방향 좌표 값의 크기 및 수직방향 좌표 값의 크기에 기초하여 복수의 스캔 순서 중 하나로 결정될 수 있다.5, the video decoding apparatus 100 transmits a context model of information on the currently scanned transform coefficient pixel 505 to previously scanned transform coefficient pixels 510 according to a predetermined reverse scan sequence 515, . ≪ / RTI > As shown in FIG. 5, the transform coefficient pixels 510 may be five pixels previously scanned according to a predetermined reverse echo scan order 515 than the currently scanned transform coefficient pixel 505. Those skilled in the art will readily understand that the transform coefficient pixels 505 may be n (n is a positive integer) pixels previously scanned in accordance with a given reverse echo scan order 515 . As shown in FIG. 5, the predetermined reverse scan order 515 may be a reverse zigzag scan order, but the present invention is not limited thereto. For example, those skilled in the art can understand that the reverse scan order 515 includes a horizontal scan order, a vertical scan order, It can be easily understood. In particular, the predetermined reverse scan order may be determined in one of a plurality of scan orders based on the magnitude of the horizontal direction coordinate value specifying the scan region and the vertical direction coordinate value.
예를 들어, 비디오 복호화 장치(100)는 현재 스캔되는 변환 계수 픽셀(505)의 레벨 절대값이 0보다 큰지를 나타내는 플래그 정보의 컨텍스트 모델을 주변 변환 계수 픽셀들(510) 중 절대값이 0보다 큰 계수 픽셀들의 개수에 기초하여 결정할 수 있다.For example, the video decoding apparatus 100 may compare the context model of the flag information, which indicates whether the level absolute value of the currently scanned conversion factor pixel 505 is greater than 0, Can be determined based on the number of large coefficient pixels.
또한, 비디오 복호화 장치(100)는 현재 스캔되는 변환 계수 픽셀(505)의 레벨 절대값이 1보다 큰지를 나타내는 플래그 정보의 컨텍스트 모델을 변환 계수 픽셀들(510) 중 절대값이 1보다 큰 계수 픽셀들의 개수에 기초하여 결정할 수 있다.The video decoding apparatus 100 further includes a context model of flag information indicating whether the level absolute value of the currently scanned conversion coefficient pixel 505 is greater than 1, As shown in FIG.
비디오 복호화 장치(100)는 현재 스캔되는 변환 계수 픽셀(505)의 레벨 절대값이 2보다 큰지를 나타내는 플래그 정보의 컨텍스트 모델을 주변 변환 계수 픽셀들(510) 중 절대값이 2보다 큰 계수 픽셀들의 개수에 기초하여 결정할 수 있다.The video decoding apparatus 100 converts the context model of the flag information indicating whether the level absolute value of the currently scanned conversion coefficient pixel 505 is larger than 2, Can be determined based on the number.
비디오 복호화 장치(100)는 현재 스캔되는 변환 계수 픽셀(505)의 레벨 절대값이 N(N은 2보다 큰 정수)보다 큰지를 나타내는 플래그 정보의 컨텍스트 모델을 주변 변환 계수 픽셀들(510) 중 절대값이 N보다 큰 계수 픽셀들의 개수에 기초하여 결정할 수 있다.The video decoding apparatus 100 transmits a context model of flag information indicating whether the level absolute value of the currently scanned conversion coefficient pixel 505 is larger than N (N is an integer larger than 2) The value can be determined based on the number of coefficient pixels larger than N. [
비디오 복호화 장치(100)는 현재 스캔 되는 변환 계수 픽셀(505)의 잔여 레벨 절대값을 이진화하기 위한 파라메터를 주변 변환 계수 픽셀들(510)의 절대값 레벨의 합을 기초로 결정할 수 있다. 이때, 이진화 파라메터는 라이스 파라메터일 수 있다.The video decoding apparatus 100 may determine a parameter for binarizing the residual level absolute value of the currently scanned transform coefficient pixel 505 based on the sum of the absolute value levels of the neighboring transform coefficient pixels 510. [ At this time, the binarization parameter may be a Rice parameter.
도 6a는 일 실시예에 따라서 블록 내 유효 변환 계수에 관한 정보를 스캔하기 위한 지그재그 스캔 순서를 설명하기 위한 도면이다.FIG. 6A is a diagram for explaining a zigzag scanning order for scanning information on effective conversion coefficients in a block according to an exemplary embodiment. Referring to FIG.
도 6a를 참조하면, 비디오 복호화 장치(100)는 현재 블록(600)의 변환 계수에 관한 정보를 스캔하기 위해 지그재그 스캔 순서(605)에 따라 현재 블록(600)의 우측 하단의 변환 계수 픽셀로부터 좌측 상단의 변환 계수 픽셀까지 스캔할 수 있다.Referring to FIG. 6A, the video decoding apparatus 100 scans the information on the transform coefficient of the current block 600 from the transform coefficient pixel of the lower right end of the current block 600 according to a zigzag scan sequence 605, You can scan up to the conversion factor pixel at the top.
구체적으로, 지그재그 스캔 순서(605)에 의하면, 비디오 복호화 장치(100)는 우측 하단의 변환 계수 픽셀(610)을 스캔한 후에 픽셀(610)의 좌측 픽셀(615)을 스캔하고, 픽셀(615)을 스캔한 후에 우측 상단의 대각선 방향에 위치하는 픽셀(620)을 스캔한다. 비디오 복호화 장치(100)는 픽셀(620)의 상측에 인접하는 픽셀(625)을 스캔한다. 비디오 복호화 장치(100)는 픽셀의 좌측 하단의 대각선 방향에 위치하는 픽셀들(630)을 스캔한다. 비디오 복호화 장치(100)는 픽셀들(630) 중 현재 블록(600)의 경계에 인접하는 픽셀의 좌측에 위치하는 픽셀(635)을 스캔한다. 이와 유사한 방식으로, 지그재그 스캔 순서(605)에 따라 비디오 복호화 장치(100)는 나머지 변환 계수 픽셀들에 관한 정보를 스캔할 수 있다.Specifically, in accordance with the zigzag scan sequence 605, the video decoding apparatus 100 scans the lower-left conversion coefficient pixel 610, then scans the left pixel 615 of the pixel 610, The pixel 620 positioned in the diagonal direction of the upper right corner is scanned. The video decoding apparatus 100 scans the pixel 625 adjacent to the upper side of the pixel 620. [ The video decoding apparatus 100 scans the pixels 630 located in the diagonal direction of the lower left corner of the pixel. The video decoding apparatus 100 scans the pixel 635 located on the left of the pixel adjacent to the boundary of the current block 600 among the pixels 630. [ In a similar manner, the video decoding apparatus 100 may scan information on the remaining transform coefficient pixels according to the zigzag scan sequence 605. [
한편, 일 실시예에 따른 지그재그 스캔 순서(605)는 픽셀(610)을 스캔한 후에 바로 수평 방향에 위치하는 좌측 방향 픽셀(615)을 스캔하므로, 지그재그 스캔 순서(605)를 수평 우선 지그재그 순서라고 칭할 수 있다.Meanwhile, since the zigzag scan sequence 605 according to an exemplary embodiment of the present invention scans the left directional pixel 615 located in the horizontal direction immediately after the pixel 610 is scanned, the zigzag scan sequence 605 is referred to as a horizontal priority zigzag sequence Can be called.
도 6b는 다른 실시예에 따라서 블록 내 변환 계수에 관한 정보를 스캔하기 위한 지그재그 스캔 순서를 설명하기 위한 도면이다.FIG. 6B is a diagram for explaining a zigzag scanning order for scanning information on intra-block transform coefficients according to another embodiment.
도 6b를 참조하면, 비디오 복호화 장치(100)는 현재 블록(600)의 변환 계수에 관한 정보를 스캔하기 위해 지그재그 스캔 순서(635)에 따라 현재 블록(600)의 우측 하단의 변환 계수 픽셀로부터 좌측 상단의 변환 계수 픽셀까지 스캔할 수 있다.6B, the video decoding apparatus 100 scans the information on the transform coefficient of the current block 600 from the transform coefficient pixel of the lower right end of the current block 600 according to the zigzag scan sequence 635, You can scan up to the conversion factor pixel at the top.
구체적으로, 지그재그 스캔 순서(635)에 의하면, 비디오 복호화 장치(100)는 우측 하단의 변환 계수 픽셀(645)을 스캔한 후에 픽셀(645)의 상측 픽셀(650)을 스캔하고, 픽셀(650)을 스캔한 후에 좌측 하단의 대각선 방향에 위치하는 픽셀(655)을 스캔한다. 비디오 복호화 장치(100)는 픽셀(655)의 좌측에 인접하는 픽셀(660)을 스캔한다. 비디오 복호화 장치(100)는 픽셀의 우측 상단의 대각선 방향에 위치하는 픽셀들(665)을 스캔한다. 비디오 복호화 장치(100)는 픽셀들(665) 중 현재 블록(500)의 경계에 인접하는 픽셀의 상측에 위치하는 픽셀(670)을 스캔한다. 이와 유사한 방식으로, 지그재그 스캔 순서(605)에 따라 비디오 복호화 장치(100)는 나머지 변환 계수 픽셀들에 관한 정보를 스캔할 수 있다.Specifically, in the zigzag scan order 635, the video decoding apparatus 100 scans the upper right pixel 650 of the pixel 645 after scanning the lower right conversion coefficient pixel 645, And then scans the pixel 655 located in the lower left diagonal direction. The video decoding apparatus 100 scans a pixel 660 adjacent to the left side of the pixel 655. [ The video decoding apparatus 100 scans the pixels 665 positioned in the diagonal direction of the upper right corner of the pixel. The video decoding apparatus 100 scans the pixel 670 located above the pixel of the pixels 665 adjacent to the boundary of the current block 500. [ In a similar manner, the video decoding apparatus 100 may scan information on the remaining transform coefficient pixels according to the zigzag scan sequence 605. [
한편, 일 실시예에 따른 지그재그 스캔 순서(605)는 픽셀(645)을 스캔한 후에 바로 수직 방향에 위치하는 상측 방향 픽셀(650)을 스캔하므로, 지그재그 스캔 순서(605)를 수직 우선 지그재그 순서라고 칭할 수 있다.Meanwhile, the zigzag scan sequence 605 according to an exemplary embodiment of the present invention scans an upward direction pixel 650 positioned in a vertical direction immediately after the scan of the pixel 645, so that the zigzag scan sequence 605 is referred to as a vertical priority zigzag sequence Can be called.
도 7a는 일 실시예에 따라서 블록 내 변환 계수에 관한 정보를 스캔하기 위한 수평 스캔 순서를 설명하기 위한 도면이다.FIG. 7A is a diagram for explaining a horizontal scanning order for scanning information on intra-block transform coefficients according to an embodiment.
도 7a를 참조하면, 비디오 복호화 장치(100)는 현재 블록(700)의 변환 계수에 관한 정보를 스캔하기 위해 수평 스캔 순서(705)에 따라 현재 블록(700)의 우측 하단의 변환 계수 픽셀로부터 좌측 상단의 변환 계수 픽셀까지 스캔할 수 있다.7A, the video decoding apparatus 100 scans information on the transform coefficient of the current block 700 from the transform coefficient pixel of the lower right end of the current block 700 according to the horizontal scan order 705, You can scan up to the conversion factor pixel at the top.
구체적으로, 수평 스캔 순서(705)에 의하면, 비디오 복호화 장치(100)는 우측 하단의 변환 계수 픽셀(710)을 스캔한 후에 수평 방향인 좌측 방향에 위치하는 픽셀들(715)을 순차적으로 스캔하고, 픽셀들(715) 중 현재 블록(700)의 좌측 경계에 인접하는 픽셀을 스캔한 후에 바로 위에 있는 행의 가장 우측 픽셀(720)을 스캔한다. 비디오 복호화 장치(100)는 이전 행의 픽셀들(715)을 스캔한 것과 같은 방식으로 수평방향인 좌측 방향에 위치하는 픽셀들(725)을 스캔한다. 이와 유사한 방식으로, 수평 스캔 순서(605)에 따라 비디오 복호화 장치(100)는 나머지 변환 계수 픽셀들에 관한 정보를 스캔할 수 있다.Specifically, in the horizontal scanning order 705, the video decoding apparatus 100 sequentially scans the pixels 715 positioned in the horizontal direction, which is the horizontal direction, after scanning the conversion coefficient pixel 710 at the lower right end And scans the pixels of the pixels 715 adjacent to the left boundary of the current block 700 and then scans the rightmost pixel 720 of the immediately above row. The video decoding apparatus 100 scans the pixels 725 located in the leftward direction in the horizontal direction in the same manner as the pixels of the previous row 715 are scanned. In a similar manner, the video decoding apparatus 100 may scan information on the remaining transform coefficient pixels according to the horizontal scan order 605. [
도 7b는 일 실시예에 따라서 블록 내 변환 계수에 관한 정보를 스캔하기 위한 수직 스캔 순서를 설명하기 위한 도면이다. FIG. 7B is a diagram for explaining a vertical scanning order for scanning information on intra-block transform coefficients according to an embodiment.
도 7b를 참조하면, 비디오 복호화 장치(100)는 현재 블록(700)의 변환 계수에 관한 정보를 스캔하기 위해 수직 스캔 순서(730)에 따라 현재 블록(700)의 우측 하단의 변환 계수 픽셀로부터 좌측 상단의 변환 계수 픽셀까지 스캔할 수 있다.Referring to FIG. 7B, the video decoding apparatus 100 scans information on the transform coefficient of the current block 700 from the transform coefficient pixel of the lower right end of the current block 700 according to the vertical scanning order 730, You can scan up to the conversion factor pixel at the top.
구체적으로, 수직 스캔 순서(730)에 의하면, 비디오 복호화 장치(100)는 우측 하단의 변환 계수 픽셀(735)을 스캔한 후에 수직 방향인 상측 방향에 위치하는 픽셀들(740)을 순차적으로 스캔하고, 픽셀들(740) 중 현재 블록(700)의 상측 경계에 인접하는 픽셀을 스캔한 후에 바로 좌측에 있는 열의 가장 하측 픽셀(745)을 스캔한다. 비디오 복호화 장치(100)는 이전 열의 픽셀들(740)을 스캔한 것과 같은 방식으로 수직방향인 상측 방향에 위치하는 픽셀들(750)을 스캔한다. 이와 유사한 방식으로, 수직 스캔 순서(730)에 따라 비디오 복호화 장치(100)는 나머지 변환 계수 픽셀들에 관한 정보를 스캔할 수 있다.Specifically, according to the vertical scanning order 730, the video decoding apparatus 100 sequentially scans the pixels 740 located in the vertical direction, which is the vertical direction, after scanning the conversion coefficient pixel 735 at the lower right end , A pixel of the pixels 740 that is adjacent to the upper boundary of the current block 700 is scanned, and then the lowermost pixel 745 of the column immediately to the left is scanned. The video decoding apparatus 100 scans the pixels 750 positioned in the vertical direction in the same manner as the pixels 740 of the previous row are scanned. In a similar manner, the video decoding apparatus 100 may scan information about the remaining transform coefficient pixels according to the vertical scan order 730. [
도 8은 일 실시예에 따라서 블록 내 변환 계수에 관한 정보를 스캔하기 위한 대각 스캔 순서를 설명하기 위한 도면이다.8 is a diagram for explaining a diagonal scan order for scanning information on intra-block transform coefficients according to an embodiment.
도 8을 참조하면, 비디오 복호화 장치(100)는 현재 블록(800)의 변환 계수에 관한 정보를 스캔하기 위해 대각 스캔 순서(805)에 따라 현재 블록(800)의 우측 하단의 변환 계수 픽셀로부터 좌측 상단의 변환 계수 픽셀까지 스캔할 수 있다.8, the video decoding apparatus 100 reads the transform coefficients of the current block 800 from the transform coefficient pixels of the lower right end of the current block 800 according to the diagonal scan order 805 to scan information on the transform coefficients of the current block 800, You can scan up to the conversion factor pixel at the top.
구체적으로, 대각 스캔 순서(805)에 의하면, 비디오 복호화 장치(100)는 우측 하단의 변환 계수 픽셀(810)을 스캔한 후에 픽셀(810)의 상측 픽셀(815)을 스캔하고, 픽셀(815)을 스캔한 후에 좌측 하단의 대각선 방향에 위치하는 픽셀(820)을 스캔한다. 비디오 복호화 장치(100)는 픽셀(815)의 상측에 인접하는 픽셀(825)을 스캔한다. 비디오 복호화 장치(100)는 픽셀(825)의 좌측 하단의 대각선 방향에 위치하는 픽셀들(830)을 스캔한다. 이와 유사한 방식으로, 대각 스캔 순서(805)에 따라 비디오 복호화 장치(100)는 나머지 변환 계수 픽셀들에 관한 정보를 스캔할 수 있다.Specifically, in the diagonal scan order 805, the video decoding apparatus 100 scans the upper right pixel 810 of the pixel 810 after scanning the lower right conversion coefficient pixel 810, And then scans the pixel 820 located in the lower left diagonal direction. The video decoding apparatus 100 scans the pixel 825 adjacent to the upper side of the pixel 815. [ The video decoding apparatus 100 scans the pixels 830 positioned in the diagonal direction of the lower left end of the pixel 825. [ In a similar manner, the video decoding apparatus 100 may scan information on the remaining transform coefficient pixels according to the diagonal scan sequence 805. [
이상 도 6a 내지 도 8을 참조하여, 블록 내 유효 변환 계수에 관한 정보를 스캔하기 위한 다양한 스캔 순서를 설명하였다. 도 6a 내지 도 8을 참조하여 설명한 스캔 순서들은 역방향의 스캔 순서나, 이에 제한되지 않고 당업자는 역방향의 스캔 순서의 반대 순서로 스캔하는 정방향의 스캔 순서를 용이하게 이해할 수 있다.6A to 8, various scan sequences for scanning information on effective conversion coefficients in a block have been described. The scan orders described with reference to FIGS. 6A to 8 can be easily understood in a reverse scan order, or a forward scan order in which a person skilled in the art scans in the reverse order of the reverse scan order.
도 9a 내지 9c는 일 실시예에 따른 레지듀얼 부호화 신택스 구조를 설명하기 위한 도면이다.9A to 9C are diagrams for explaining a residual coding syntax structure according to an embodiment.
도 9a 내지 9c를 참조하면, 비디오 복호화 장치(100)는 변환 계수를 복원하기 위해 변환 계수에 관한 신택스 엘리먼트 정보를 스캔하고, 스캔된 신택스 엘리먼트 정보를 기초로 변환 계수를 복호화할 수 있다.9A to 9C, the video decoding apparatus 100 may scan the syntax element information about the transform coefficients to recover the transform coefficients, and may decode the transform coefficients based on the scanned syntax element information.
먼저, 비디오 복호화 장치(100)는 사각형 스캔 영역을 특정하기 위한 좌표를 나타내는 신택스 엘리먼트 정보 scan_region_x 및 scan_region_y를 비트스트림으로부터 획득할 수 있다. 이때, 신택스 엘리먼트 정보 scan_region_x는 현재 블록의 좌상측 모서리 좌표를 기준으로 현재 블록 내 가장 우측에 위치하는 유효 변환 계수의 수평방향(x축 방향) 좌표의 값을 나타낼 수 있고, 신택스 엘리먼트 정보 scan_region_y는 현재 블록의 좌상측 모서리 좌표를 기준으로 현재 블록 내 가장 하측에 위치하는 유효 변환 계수의 수직방향(y축 방향) 좌표의 값을 나타낼 수 있다. 비디오 복호화 장치(100)는 신택스 엘리먼트 정보scan_region_x 및 scan_region_y에 기초하여 스캔 영역을 특정하기 위한 좌표srX 및 srY를 결정할 수 있다.First, the video decoding apparatus 100 may obtain syntax element information scan_region_x and scan_region_y indicating coordinates for specifying a quadrangular scan region from a bitstream. At this time, the syntax element information scan_region_x may indicate the value of the horizontal direction (x-axis direction) coordinate of the effective transformation coefficient located at the rightmost position in the current block with reference to the upper left corner coordinate of the current block, and the syntax element information scan_region_y indicates (Y-axis direction) coordinate of the effective transformation coefficient located at the lowermost position in the current block with reference to the upper left corner coordinate of the block. The video decoding apparatus 100 can determine the coordinates srX and srY for specifying the scan area based on the syntax element information scan_region_x and scan_region_y.
비디오 복호화 장치(100)는 스캔 영역을 특정하기 위한 좌표 srX 및 srY에 기초하여 스캔 순서에 따라 결정되는 스캔 영역 내 변환 계수들의 스캔 순위 (ScanOrder(srX+1,srY+1))를 결정할 수 있다.The video decoding apparatus 100 can determine the scan order (ScanOrder (srX + 1, srY + 1)) of the intra-scan transform coefficients determined according to the scan order based on the coordinates srX and srY for specifying the scan region .
비디오 복호화 장치(100)는 스캔 영역을 특정하기 위한 좌표 srX 및 srY에 기초하여 정방향의 스캔 순서상 마지막에 스캔되는 계수 그룹을 나타내는 인덱스 정보(lastSet)를 결정할 수 있다. 즉, 비디오 복호화 장치(100)는 스캔 영역의 크기값인 (srX+1)*(srY+1)) -1 한 값을 4만큼 우측으로 비트쉬프트하는 연산(>>4)을 수행하여 마지막에 스캔되는 계수 그룹의 인덱스 정보(lastSet)를 결정할 수 있다. 즉, 4만큼 우측으로 쉬프트 하는 연산의 출력 값은 16만큼 나누는 연산에 따라 결정된 몫과 동일할 수 있다. 즉, 비디오 복호화 장치(100)는 16개의 변환 계수마다 하나의 계수 그룹을 결정하게 되므로, 스캔 영역에서 스캔되는 총 변환 계수를 16으로 나누게 되면 총 계수 그룹의 수(또는 정방향의 스캔 순서상 마지막에 스캔되는 계수 그룹을 나타내는 인덱스 값에 1을 더한 값)가 결정될 수 있다.The video decoding apparatus 100 may determine index information (lastSet) indicating a coefficient group to be scanned last in a forward scan order based on the coordinates srX and srY for specifying a scan region. That is, the video decoding apparatus 100 performs an operation (" 4 ") for bit-shifting the value of (srX + 1) * (srY + The index information (lastSet) of the coefficient group to be scanned can be determined. That is, the output value of the right shifting operation by 4 can be the same as the quotient determined by dividing by 16. That is, since the video decoding apparatus 100 determines one coefficient group for every 16 transform coefficients, if the total transform coefficient scanned in the scan region is divided by 16, the number of total coefficient groups (or the end of the forward scan order) A value obtained by adding 1 to an index value indicating a group of scanned coefficients) can be determined.
비디오 복호화 장치(100)는 스캔 영역을 특정하기 위한 좌표 srX 및 srY에 기초하여 정방향의 스캔 순서상 마지막 스캔되는 계수의 위치(lastScanPos)를 결정하고, 현재 변환 계수의 위치(Pos)를 정방향의 스캔 순서상 마지막 스캔되는 계수의 위치(lastScanPos)로 결정할 수 있다.The video decoding apparatus 100 determines the position (lastScanPos) of the last scanned coefficient in the forward scan order based on the coordinates srX and srY for specifying the scan region and sets the position Pos of the current transformation coefficient as the forward scan The position of the last scanned coefficient in the sequence (lastScanPos) can be determined.
비디오 복호화 장치(100)는 i를 lastset으로 초기화하고, i가 0보다 큰 경우 i를 1만큼 감소시키고, 반복문(for문)(905)에 포함된 동작을 수행할 수 있다. 비디오 복호화 장치(100)는 0보다 작은 값이 될때까지 반목문(for문)(905)에 포함된 동작을 수행할 수 있다. 이때, i는 계수 그룹을 나타내는 인덱스일 수 있다. 즉, 비디오 복호화 장치(100)는 반복문(for문)(905)에 포함된 동작을 한번 수행할 때마다 하나의 계수 그룹에 대한 동작을 수행할 수 있다.The video decoding apparatus 100 may initialize i to last set, reduce i by 1 if i is greater than 0, and perform the operations included in the loop statement (for statement) 905. [ The video decoding apparatus 100 may perform the operations included in the for-statement (for statement) 905 until the value becomes less than zero. In this case, i may be an index indicating a coefficient group. That is, the video decoding apparatus 100 may perform an operation on one coefficient group every time the operation included in the loop statement (for statement) 905 is performed.
비디오 복호화 장치(100)는 i에 16을 곱하는 동작(i<<4)을 수행하여setPos를 결정할 수 있다. setPos는 변환 그룹의 첫번째에 위치하는 변환 계수의 인덱스 정보를 나타낼 수 있다.The video decoding apparatus 100 can determine the setPos by performing an operation (i << 4) of multiplying i by 16. setPos can represent the index information of the transform coefficient located at the first position of the transform group.
비디오 복호화 장치(100)는 i가 마지막 계수 그룹인 경우(i==lastSet), n을 lastScanPos에서 setPos를 뺀 값(lastScanPos-setPos)으로 결정하고, 아닌 경우 n을 15로 결정하고, n이 0보다 크거나 같은 경우 i를 1만큼 감소시키고, 반복문(for문)(910)에 포함된 동작을 수행할 수 있다. 비디오 복호화 장치(100)는 0보다 작은 값이 될때까지 반목문(for문)(910)에 포함된 동작(sig_flag 관련 동작)을 수행할 수 있다. 이때, n은 정방향의 스캔 순서에 따른 계수 그룹 내 변환 계수의 위치를 나타내는 인덱스 정보일 수 있다.The video decoding apparatus 100 determines n as 15 (lastScanPos-setPos) obtained by subtracting setPos from lastScanPos when i is the last coefficient group (i == lastSet) If greater than or equal to, i can be reduced by one and the operations contained in the loop statement (for statement) 910 can be performed. The video decoding apparatus 100 can perform the operation (sig_flag related operation) included in the forbidden statement (for statement) 910 until the value becomes less than zero. In this case, n may be index information indicating the position of the transform coefficient in the coefficient group according to the forward scan order.
예를 들어, 스캔 영역에 포함된 총 변환 계수의 개수가 16의 정수배가 아닌 경우, 정방향의 스캔에 따라 마지막에 스캔되는 계수 그룹(i=lastset)에 대한 lastScanPos에서 setPos를 뺀 값은 0보다 크거나 같고 15보다 작거나 같은 값을 갖게 되고, 그 값을 n으로 결정하고 반복문(for문)(910)을 수행할 수 있다. 비디오 복호화 장치(100)는 현재 변환 계수의 위치(blkpos)를 ScanOrder 배열에서 현재 계수 그룹의 첫번째 계수의 위치를 나타내는 인덱스 정보(setPos)에 n을 더한 값으로 결정할 수 있다. ScanOrder 배열은 정방향의 스캔 순서에 따른 변환 계수의 위치를 나타내는 배열일 수 있다.For example, if the total number of transform coefficients included in the scan area is not an integer multiple of 16, the value obtained by subtracting setPos from lastScanPos for the last scanned coefficient group (i = last set) according to the forward scan is greater than zero Or equal to or less than 15, and the value thereof is determined as n, and a loop statement (for statement) 910 can be performed. The video decoding apparatus 100 may determine the position (blkpos) of the current transform coefficient as a value obtained by adding n to the index information (setPos) indicating the position of the first coefficient of the current coefficient group in the ScanOrder array. The ScanOrder array may be an array indicating the position of the transform coefficients according to the forward scan order.
비디오 복호화 장치(100)는 현재 변환 계수의 위치(blkpos) 및 스캔 영역의 너비(width)에 기초하여 현재 스캔되는 수평 방향(x축 방향)의 좌표의 값 sx를 결정할 수 있다. 또한, 비디오 복호화 장치(100)는 현재 복호화되는 변환 계수의 위치(blkpos) 및 스캔 영역의 너비(log2width)에 기초하여 수직 방향(y축 방향)의 좌표의 값 sy를 결정할 수 있다.The video decoding apparatus 100 can determine the value sx of the coordinate in the horizontal direction (x-axis direction) currently scanned based on the position (blkpos) of the current transform coefficient and the width of the scan area. In addition, the video decoding apparatus 100 can determine the value sy of the coordinate in the vertical direction (y-axis direction) based on the position (blkpos) of the transform coefficient to be decoded and the width (log2width) of the scan area.
비디오 복호화 장치(100)는 sx가 0이고, sy가 srY이고, is_last_y가 0인 경우(sx==0 && sy==srY&&is_last_y==0)나, sy가 0이고, sx가 srX이고, is_last_x가 0인 경우(sy==0 && sx==srX&&is_last_x==0), 비디오 복호화 장치(100)는 비트스트림으로부터 현재 변환 계수에 대한 유효 변환 계수 플래그 sig_flag(sig_flag[blkpos])를 획득하지 않고, 현재 변환 계수에 대한 sig_flag의 값을 1로 결정할 수 있다. 여기서 is_last_x는 스캔 영역 내 가장 하측의 행에 포함된 변환 계수들 중 현재 변환 계수보다 이전에 스캔된 변환 계수 중 그 절대값이 0보다 큰 유효 변환 계수가 있었는지를 나타내는 값일 수 있다. is_last_y는 스캔 영역 내 가장 우측의 열에 포함된 변환 계수들 중 현재 변환 계수보다 이전에 스캔된 변환 계수 중 그 절대값이 0보다 큰 유효 변환 계수가 있었는지를 나타내는 값일 수 있다.The video decoding apparatus 100 determines whether sx is 0, sy is srY, is_last_y is 0 (sx == 0 && sy == srY && is_last_y == 0), sy is 0, sx is srX, is_last_x 0), the video decoding apparatus 100 does not acquire the effective conversion coefficient flag sig_flag (sig_flag [blkpos]) for the current conversion coefficient from the bitstream, but does not acquire the current conversion coefficient flag sig_flag (sig_flag [blkpos] The value of sig_flag for the conversion coefficient can be determined as 1. [ Here, is_last_x may be a value indicating whether there is an effective transform coefficient whose absolute value is greater than 0 among the transform coefficients scanned before the current transform coefficient among the transform coefficients included in the lowermost row in the scan area. is_last_y may be a value indicating whether there is an effective transform coefficient whose absolute value is greater than 0 among the transform coefficients included in the rightmost column in the scan area and scanned before the current transform coefficient.
비디오 복호화 장치(100)는 sx가 0이고, sy가 srY이고, is_last_y가 0인 경우(sx==0 && sy==srY&&is_last_y==0)나 sy가 0이고, sx가 srX이고, is_last_x가 0인 경우(sy==0 && sx==srX&&is_last_x==0)가 아니라면, 비트스트림으로부터 현재 복호화되는 변환 계수에 대한 유효 변환 계수 플래그 sig_flag(sig_flag[blkpos])를 획득할 수 있다.The video decoding apparatus 100 determines whether sy is 0, sy is srY, is_last_y is 0 (sx == 0 && sy == srY && is_last_y == 0), sy is 0, sx is srX, is_last_x is 0 , Sig_flag (sig_flag [blkpos]) for the transform coefficient to be currently decoded from the bit stream can be obtained, if not (sy == 0 && sx == srX && is_last_x == 0).
비디오 복호화 장치(100)는 현재 변환 계수의 유효 변환 계수 플래그 sig_flag가 1인 경우에 현재 변환 계수의 x축 방향의 좌표 값 sx이 srX와 같다면(sx==srX), is_last_x를 1로 설정하고, 현재 변환 계수의 y축 방향의 좌표 값 sy이 srY와 같다면(sy==srY), is_last_y를 1로 설정할 수 있다.The video decoding apparatus 100 sets is_last_x to 1 if the coordinate value sx in the x-axis direction of the current transform coefficient is equal to srX (sx == srX) when the effective transform coefficient flag sig_flag of the current transform coefficient is 1 , And if the coordinate value sy in the y-axis direction of the current transformation coefficient is equal to srY (sy == srY), then is_last_y can be set to 1.
또한, 비디오 복호화 장치(100)는 lastSigScanPos가 -1인 경우(즉, 초기값인 경우), lastSigScanPos를 n으로 결정할 수 있다. 즉, 역방향의 스캔 순서 상 계수 그룹의 첫번째 유효 변환 계수가 존재하는 위치를 나타내는 인덱스 n이 lastSigScanPos로 결정되기 때문에 lastSigScanPos는 정방향의 스캔 순서상 계수 그룹 내 마지막으로 유효변환 계수가 존재하는 위치를 나타내는 인덱스 정보일 수 있다. 한편, 비디오 복호화 장치(100)는 firstSigScanPos를 n으로 결정할 수 있다. 현재 변환 계수의 유효 변환 계수 플래그 sig_flag가 1인 경우라면 firstSigScanPos의 값이 계속 현재 변환 계수의 위치를 나타내는 인덱스 정보인 n으로 갱신되기 때문에 최종적으로 특정 계수 그룹 i에 포함된 변환 계수들에 대하여 동작을 수행하게 되면, firstSigScanPos는 정방향의 스캔 순서상 계수 그룹 내 최초 유효 변환 계수가 존재하는 위치를 나타내는 인덱스 정보일 수 있다.In addition, the video decoding apparatus 100 may determine lastSigScanPos to be n if lastSigScanPos is -1 (i.e., initial value). That is, since the index n indicating the position where the first effective transform coefficient of the coefficient group exists in the backward scan order is determined by lastSigScanPos, lastSigScanPos is an index indicating the position where the last valid transform coefficient exists in the forward scan order coefficient group Information. On the other hand, the video decoding apparatus 100 can determine firstSigScanPos as n. If the effective conversion coefficient flag sig_flag of the current conversion coefficient is 1, the value of firstSigScanPos is updated to n, which is the index information indicating the position of the current conversion coefficient, so that the operation is performed on the conversion coefficients included in the specific coefficient group i The firstSigScanPos may be index information indicating a position where the first effective transform coefficient in the forward scan order coefficient group exists.
비디오 복호화 장치(100)는 cnt_nz을 1만큼 증가시킨다. 즉, 현재 블록(또는 스캔 영역) 내 0이 아닌 값을 갖는 계수의 개수를 나타내는 cnt_nz이 현재 변환 계수가 유효 변환 계수일때마다 갱신되게 된다. 또한, 비디오 복호화 장치(100)는 현재 계수 그룹 i 내 0이 아닌 값을 갖는 계수의 개수를 나타내는 cg_nz[i]가 1만큼 증가시킨다. 즉, 현재 계수 그룹 i 내 0이 아닌 값을 갖는 계수의 개수를 나타내는 cg_nz[i]가 현재 변환 계수가 유효 변환 계수일때마다 갱신되게 된다.The video decoding apparatus 100 increases cnt_nz by one. That is, cnt_nz indicating the number of coefficients having a non-zero value in the current block (or scan area) is updated each time the current transform coefficient is an effective transform coefficient. In addition, the video decoding apparatus 100 increases cg_nz [i], which indicates the number of coefficients having non-zero values in the current coefficient group i, by one. That is, cg_nz [i] indicating the number of coefficients having a non-zero value in the current coefficient group i is updated every time the current transform coefficient is an effective transform coefficient.
비디오 복호화 장치(100)는 i가 마지막 계수 그룹인 경우(i==lastSet), n을 lastScanPos에서 setPos를 뺀 값(lastScanPos-setPos)으로 결정하고, 아닌 경우 n을 15로 결정하고, n이 0보다 크거나 같은 경우 i를 1만큼 감소시키고, 반복문(for문)(915)에 포함된 동작을 수행할 수 있다. 비디오 복호화 장치(100)는 0보다 작은 값이 될때까지 반목문(for문)(915)에 포함된 동작(coeff_abs_level_greater1_flag 및 coeff_abs_level_greater2_flag 관련 동작)을 수행할 수 있다.  The video decoding apparatus 100 determines n as 15 (lastScanPos-setPos) obtained by subtracting setPos from lastScanPos when i is the last coefficient group (i == lastSet) If it is greater than or equal to i, i can be reduced by 1 and the operations included in the loop statement (for statement) 915 can be performed. The video decoding apparatus 100 may perform the operations (coeff_abs_level_greater1_flag and coeff_abs_level_greater2_flag related operations) included in the forbidden statement (for statement) 915 until the value becomes less than zero.
비디오 복호화 장치(100)는 현재 변환 계수의 위치(blkpos)를 ScanOrder 배열에서 현재 계수 그룹의 첫번째 계수의 위치를 나타내는 인덱스 정보(setPos)에 n을 더한 값으로 결정할 수 있다.The video decoding apparatus 100 may determine the position (blkpos) of the current transform coefficient as a value obtained by adding n to the index information (setPos) indicating the position of the first coefficient of the current coefficient group in the ScanOrder array.
비디오 복호화 장치(100)는 현재 변환 계수에 관한 정보 gt0 flag, gt1 flag, gt2 flag, remainining_abolute value level를 기초로 현재 변환 계수에 대한 절대값 abs_coef를 획득할수 있다.The video decoding apparatus 100 can obtain the absolute value abs_coef for the current transform coefficient based on the current transform coefficient information gt0 flag, gt1 flag, gt2 flag, remainining_abolute value level.
비디오 복호화 장치(100)는 현재 변환 계수의 유효 변환 계수 플래그(sig_flag[blkpos])가 1인 경우, 이전에 스캔된 계수 그룹들에 포함된 변환 계수들 중 변환 계수의 절대값이 1보다 큰 변환 계수의 개수 cnt_g1과 현재 계수 그룹 내 이전에 스캔된 변환 계수들 중 비트스트림으로부터 coeff_abs_level_greater1_flag를 획득한 변환 계수 의 개수 c1의 합이 계수의 절대값이 1보다 큰 변환 계수들 중 비트스트림으로부터 coeff_abs_level_greater_flag를 획득할 수 있는 변환 계수의 최대 개수인 num_gt1보다 작은 경우, 비디오 복호화 장치(100)는 비트스트림으로부터 현재 변환 계수에 대한 coeff_abs_level_greater1_flag(coeff_abs_level_greater1_flag[blkpos])를 획득할 수 있다. coeff_abs_level_greater1_flag는 현재 변환 계수의 절대값이 1보다 큰지를 나타내는 플래그일 수 있다. 비디오 복호화 장치(100)는 비트스트림으로부터 획득된 coeff_abs_level_greater1_flag를 기초로 현재 변환 계수의 플래그 gt1_flag(gt1flag[blkpos])를 결정할 수 있다.When the effective conversion coefficient flag (sig_flag [blkpos]) of the current conversion coefficient is 1, the video decoding apparatus 100 determines that the absolute value of the conversion coefficient among the conversion coefficients included in the previously scanned coefficient groups is a conversion The number of coefficients cnt_g1 and the number c1 of transform coefficients obtained from the bitstream of previously scanned transform coefficients obtained from coeff_abs_level_greater1_flag obtained from coeff_abs_level_greater_flag from the bit stream among the transform coefficients having an absolute value larger than 1 The video decoding apparatus 100 can obtain coeff_abs_level_greater1_flag (coeff_abs_level_greater1_flag [blkpos]) for the current transform coefficient from the bit stream. coeff_abs_level_greater1_flag may be a flag indicating whether the absolute value of the current transform coefficient is greater than one. The video decoding apparatus 100 can determine the flag gt1_flag (gt1flag [blkpos]) of the current transform coefficient based on coeff_abs_level_greater1_flag obtained from the bitstream.
비디오 복호화 장치(100)는 현재 변환 계수의 플래그 gt1_flag의 값이 1인 경우, c1를 1만큼 증가시킬 수 있다. 현재 변환 계수의 플래그 gt1_flag가 1인 경우라면 c1의 값이 1만큼 증가하여 c1의 값이 갱신되기 때문에 그 다음 변환 계수들에 대하여 반복문(for문)() 동작을 수행할때, c1은 현재 계수 그룹 내 이전에 스캔된 변환 계수들 중 비트스트림으로부터 coeff_abs_level_greater1_flag를 획득한 변환 계수의 개수를 나타낼 수 있다.The video decoding apparatus 100 can increase c1 by 1 when the value of the flag gt1_flag of the current transform coefficient is 1. If the flag gt1_flag of the current transform coefficient is 1, the value of c1 is increased by 1 and the value of c1 is updated. Therefore, when performing the loop operation (for statement) () on the next transform coefficients, The number of transform coefficients obtained by obtaining coeff_abs_level_greater1_flag from the bitstream among the previously scanned transform coefficients in the group.
비디오 복호화 장치(100)는 현재 변환 계수의 유효 변환 계수 플래그(sig_flag[blkpos])가 1인 경우, 이전에 스캔된 계수 그룹들 내 변환 계수들 중 변환 계수의 절대값이 2보다 큰 변환 계수의 개수 cnt_g2과 현재 계수 그룹 내 이전에 스캔된 비트스트림으로부터 coeff_abs_level_greater2_flag를 획득한 변환 계수의 개수 c2의 합이 계수의 절대값이 2보다 큰 변환 계수들 중 비트스트림으로부터 coeff_abs_level_greater_flag를 획득할 수 있는 변환 계수의 최대 개수num_gt2보다 작은 경우, 비디오 복호화 장치(100)는 비트스트림으로부터 현재 변환 계수에 대한 coeff_abs_level_greater2_flag를 획득할 수 있다. coeff_abs_level_greater2_flag는 현재 변환 계수의 절대값이 2보다 큰지를 나타내는 플래그일 수 있다. 비디오 복호화 장치(100)는 비트스트림으로부터 획득된 coeff_abs_level_greater2_flag를 기초로 현재 변환 계수의 플래그 gt2_flag를 결정할 수 있다.When the effective conversion coefficient flag (sig_flag [blkpos]) of the current conversion coefficient is 1, the video decoding apparatus 100 determines that the absolute value of the conversion coefficient among the conversion coefficients in the previously scanned coefficient groups is greater than 2 The number cnt_g2 of the coefficients and the number c2 of transform coefficients obtained from the previously scanned bit stream in coeff_abs_level_greater2_flag is smaller than the sum of the coefficients cnt_g2 and cnt2 of the transform coefficients that can obtain coeff_abs_level_greater_flag from the bit stream among the transform coefficients having an absolute value of the coefficient greater than 2 If it is smaller than the maximum number num_gt2, the video decoding apparatus 100 can obtain coeff_abs_level_greater2_flag for the current transform coefficient from the bitstream. coeff_abs_level_greater2_flag may be a flag indicating whether the absolute value of the current transform coefficient is greater than two. The video decoding apparatus 100 can determine the flag gt2_flag of the current transform coefficient based on coeff_abs_level_greater2_flag obtained from the bitstream.
비디오 복호화 장치(100)는 현재 변환 계수의 플래그 gt2_flag의 값이 1인 경우, 현재 gt2 flag의 개수 c2를 1만큼 증가시킬 수 있다. 현재 변환 계수의 플래그 gt2_flag가 1인 경우라면 c2의 값이 1만큼 증가하여 c2의 값이 갱신되기 때문에 그 다음 변환 계수들에 대하여 반복문(for문)() 동작을 수행할 때, c2는 현재 계수 그룹 내 이전에 스캔된 변환 계수들 중 비트스트림으로부터 coeff_abs_level_greater1_flag를 획득한 변환 계수의 개수를 나타낼 수 있다. The video decoding apparatus 100 can increase the number c2 of the current gt2 flags by 1 when the value of the flag gt2_flag of the current conversion coefficient is 1. When the flag gt2_flag of the current transform coefficient is 1, the value of c2 is increased by 1 and the value of c2 is updated. Therefore, when performing the loop operation (for statement) () on the next transform coefficients, The number of transform coefficients obtained by obtaining coeff_abs_level_greater1_flag from the bitstream among the previously scanned transform coefficients in the group.
또한, 비디오 복호화 장치(100)는 escapeDataPresent를 1로 결정할 수 있다. escapeDataPresent는 현재 변환 그룹 내 변환 계수의 값을 결정하기 위해 추가로 획득해야 하는 정보(예를 들어, 잔여 레벨 절대값 정보 coeff_abs_level_remaining)가 있음을 나타내는 정보일 수 있다.In addition, the video decoding apparatus 100 may determine that escapeDataPresent is set to 1. The escapeDataPresent may be information indicating that there is additional information (e.g., residual level absolute value information coeff_abs_level_remaining) to determine the value of the transform coefficient in the current transform group.
비디오 복호화 장치(100)는 현재 변환 계수의 유효 변환 계수 플래그(sig_flag[blkpos])가 1인 경우, 이전에 스캔된 계수 그룹들 내 변환 계수들 중 변환 계수의 절대값이 2보다 큰 변환 계수의 개수 cnt_g2과 현재 계수 그룹 내 이전에 스캔된 비트스트림으로부터 coeff_abs_level_greater2_flag를 획득한 변환 계수의 개수 c2의 합이 계수의 절대값이 2보다 큰 변환 계수들 중 비트스트림으로부터 coeff_abs_level_greater_flag를 획득할 수 있는 변환 계수의 최대 개수 num_gt2보다 작지 않은 경우, 비디오 복호화 장치(100)는 escapeDataPresent를 1로 결정할 수 있다.When the effective conversion coefficient flag (sig_flag [blkpos]) of the current conversion coefficient is 1, the video decoding apparatus 100 determines that the absolute value of the conversion coefficient among the conversion coefficients in the previously scanned coefficient groups is greater than 2 The number cnt_g2 of the coefficients and the number c2 of transform coefficients obtained from the previously scanned bit stream in coeff_abs_level_greater2_flag is smaller than the sum of the coefficients cnt_g2 and cnt2 of the transform coefficients that can obtain coeff_abs_level_greater_flag from the bit stream among the transform coefficients having an absolute value of the coefficient greater than 2 If it is not smaller than the maximum number num_gt2, the video decoding apparatus 100 can determine the escapeDataPresent to be 1. [
비디오 복호화 장치(100)는 이전에 스캔된 계수 그룹들에 포함된 변환 계수들 중 변환 계수의 절대값이 1보다 큰 변환 계수의 개수 cnt_g1과 현재 계수 그룹 내 이전에 스캔된 변환 계수들 중 비트스트림으로부터 coeff_abs_level_greater1_flag를 획득한 변환 계수 의 개수 c1의 합이 계수의 절대값이 1보다 큰 변환 계수들 중 비트스트림으로부터 coeff_abs_level_greater_flag를 획득할 수 있는 변환 계수의 최대 개수인 num_gt1보다 작지 않은 경우, 비디오 복호화 장치(100)는 escapeDataPresent를 1로 결정할 수 있다. The video decoding apparatus 100 decodes the number of transform coefficients cnt_g1 having an absolute value of the transform coefficient among the transform coefficients included in the previously scanned coefficient groups greater than 1, When the sum of the number of transform coefficients c1 obtained from coeff_abs_level_greater1_flag is not smaller than num_gt1 which is the maximum number of transform coefficients capable of obtaining coeff_abs_level_greater_flag from the bit stream among the transform coefficients having an absolute value larger than 1, 100) can determine escapeDataPresent to be 1.
비디오 복호화 장치(100)는 escapeDataPresent가 1인 경우, i가 마지막 계수 그룹을 나타내는 경우(i==lastSet), n을 lastScanPos에서 setPos를 뺀 값(lastScanPos-setPos)으로 결정하고, 아닌 경우 n을 15로 결정하고, n이 0보다 크거나 같은 경우 i를 1만큼 감소시키고, 반복문(for문)(920)에 포함된 동작을 수행할 수 있다. 비디오 복호화 장치(100)는 0보다 작은 값이 될때까지 반목문(for문)(920)에 포함된 동작(coeff_abs_level_reamining 관련 동작)을 수행할 수 있다. The video decoding apparatus 100 determines n as a value obtained by subtracting setPos from lastScanPos (lastScanPos-setPos) when i is the last coefficient group when escapeDataPresent is 1, and n is 15 And if n is greater than or equal to 0, i may be decreased by 1 and the operations contained in the loop statement (for statement) 920 may be performed. The video decoding apparatus 100 may perform an operation (an operation related to coeff_abs_level_reamining) included in the forbidden statement (for statement) 920 until the value becomes less than zero.
비디오 복호화 장치(100)는 현재 변환 계수의 위치(blkpos)를 ScanOrder 배열에서 현재 계수 그룹의 첫번째 계수의 위치를 나타내는 인덱스 정보(setPos)에 n을 더한 값으로 결정할 수 있다.The video decoding apparatus 100 may determine the position (blkpos) of the current transform coefficient as a value obtained by adding n to the index information (setPos) indicating the position of the first coefficient of the current coefficient group in the ScanOrder array.
비디오 복호화 장치(100)는 현재 변환 계수의 절대값이 1보다 큰 경우(sig_flag[blkpos]), 베이스 레벨을 결정할 수 있다. 현재 계수 그룹 내 현재 변환 계수 이전에 스캔된 변환 계수들 중 변환 계수들의 절대값이 1보다 큰 변환 계수들의 개수 cnt_gt1이 계수의 절대값이 2보다 큰 변환 계수들 중 비트스트림으로부터 coeff_abs_level_greater_flag를 획득할 수 있는 변환 계수의 최대 개수 num_gt1보다 작은 경우, 현재 계수 그룹 내 현재 변환 계수 이전에 스캔된 변환 계수들 중 변환 계수들의 절대값이 2보다 큰 변환 계수들의 개수 cnt_gt2가 계수의 절대값이 2보다 큰 변환 계수들 중 비트스트림으로부터 coeff_abs_level_greater_flag를 획득할 수 있는 변환 계수의 최대 개수 num_gt2보다 작은 경우, 비디오 복호화 장치(100)는 베이스 레벨을 3으로 결정할 수 있다. cnt_gt1이 비트스트림으로부터 획득될 수 있는 num_gt1보다 작은 경우, cnt_gt2가 num_gt2보다 작다면, 비디오 복호화 장치(100)는 베이스 레벨을 2로 결정할 수 있다. cnt_gt1이 num_gt1보다 작지 않은 경우, 비디오 복호화 장치(100)는 베이스 레벨을 1로 결정할 수 있다.The video decoding apparatus 100 can determine the base level when the absolute value of the current transform coefficient is larger than 1 (sig_flag [blkpos]). Current transform coefficient in current coefficient group number of transform coefficients having an absolute value larger than 1 among transform coefficients scanned before cnt_gt1 coeff_abs_level_greater_flag can be obtained from a bit stream among transform coefficients having an absolute value larger than 2 Cnt_gt2 where the absolute value of the transform coefficients of the transform coefficients scanned prior to the current transform coefficient in the current coefficient group is greater than 2, when the absolute value of the transform coefficient is smaller than 2 The video decoding apparatus 100 can determine the base level to be 3 when the bit rate is smaller than the maximum number num_gt2 of conversion coefficients capable of obtaining coeff_abs_level_greater_flag from the bitstream. If cnt_gt1 is smaller than num_gt1 that can be obtained from the bitstream, the video decoding apparatus 100 can determine the base level to be 2 if cnt_gt2 is smaller than num_gt2. If cnt_gt1 is not smaller than num_gt1, the video decoding apparatus 100 can determine the base level to be 1.
비디오 복호화 장치(100)는 현재 변환 계수에 대한 gt1flag의 값 및 gt2flag의 값을 더한 값에 1을 더한 값으로 현재 변환 계수의 절대값 레벨 abs_coef을 결정할 수 있다. 비디오 복호화 장치(100)는 현재 변환 계수의 절대값이 베이스 레벨과 동일한 값을 갖는 경우(abs_coef[blkpos]==base_level), 비트스트림으로부터 현재 변환 계수에 대한 잔여 절대값 레벨 coeff_abs_level_remaining을 획득할 수 있다. 비디오 복호화 장치(100)는 abs_coef에 현재 변환 계수에 대한 잔여 절대값 레벨 level_remaining을 더하여 현재 변환 계수에 대한 절대값 레벨 abs_coef를 결정할 수 있다.The video decoding apparatus 100 can determine the absolute value level abs_coef of the current transform coefficient by adding 1 to the value obtained by adding the value of gt1flag and the value of gt2flag to the current transform coefficient. The video decoding apparatus 100 can obtain the residual absolute value level coeff_abs_level_remaining for the current transform coefficient from the bitstream if the absolute value of the current transform coefficient has the same value as the base level (abs_coef [blkpos] == base_level) . The video decoding apparatus 100 may determine the absolute value level abs_coef for the current transform coefficient by adding the residual absolute value level level_remaining to the current transform coefficient to abs_coef.
비디오 복호화 장치(100)는 현재 변환 계수에 대한 절대값 레벨 abs_coef가 2보다 크다면, cnt_gt2를 1만큼 증가시킬 수 있다. 또한, 비디오 복호화 장치(100)는 현재 변환 계수에 대한 절대값 레벨 abs_coef가 1보다 크다면, cnt_gt1을 1만큼 증가시킬 수 있다.The video decoding apparatus 100 can increase cnt_gt2 by 1 if the absolute value level abs_coef for the current transform coefficient is greater than 2. Also, if the absolute value level abs_coef for the current transform coefficient is greater than 1, the video decoding apparatus 100 may increase cnt_gt1 by one.
만약 escapeDataPresent가 0이라면, i가 마지막 계수 그룹을 나타내는 경우(i==lastSet), n을 lastScanPos에서 setPos를 뺀 값(lastScanPos-setPos)으로 결정하고, 아닌 경우 n을 15로 결정하고, n이 0보다 크거나 같은 경우 i를 1만큼 감소시키고, 반복문(for문)(925)에 포함된 동작을 수행할 수 있다. 비디오 복호화 장치(100)는 0보다 작은 값이 될때까지 반목문(for문)(925)에 포함된 동작(abs_coef 관련 동작)을 수행할 수 있다. ScanOrder 배열에서 현재 계수 그룹의 첫번째 계수의 위치를 나타내는 인덱스 정보(setPos)에 n을 더한 값으로 결정할 수 있다.If escapeDataPresent is 0, if i represents the last coefficient group (i == lastSet), n is determined by subtracting setPos from lastScanPos (lastScanPos-setPos), otherwise n is determined to be 15, If it is greater than or equal to i, then i may be reduced by one and the operations contained in the loop statement (for statement) 925 may be performed. The video decoding apparatus 100 may perform the operation (abs_coef related operation) contained in the forbidden statement (for statement) 925 until the value becomes less than zero. The index information (setPos) indicating the position of the first coefficient of the current coefficient group in the ScanOrder array can be determined by adding n to the index information (setPos).
비디오 복호화 장치(100)는 현재 변환 계수에 관한 정보 gt0 flag, gt1 flag, gt2 flag, remainining_abolute value level를 기초로 현재 변환 계수에 대한 절대값 abs_coef를 획득할수 있다.The video decoding apparatus 100 can obtain the absolute value abs_coef for the current transform coefficient based on the current transform coefficient information gt0 flag, gt1 flag, gt2 flag, remainining_abolute value level.
비디오 복호화 장치(100)는 현재 변환 계수에 대한 유효 변환 계수 플래그가 1인 경우, 현재 변환 계수에 대한 절대값인 abs_coef가 2보다 크거나 같다면, cnt_gt2를 1만큼 증가 시킬 수 있다. 현재 변환 계수에 대한 유효 변환 계수 플래그가 1인 경우, 현재 변환 계수에 대한 절대값인 abs_coef가 1보다 크거나 같다면, cnt_gt1를 1만큼 증가 시킬 수 있다.The video decoding apparatus 100 can increase the cnt_gt2 by 1 if the effective conversion coefficient flag for the current conversion coefficient is 1 and abs_coef, which is an absolute value for the current conversion coefficient, is greater than or equal to 2. When the effective conversion coefficient flag for the current conversion coefficient is 1, if the absolute value abs_coef for the current conversion coefficient is greater than or equal to 1, cnt_gt1 can be increased by one.
비디오 복호화 장치(100)는 정방향의 스캔 순서에 따라 스캔되는 현재 계수 그룹 i 내 마지막 유효 변환 계수의 위치 lastSigScanPos와 첫번째 유효 변환 계수의 위치 firstSigScanPos의 차이가 3보다 큰 경우, 현재 계수 그룹 i 내 적어도 하나의 부호가 숨겨져 있음을 나타내는 signHidden의 값(signHidden[i])을 1로 결정할 수 있다. 비디오 복호화 장치(100)는 정방향의 스캔 순서에 따라 스캔되는 현재 계수 그룹 내 마지막 유효 변환 계수의 위치 lastSigScanPos와 첫번째 유효 변환 계수의 위치 firstSigScanPos의 차이가 3보다 크지 않은 경우, 현재 계수 그룹 i 내 적어도 하나의 부호가 숨겨져 있음을 나타내는 signHidden의 값(signHidden[i])을 0으로 결정할 수 있다.When the difference between the position lastSigScanPos of the last effective transform coefficient in the current coefficient group i scanned in the forward scan order and the position firstSigScanPos of the first effective transform coefficient is greater than 3, the video decoding apparatus 100 determines that at least one The signHidden value (signHidden [i]) indicating that the sign of the sign is hidden is set to 1. If the difference between the position lastSigScanPos of the last effective transform coefficient in the current coefficient group scanned in the forward scan order and the position firstSigScanPos of the first effective transform coefficient is not greater than 3, the video decoding apparatus 100 determines that at least one The signHidden value (signHidden [i]) indicating that the sign of the signHidden is hidden can be determined as 0.
비디오 복호화 장치(100)는 i를 0으로 초기화하고, i가 lateSet보다 작거나 같은 경우 i를 1만큼 증가시키고, 반복문(for문)(930)에 포함된 동작을 수행할 수 있다. 비디오 복호화 장치(100)는 i가 lateSet보다 큰 값이 될때까지 반목문(for문)(930)에 포함된 동작을 수행할 수 있다. 이때, i는 계수 그룹을 나타내는 인덱스일 수 있다. 즉, 비디오 복호화 장치(100)는 반복문(for문)(930)에 포함된 동작을 한번 수행할 때마다 하나의 계수 그룹에 대한 동작을 수행할 수 있다.The video decoding apparatus 100 may initialize i to 0 and increment i by 1 if i is less than or equal to lateSet and perform the operations contained in the loop statement (for statement) 930. [ The video decoding apparatus 100 can perform the operations included in the forbidden statement (for statement) 930 until i becomes larger than lateSet. In this case, i may be an index indicating a coefficient group. That is, the video decoding apparatus 100 may perform an operation for one coefficient group every time the operation included in the loop statement (for statement) 930 is performed.
만약 rsp(residual sign prediction)가 적용되는 경우라면(rsp_apply), If rsp (residual sign prediction) is applied (rsp_apply),
비디오 복호화 장치(100)는 i가 마지막 계수 그룹인 경우(i==lastSet), n을 lastScanPos에서 setPos를 뺀 값(lastScanPos-setPos)으로 결정하고, 아닌 경우 n을 15로 결정하고, n이 0보다 크거나 같은 경우 i를 1만큼 감소시키고, 반복문(for문)(935)에 포함된 동작을 수행할 수 있다. 비디오 복호화 장치(100)는 0보다 작은 값이 될때까지 반목문(for문)(935)에 포함된 동작을 수행할 수 있다.The video decoding apparatus 100 determines n as 15 (lastScanPos-setPos) obtained by subtracting setPos from lastScanPos when i is the last coefficient group (i == lastSet) If it is greater than or equal to i, then i can be decreased by 1 and the operation contained in the loop statement (for statement) 935 can be performed. The video decoding apparatus 100 may perform the operations included in the forbidden statement (for statement) 935 until the value is less than zero.
비디오 복호화 장치(100)는 현재 복호화되는 변환 계수의 위치(blkpos)를 정방향의 스캔 순서에 따른 ScanOrder 배열에서 현재 계수 그룹의 첫번째 계수의 위치를 나타내는 인덱스 정보 setPos에 현재 n을 더한 값으로 결정할 수 있다.The video decoding apparatus 100 may determine the position (blkpos) of the currently decoded transform coefficient as a value obtained by adding n to the index information setPos indicating the position of the first coefficient of the current coefficient group in the ScanOrder array according to the forward scan order .
비디오 복호화 장치(100)는 현재 복호화되는 변환 계수의 위치 blkpos가 rsp_pos가 아닌 경우, 변환 계수의 부호가 숨겨진 변환 계수의 위치 hidden_pos이라면, 현재 복호화되는 변환 계수의 부호에 관한 정보(sign[blkpos])를 숨겨진 변환 계수의 부호에 관한 정보 hidden_sign으로 결정할 수 있다.If the position blkpos of the transform coefficient to be currently decoded is not rsp_pos, the video decoding apparatus 100 outputs information (sign [blkpos]) about the sign of the transform coefficient to be currently decoded if the sign of the transform coefficient is the position hidden_pos of the hidden transform coefficient, Can be determined by information hidden_sign on the sign of the hidden transform coefficient.
만약 변환 계수의 부호가 숨겨진 변환 계수의 위치 hidden_pos가 아닌 경우, 비디오 복호화 장치(100)는 비트스트림으로부터 현재 복호화되는 변환 계수의 부호에 관한 정보(sign[blkpos])를 획득할 수 있다.If the sign of the transform coefficient is not the position hidden_pos of the hidden transform coefficient, the video decoding apparatus 100 can obtain the information (sign [blkpos]) about the sign of the transform coefficient currently being decoded from the bit stream.
비디오 복호화 장치(100)는 현재 복호화되는 변환 계수의 위치 blkpos가 rsp_pos인 경우, 비트스트림으로부터 현재 복호화되는 변환 계수의 rsp 부호에 관한 정보(sign_rsp[blkpos])를 획득할 수 있다.The video decoding apparatus 100 can obtain the information (sign_rsp [blkpos]) regarding the rsp code of the transform coefficient currently being decoded from the bitstream if the position blkpos of the transform coefficient to be currently decoded is rsp_pos.
만약 rsp가 적용되지 않는다면, 비디오 복호화 장치(100)는 i가 마지막 계수 그룹인 경우(i==lastSet), n을 lastScanPos에서 setPos를 뺀 값(lastScanPos-setPos)으로 결정하고, 아닌 경우 n을 15로 결정하고, n이 0보다 크거나 같은 경우 i를 1만큼 감소시키고, 반복문(for문)(940)에 포함된 동작을 수행할 수 있다. 비디오 복호화 장치(100)는 0보다 작은 값이 될때까지 반목문(for문)(940)에 포함된 동작을 수행할 수 있다.If rsp is not applied, the video decoding apparatus 100 determines n to be a value obtained by subtracting setPos from lastScanPos (lastScanPos-setPos) if i is the last coefficient group (i == lastSet) And if n is greater than or equal to zero, i may be decremented by one and the operations contained in the loop statement (for statement) 940 may be performed. The video decoding apparatus 100 may perform the operation included in the forbidden statement (for statement) 940 until the value is less than zero.
비디오 복호화 장치(100)는 현재 변환 계수의 위치(blkpos)를 정방향의 스캔 순서에 따른 ScanOrder 배열에서 현재 계수 그룹의 첫번째 계수의 위치를 나타내는 인덱스 정보 setPos에 현재 n을 더한 값으로 결정할 수 있다.The video decoding apparatus 100 may determine the position (blkpos) of the current transform coefficient as a value obtained by adding n to the index information setPos indicating the position of the first coefficient of the current coefficient group in the ScanOrder array according to the forward scan order.
만약 현재 변환 계수의 유효 변환 계수 플래그의 값이 1이고, 부호 데이터를 숨기는 것을 활성화하는지를 나타내는 플래그 sign_data_hiding_enabled_flag)의 값이 0이거나, 현재 그룹에 대하여 숨겨진 부호가 없거나(!signHidden[i]), 정방향의 스캔 순서상 현재 계수 그룹 내 현재 변환 계수의 위치가 첫번째 유효 변환 계수의 위치 firstSigScanPos가 아닌 경우, 비트스트림으로부터 현재 변환 계수의 부호에 관한 정보(sign[blkpos])를 획득할 수 있다.If the value of the flag sign_data_hiding_enabled_flag indicating whether the value of the effective conversion coefficient flag of the current conversion coefficient is 1 and activating the hiding of the sign data is 0 or if there is no code hidden for the current group (! SignHidden [i]), Information (sign [blkpos]) concerning the sign of the current transform coefficient can be obtained from the bit stream when the position of the current transform coefficient in the current scan group is not the position of the first effective transform coefficient in the scan order.
도 9d 내지 9f는 다른 실시예에 따른 레지듀얼 부호화 신택스 구조를 설명하기 위한 도면이다.9D to 9F are diagrams for explaining a residual coding syntax structure according to another embodiment.
도 9d 내지 9f를 참조하면, 비디오 복호화 장치(100)는 변환 계수를 복원하기 위해 변환 계수에 관한 신택스 엘리먼트 정보를 스캔하고, 스캔된 신택스 엘리먼트 정보를 기초로 변환 계수를 복호화할 수 있다.9D to 9F, the video decoding apparatus 100 may scan the syntax element information about the transform coefficients to recover the transform coefficients, and may decode the transform coefficients based on the scanned syntax element information.
먼저, 비디오 복호화 장치(100)는 스캔 영역을 특정하기 위한 좌표를 나타내는 신택스 엘리먼트 정보 last_sig_coeff_x 및 last_sig_coeff_y를 비트스트림으로부터 획득할 수 있다. 이때, 신택스 엘리먼트 정보last_sig_coeff_x는 현재 블록의 좌상측 모서리 좌표를 기준으로 정방향의 스캔 순서에 따라 가장 마지막에 위치하는 유효 변환 계수의 수평방향(x축 방향) 좌표의 값을 나타낼 수 있고, 신택스 엘리먼트 정보 last_sig_coeff_y는 현재 블록의 좌상측 모서리 좌표를 기준으로 정방향의 스캔 순서에 따라 현재 블록 내 마지막에 위치하는 유효 변환 계수의 수직방향(y축 방향) 좌표의 값을 나타낼 수 있다. 비디오 복호화 장치(100)는 신택스 엘리먼트 정보last_sig_coeff_x 및 last_sig_coeff_y에 기초하여 스캔 영역을 특정하기 위한 좌표 LastSigcoeffX 및 LastSigCoeffY를 결정할 수 있다. First, the video decoding apparatus 100 may obtain syntax element information last_sig_coeff_x and last_sig_coeff_y indicating coordinates for specifying a scan area from a bitstream. At this time, the syntax element information last_sig_coeff_x can represent the value of the horizontal direction (x-axis direction) coordinate of the effective transformation coefficient located last in the forward scan order based on the upper left corner coordinate of the current block, and the syntax element information last_sig_coeff_y may indicate the value of the vertical direction (y-axis direction) coordinate of the effective transformation coefficient positioned at the end in the current block according to the forward scan order based on the upper left corner coordinate of the current block. The video decoding apparatus 100 may determine the coordinates LastSigcoeffX and LastSigCoeffY for specifying the scan area based on the syntax element information last_sig_coeff_x and last_sig_coeff_y.
비디오 복호화 장치(100)는 서브 블록 내 정방향의 스캔 순서에 따라 가장 마지막에 위치하는 유효 변환 계수의 위치 lastScanPos를 16으로 초기화할 수 있다. 비디오 복호화 장치(100)는 서브 블록 내 정방향의 스캔 순서에 따라 가장 마지막에 위치하는 유효 변환 계수가 위치하는 서브 블록을 나타내는 lastSubBlock을 초기화할 수 있다. 이때, 초기화되는 값은 정방향의 스캔 순서에 따라 스캔되는 현재 블록의 서브 블록들 중 마지막에 위치하는 서브 블록을 나타낼 수 있다. 즉, lastSubBlock은 현재 블록의 높이 및 너비에 기초하여 정방향의 스캔 순서에 따라 스캔되는 서브 블록들 중 마지막에 위치하는 서브 블록을 나타내는 값으로 초기화될 수 있다.The video decoding apparatus 100 may initialize the position lastScanPos of the effective transformation coefficient located last in the forward scan order in the subblock to 16. The video decoding apparatus 100 may initialize the lastSubBlock indicating the sub-block in which the last valid transform coefficient is located according to the forward scan order in the sub-block. At this time, the initialized value may indicate the last sub-block of the current block scanned according to the forward scan order. That is, the lastSubBlock may be initialized to a value indicating the last sub-block among the sub-blocks scanned in the forward scan order based on the height and width of the current block.
비디오 복호화 장치(100)는 현재 계수의 수평방향의 위치 xC가 LastSigcoeffX가 아니거나, 현재 계수의 수직방향의 위치 yC가 LastSigcoeffY가 아닌 경우 Do-while 루프문(950) 내 동작을 수행하고, xC가 LastSigcoeffX이고, 현재 계수의 수직방향의 위치 yC가 LastSigcoeffY인 경우, do-while 루프문(950) 내 동작을 더 이상 수행하지 않을 수 있다.The video decoding apparatus 100 performs an operation in the Do-while loop statement 950 when the position xC in the horizontal direction of the current coefficient is not LastSigcoeffX or the position yC in the vertical direction of the current coefficient is not LastSigcoeffY, If LastSigcoeffX and position yC in the vertical direction of the current coefficient is LastSigcoeffY, the operation in the do-while loop statement 950 may no longer be performed.
비디오 복호화 장치(100)는 lastScanPos가 0이라면, lastScanPos를 16으로결정하고, lastSubblock을 1만큼 감소시킬 수 있다. 즉, 역방향의 스캔 순서에 따라 하나의 서브 블록 내 스캔이 완료(lastScanPos이 0이 )되면, 역방향의 스캔 순서에 따라 다음 서브 블록을 스캔 하기 위해 lastScanPos를 16으로 초기화하고, 다음 서브 블록 스캔을 위해 lastSubblock을 1만큼 감소시킬 수 있다. 비디오 복호화 장치(100)는 lastScanPos를 1만큼 감소시키면서 역방향의 스캔 순서에 따라 현재 서브 블록 lastSubblock 내 변환 계수를 스캔할 수 있다.The video decoding apparatus 100 may determine the lastScanPos to be 16 and reduce the lastSubblock by 1 if lastScanPos is zero. That is, when the scan in one sub-block is completed (lastScanPos is 0) according to the reverse scan order, lastScanPos is initialized to 16 to scan the next sub-block according to the reverse scan order, the lastSubblock can be reduced by one. The video decoding apparatus 100 may scan the transform coefficients in the current subblock lastSubblock according to a reverse scan order while decrementing lastScanPos by one.
비디오 복호화 장치(100)는 현재 서브 블록의 수평방향 위치 xS 및 수직방향 위치 yS를 결정할 수 있다. 비디오 복호화 장치(100)는 현재 블록에 대하여 소정의 정방향 스캔 순서에 따라 결정되는 ScanOrder 배열에 기초하여 현재 서브 블록의 위치가 결정될 수 있다. 즉, 비디오 복호화 장치(100)는 현재 블록의 높이(log2height) 및 너비(log2width), 소정의 스캔 순서를 나타내는 스캔 인덱스 scanIdx 및 현재 서브 블록을 나타내는 값 lastSubBlock에 기초하여 현재 서브 블록의 위치가 결정될 수 있다. 이때, xS 및 yS는 실제 서브 블록의 위치가 아니라, 서브 블록들을 하나의 픽셀처럼 취급할 때의 서브 블록의 위치일 수 있다. 즉, 서브 블록의 너비 및 높이를 무시하고, 인접하는 서브 블록 간의 서브 블록 수평방향 및 수직방향 차이는 1일 수 있다.The video decoding apparatus 100 can determine the horizontal position xS and the vertical position yS of the current subblock. The video decoding apparatus 100 may determine the position of the current subblock based on the ScanOrder array determined according to a predetermined forward scan order with respect to the current block. That is, the video decoding apparatus 100 can determine the position of the current sub-block based on the height (log2height) and the width (log2width) of the current block, the scan index scanIdx indicating the predetermined scan order, and the value lastSubBlock indicating the current sub- have. Here, xS and yS may be positions of subblocks when treating subblocks as one pixel, rather than positions of actual subblocks. That is, the width and the height of the sub-block may be ignored, and the difference between the sub-block horizontal direction and the vertical direction between adjacent sub-blocks may be one.
또한, 비디오 복호화 장치(100)는 현재 서브 블록에 대하여 소정의 정방향 스캔 순서에 따라 결정되는 ScanOrder 배열에 기초하여 현재 변환 계수의 수평방향 위치 xC 및 수직방향 위치 yC가 결정될 수 있다. 즉, 비디오 복호화 장치(100)는 현재 서브 블록의 높이(log24=2) 및 너비(log24=2), 소정의 스캔 순서를 나타내는 스캔 인덱스 scanIdx, 현재 서브 블록의 위치(xS,yS) 및 현재 서브 블록 내 현재 변환 계수의 위치를 나타내는 값 lastScanPos에 기초하여 현재 변환 계수의 위치(xC,yC)가 결정될 수 있다.In addition, the video decoding apparatus 100 can determine the horizontal direction position xC and the vertical direction position yC of the current transform coefficient based on the ScanOrder array determined in accordance with a predetermined forward scan order for the current subblock. That is, the video decoding apparatus 100 determines the height (log 2 4 = 2) and the width (log 2 4 = 2) of the current subblock, the scan index scanIdx indicating a predetermined scan order, ) And a value lastScanPos indicating the position of the current transform coefficient in the current subblock, the position (xC, yC) of the current transform coefficient can be determined.
비디오 복호화 장치(100)는 현재 변환 계수의 수직방향의 위치 yC가 LastSigcoeffY인 경우에 do-while 루프문(950) 내 동작을 더 이상 수행하지 않게 되므로, do-while 루프문(950)을 통해 결정된 lastScanPos는 정방향의 스캔 순서에 따라 스캔되는 현재 블록 내 마지막 유효 변환 계수가 포함된 서브 블록 내 마지막 유효 변환 계수의 위치를 나타내는 인덱스 정보일 수 있고, lastSubBlock은 현재 블록 내 마지막 유효 변환 계수가 위치하는 서브 블록을 나타내는 인덱스 정보일 수 있다.The video decoding apparatus 100 will no longer perform the operation in the do-while loop statement 950 when the vertical direction position yC of the current transform coefficient is LastSigcoeffY, lastScanPos may be index information indicating the position of the last valid transform coefficient in the subblock including the last valid transform coefficient in the current block scanned in the forward scan order, and lastSubBlock may be index information indicating the position of the last valid transform coefficient in the current block And may be index information indicating a block.
비디오 복호화 장치(100)는 i를 lastSubBlock으로초기화하고, i가 0보다 큰 경우 i를 1만큼 감소시키고, 반복문(for문)(960)에 포함된 동작을 수행할 수 있다. 비디오 복호화 장치(100)는 0보다 작은 값이 될때까지 반목문(for문)(960)에 포함된 동작을 수행할 수 있다. 이때, i는 계수 그룹을 나타내는 인덱스일 수 있다. 즉, 비디오 복호화 장치(100)는 반복문(for문)(960)에 포함된 동작을 한번 수행할 때마다 하나의 서브 블록에 대한 동작을 수행할 수 있다.The video decoding apparatus 100 may initialize i to lastSubBlock, reduce i by 1 if i is greater than 0, and perform the operations contained in the loop statement (for statement) 960. [ The video decoding apparatus 100 may perform the operation included in the forbidden statement (for statement) 960 until the value is less than zero. In this case, i may be an index indicating a coefficient group. That is, the video decoding apparatus 100 may perform an operation on one subblock each time the operation included in the loop statement (for statement) 960 is performed.
비디오 복호화 장치(100)는 현재 서브 블록의 수평방향 위치 xS및 수직방향 위치 yS를 결정할 수 있다. The video decoding apparatus 100 can determine the horizontal position xS and the vertical position yS of the current subblock.
비디오 복호화 장치(100)는 현재 서브 블록을 나타내는 i가 마지막 유효 변환 계수가 위치하는 서브 블록을 나타내는 값(lastSubBlock)보다 작은 값을 갖는 서브 블록을 가리키거나, DC 계수를 포함하는 서브 블록을 나타내는 값(0)보다 큰 값을 갖는 서브 블록을 가리키는 경우, 현재 서브 블록 i에 대한 coded_sub_block_flag[xS][yS]를 획득할 수 있다. coded_sub_block_flag[xS][yS]는 현재 서브 블록 i 내 적어도 하나의 유효 변환 계수를 포함하는지를 나타내는 플래그 정보일 수 있다.The video decoding apparatus 100 refers to a sub-block having a value smaller than a value (lastSubBlock) indicating a sub-block in which the current effective transform coefficient is located, indicating a current sub-block, or a sub-block including a DC coefficient Quot; coded_sub_block_flag [xS] [yS] for the current subblock i can be obtained when the subblock has a value larger than the value (0). coded_sub_block_flag [xS] [yS] may be flag information indicating whether the coded_sub_block_flag [xS] [yS] includes at least one valid conversion coefficient in the current subblock i.
비디오 복호화 장치(100)는 현재 서브 블록이 마지막 유효 변환 계수를 포함하는 서브 블록(lastSubBlock)인 경우, n을 lastScanPos-1로 초기화하고, 그렇지 않은 경우 15로 초기화하고, n이 0보다 크거나 같은 경우 n을 1만큼 감소시키고, 반복문(for문)()에 포함된 동작을 수행할 수 있다. 비디오 복호화 장치(100)는 n이 0보다 작은 값이 될 대까지 반복문(for문)(960)에 포함된 동작을 수행할 수 있다.이때, n는 서브 블록 내 현재 변환 계수의 위치를 나타내는 인덱스일 수 있다. 즉, 비디오 복호화 장치(100)는 반복문(for문)( )에 포함된 동작을 한번 수행할 때마다 하나의 계수 그룹에 대한 동작을 수행할 수 있다. 즉, 비디오 복호화 장치(100)는 반복문(for문)(960)에 포함된 동작을 한번 수행할 때마다 하나의 서브 블록에 대한 동작(sig_coeff_flag 관련 동작)을 수행할 수 있다.The video decoding apparatus 100 initializes n to lastScanPos-1 if the current subblock is the lastSubBlock including the last valid transform coefficient, otherwise initializes to 15 and if n is greater than or equal to 0 In this case, n can be reduced by 1, and the operation included in the loop (for statement) () can be performed. The video decoding apparatus 100 can perform the operations included in the loop statement (for statement) 960 until n becomes less than 0. Here, n is an index indicating the position of the current transform coefficient in the sub-block Lt; / RTI &gt; That is, the video decoding apparatus 100 can perform an operation on one coefficient group every time the operation included in the loop statement (for statement) () is performed once. That is, the video decoding apparatus 100 may perform an operation (operation related to sig_coeff_flag) for one subblock each time the operation included in the loop statement (for statement) 960 is performed.
비디오 복호화 장치(100)는 현재 변환 계수 n의 위치 xC 및 yC를 결정할 수 있다.The video decoding apparatus 100 can determine the positions xC and yC of the current transform coefficient n.
비디오 복호화 장치(100)는 현재 서브 블록에 대한 coded_sub_block_flag[xS][yS]가 1이고, n은 0보다 크거나 inferSbDcSigCoeffFlag가 0인 경우, 현재 변환 계수에 대한 플래그 sig_coeff_flag[xC][yC]를 비트스트림으로부터 획득할 수 있다. sig_coeff_flag[xC][yC]는 현재 변환 계수가 유효 변환 계수인지를 나타내는 플래그일 수 있다.When the coded_sub_block_flag [xS] [yS] for the current sub-block is 1, n is greater than 0 or inferSbDcSigCoeffFlag is 0, the video decoding apparatus 100 sets the flag sig_coeff_flag [xC] [yC] Can be obtained from the stream. sig_coeff_flag [xC] [yC] may be a flag indicating whether the current conversion coefficient is an effective conversion coefficient.
만약 sig_coeff_flag[xC][yC]의 값이 1이라면, inferSbDcSigCoeffFlag는 0으로 결정될 수 있다.If the value of sig_coeff_flag [xC] [yC] is 1, inferSbDcSigCoeffFlag can be determined to be 0.
비디오 복호화 장치(100)는 정방향의 스캔 순서에 따라 현재 서브 블록 내 첫번째로 스캔되는 변환 계수의 위치 firstScanPos의 값을 초기화하고, 정방향의 스캔 순서에 따라 현재 서브 블록 내 마지막으로 스캔되는 변환 계수의 위치 lastSigScanPos의 값을 초기화할 수 있다. 비디오 복호화 장치(100)는 Greater1Flag의 개수를 나타내는 numGreater1Flag의 값을 초기화하고, 정방향의 스캔 순서에 따라 Greater1Flag이 획득되는 마지막 위치 lastGreater1ScanPos의 값을 초기화할 수 있다.The video decoding apparatus 100 initializes the value of the firstScanPos position of the transform coefficient scanned first in the current subblock according to the forward scan order and outputs the position of the transform coefficient scanned last in the current subblock according to the forward scan order You can initialize the value of lastSigScanPos. The video decoding apparatus 100 may initialize the value of numGreater1Flag indicating the number of Greater1Flag and initialize the value of the last position lastGreater1ScanPos at which Greater1Flag is acquired according to the forward scanning order.
비디오 복호화 장치(100)는 서브 블록 i 내 0이 아닌 변환 계수의 개수를 나타내는 cg_nz[i]를 초기화할 수 있다.The video decoding apparatus 100 can initialize cg_nz [i] indicating the number of non-zero transform coefficients in subblock i.
비디오 복호화 장치(100)는 n을 15로 초기화하고, n이 0보다 크거나 같으면 n을 1씩 감소시키면서 n이 0보다 작을때까지 반복문(for문)(965) 내 동작을 수행할 수 있다.The video decoding apparatus 100 initializes n to 15. If n is greater than or equal to 0, n can be decreased by 1, and the operation within the loop statement (for statement) 965 can be performed until n is less than zero.
비디오 복호화 장치(100)는 현재 변환 계수 n의 위치 xC 및 Yc를 결정할 수 있다.The video decoding apparatus 100 can determine the positions xC and Yc of the current transform coefficient n.
비디오 복호화 장치(100)는 현재 변환 계수에 대한 유효 변환 계수 플래그 sig_coeff_flag가 1인 경우, numGreater1Flag가 8보다 작다면, 현재 변환 계수 n에 대한 coeff_level_greater1_flag[n]를 획득하고, numGreater1Flag의 값을 1만큼 증가시킬 수 있다. coeff_level_greater1_flag[n]는 변환 계수 n의 레벨의 절대값이 1보다 큰 지를 나타내는 플래그 정보일 수 있다. 비디오 복호화 장치(100)는 coeff_level_greater1_flag[n]에 기초하여 Greater1Flag[n]을 결정할 수 있다.The video decoding apparatus 100 acquires coeff_level_greater1_flag [n] for the current transform coefficient n if numGreater1Flag is smaller than 8 when the effective transform coefficient flag sig_coeff_flag for the current transform coefficient is 1, and increases the value of numGreater1Flag by 1 . coeff_level_greater1_flag [n] may be flag information indicating whether the absolute value of the level of the conversion coefficient n is greater than one. The video decoding apparatus 100 can determine Greater1Flag [n] based on coeff_level_greater1_flag [n].
비디오 복호화 장치(100)는 현재 변환 계수에 대한 coeff_abs_level_greater_flag의 값이 1이고, lastreater1ScanPos의 값이 초기값이라면, lastGreater1ScanPos를 현재 서브 블록 내 현재 변환 계수의 위치 n으로 결정할 수 있다. 따라서, lastGreater1ScanPos는 정방향 스캔 순서에 따라 현재 서브 블록 내 마지막에 위치하는 coeff_abs_level_greater_flag의 값을 갖는 계수의 위치를 나타내는 인덱스 정보일 수 있다. 그렇지 않고(현재 변환 계수에 대한 coeff_abs_level_greater1_flag의 값이 1이고, lastreater1ScanPos의 값이 초기값인 경우가 아니고), coeff_abs_level_greater1_flag가 1인 경우라면, escapeDataPresent를 1로 결정할 수 있다. If the value of coeff_abs_level_greater_flag for the current transform coefficient is 1 and the value of lastreater1ScanPos is the initial value, the video decoding apparatus 100 can determine the lastGreater1ScanPos as the current transform coefficient position n in the current subblock. Therefore, lastGreater1ScanPos may be index information indicating the position of a coefficient having a value of coeff_abs_level_greater_flag positioned last in the current subblock according to the forward scan order. Otherwise (not the case where the value of coeff_abs_level_greater1_flag for the current transform coefficient is 1 and the value of lastreater1ScanPos is the initial value), and if coeff_abs_level_greater1_flag is 1, escapeDataPresent can be set to 1.
비디오 복호화 장치(100)는 numGreater1Flag가 8보다 작지 않다면 escapeDataPresent를 1로 결정할 수 있다.The video decoding apparatus 100 can determine escapeDataPresent to be 1 if numGreater1Flag is not smaller than 8.
비디오 복호화 장치(100)는 정방향 스캔 순서에 따라 현재 서브 블록 내 마지막에 위치하는 유효 변환 계수의 위치르 나타내는 lastSigScanPos가 초기값을 갖는 경우, lastSigScanPos를 현재 서브 블록 내 변환 계수의 위치 n으로 결정할 수 있다.The video decoding apparatus 100 may determine lastSigScanPos to be the current position n of the intra-subblock transform coefficient when the lastSigScanPos indicating the position of the effective transform coefficient located at the end in the current subblock has an initial value according to the forward scan order .
비디오 복호화 장치(100)는 정방향 스캔 순서에 따라 현재 서브 블록 내 첫번째에 위치하는 유효 변환 계수의 위치를 나타내는 firstSigScanPos를 현재 서브 블록 내 변환 계수의 위치 n으로 결정할 수 있다. 현재 변환 계수의 유효 변환 계수 플래그 sig_coeff_flag[xC][yC]가 1인 경우라면 firstSigScanPos의 값이 계속 현재 서브 블록 내 현재 변환 계수의 위치를 나타내는 인덱스 정보인 n으로 갱신되기 때문에 최종적으로 현재 서브 블록 i에 포함된 변환 계수들에 대하여 동작을 수행하게 되면, firstSigScanPos는 정방향의 스캔 순서상 서브 블록 내 첫번째 유효 변환 계수가 존재하는 위치를 나타내는 인덱스 정보일 수 있다.The video decoding apparatus 100 may determine firstSigScanPos, which indicates the position of the effective transform coefficient located first in the current subblock, as the current transform coefficient position n in the current subblock according to the forward scan order. If the effective conversion coefficient flag sig_coeff_flag [xC] [yC] of the current conversion coefficient is 1, the value of firstSigScanPos continues to be updated to n, which is the index information indicating the position of the current transform coefficient in the current subblock. The firstSigScanPos may be the index information indicating the position where the first effective transform coefficient exists in the subblock in the forward scan order.
비디오 복호화 장치(100)는 lastSigScanPos과 firstSigScanPos의 차이가 3보다 큰 경우 sigHidden 값을 1로 결정하고, lastSigScanPos과 firstSigScanPos의 차이가 3보다 크지 않은 경우 sigHidden 값을 0으로 결정할 수 있다. 이때, sigHidden은 현재 서브 블록에 대하여 적어도 하나의 변환 계수의 부호가 숨겨져 있음을 나타내는 값일 수 있다.The video decoding apparatus 100 may determine the sigHidden value to be 1 if the difference between lastSigScanPos and firstSigScanPos is greater than 3 and may determine the sigHidden value to be 0 if the difference between lastSigScanPos and firstSigScanPos is not greater than 3. In this case, sigHidden may be a value indicating that the sign of at least one transform coefficient is hidden for the current subblock.
만약 정방향의 스캔 순서에 따라 스캔된 비트스트림으로부터 획득된 변환 계수에 대한 coeff_abs_level_greater1_flag(Greater1Flag) 중 마지막으로 coeff_abs_level_greater1_flag가 획득된 변환 계수의 위치 lastGreater1ScanPos가 초기값이 아닌 경우(즉, 비트스트림으로부터 적어도 하나의 Greater1Flag가 현재 서브 블록에서 획득된 경우), 비디오 복호화 장치(100)는 비트스트림으로부터 lastGreater1ScanPos 위치의 변환 계수에 대한 플래그 coeff_abs_level_greater2_flag[lastGreater1ScanPos]를 획득할 수 있다. coeff_abs_level_greater2_flag는 변환 계수의 절대값이 2보다 큰지를 나타내는 플래그일 수 있다. 만약 lastGreater1ScanPos 위치의 변환 계수에 대한 플래그 coeff_abs_level_greater2_flag[lastGreater1ScanPos]의 값이 1인 경우, 비디오 복호화 장치(100)는 escapeDataPresent를 1로 결정할 수 있다. 비디오 복호화 장치(100)는 coeff_level_greater2_flag[n] 에 기초하여 Greater2Flag[n]을 결정할 수 있다.If coeff_abs_level_greater1_flag of the coeff_abs_level_greater1_flag (Greater1Flag) for the transform coefficient obtained from the scanned bitstream according to the forward scan order is not the initial value (i.e., at least one Greater1Flag from the bitstream) Is obtained in the current subblock), the video decoding apparatus 100 can obtain the flag coeff_abs_level_greater2_flag [lastGreater1ScanPos] for the transform coefficient of the lastGreater1ScanPos position from the bitstream. coeff_abs_level_greater2_flag may be a flag indicating whether the absolute value of the transform coefficient is greater than two. If the value of the flag coeff_abs_level_greater2_flag [lastGreater1ScanPos] for the conversion coefficient at the lastGreater1ScanPos position is 1, the video decoding apparatus 100 can determine the escapeDataPresent to be 1. [ The video decoding apparatus 100 can determine Greater2Flag [n] based on coeff_level_greater2_flag [n].
비디오 복호화 장치(100)는 numSigCoeff을 초기화할 수 있다. 이때, numSigCoeff는 역방향의 스캔 순서에 따라 현재 변환 계수 이전까지 스캔된 변환 계수들 중 유효 변환 계수의 개수를 의미할 수 있다. The video decoding apparatus 100 can initialize numSigCoeff. In this case, numSigCoeff may mean the number of effective transform coefficients among the transform coefficients scanned before the current transform coefficient according to the reverse scan order.
비디오 복호화 장치(100)는 n을 15로 초기화하고, n이 0보다 크거나 같은 경우 n을 1만큼 감소시키고 for 문(970) 내 동작을 수행하고, n이 0보다 작은 경우, for 문(970) 내 동작을 더 이상 수행하지 않을 수 있다. 비디오 복호화 장치(100)는 역방향의 스캔 순서에 따라 현재 서브 블록 내 변환 계수들에 관한 정보를 스캔하는 동작 등을 수행할 수 있다.The video decoding apparatus 100 initializes n to 15. If n is greater than or equal to 0, n is decreased by 1 and an operation within the for 970 is performed. If n is smaller than 0, the for decoding 970 ) My action may no longer be performed. The video decoding apparatus 100 may perform an operation of scanning information on the current intra-block transform coefficients in a backward scan order.
비디오 복호화 장치(100)는 현재 서브 블록 내 현재 변환 계수의 위치 n에 기초하여 현재 변환 계수의 위치 xC, yC를 결정할 수 있다.The video decoding apparatus 100 can determine the position xC, yC of the current transform coefficient based on the position n of the current transform coefficient in the current subblock.
비디오 복호화 장치(100)는 현재 변환 계수에 관한 유효 변환 계수 플래그 sig_coeff_flag[xC][yC]의 값이 1인 경우, 현재 변환 계수에 관한 플래그 coeff_abs_level_greater1_flag의 값, 현재 변환 계수에 관한 플래그 coeff_abs_level_greater2_flag의 값의 합에 1을 합한 값을 baseLevel로 결정할 수 있다.When the value of the effective conversion coefficient flag sig_coeff_flag [xC] [yC] related to the current conversion coefficient is 1, the video decoding apparatus 100 sets the value of the flag coeff_abs_level_greater1_flag related to the current conversion coefficient, the value of the flag coeff_abs_level_greater2_flag You can determine baseLevel by adding the sum to the sum.
만약 numSigCoeff가 8보다 작고, 현재 변환 계수의 위치 n이 lastGreater1ScanPos인 경우라면 base level이 3인 경우, 비디오 복호화 장치(100)는 비트스트림으로부터 현재 변환 계수 n에 대한 잔여 레벨값 정보 coeff_abs_level_remaining[n]를 획득할 수 있다.If numSigCoeff is less than 8 and the position n of the current transform coefficient is lastGreater1ScanPos, if the base level is 3, the video decoding apparatus 100 extracts the residual level value information coeff_abs_level_remaining [n] for the current transform coefficient n from the bitstream Can be obtained.
만약 numSigCoeff가 8보다 작고, 현재 변환 계수의 위치 n이 lastGreater1ScanPos이 아닌 경우라면, base level이 2인 경우, 비디오 복호화 장치(100)는 비트스트림으로부터 현재 변환 계수 n에 대한 잔여 레벨값 정보 coeff_abs_level_remaining[n]를 획득할 수 있다. 만약 numSigCoeff가 8보다 크다면, base level이 1인 경우, 비디오 복호화 장치(100)는 비트스트림으로부터 현재 변환 계수 n에 대한 잔여 레벨값 정보 coeff_abs_level_remaining[n]를 획득할 수 있다.If numSigCoeff is less than 8 and the current position n of the transform coefficient is not lastGreater1ScanPos, if the base level is 2, the video decoding apparatus 100 extracts residual level value information coeff_abs_level_remaining [n Can be obtained. If numSigCoeff is greater than 8, if the base level is 1, the video decoding apparatus 100 may obtain the residual level value information coeff_abs_level_remaining [n] for the current transform coefficient n from the bitstream.
비디오 복호화 장치(100)는 현재 변환 계수에 대한 베이스 레벨 및 현재 변환 계수에 대한 잔여 레벨 값을 합하여 현재 블록 내 현재 변환 계수의 레벨 값인 TransCoeffLevel[x0][y0][cIdx][xC][yC]을 결정할 수 있다. 여기서, cIdx는 색상 성분을 나타내는 인덱스일 수 있다.The video decoding apparatus 100 obtains the TransCoeffLevel [x0] [y0] [cIdx] [xC] [yC], which is the level value of the current transform coefficient in the current block, by summing the base level for the current transform coefficient and the residual level value for the current transform coefficient. Can be determined. Here, cIdx may be an index indicating a color component.
만약 i가 0부터 1씩 증가하여 lastSubBlock보다 작거나 같은 값이 될때까지 반목문(for문)(975)에 포함된 동작을 수행할 수 있다. 이때, i는 서브 블록을 나타내는 인덱스일 수 있다. 즉, 비디오 복호화 장치(100)는 for문(975) 내 구문을 한번 수행할 때마다, 하나의 계수 그룹에 대한 동작을 수행할 수 있다. If i increases from 0 to 1, it can perform the operations contained in the forbidden statement (for statement) 975 until it becomes less than or equal to the value of lastSubBlock. In this case, i may be an index indicating a sub-block. That is, the video decoding apparatus 100 can perform an operation for one coefficient group every time the syntax in the for statement 975 is performed once.
만약 현재 서브 블록 i에 대한 플래그 coded_sub_block_flag[xS][yS]가 1인 경우, rsp가 적용되는 경우라면(rsp_apply), 비디오 복호화 장치(100)는 n을 15로 결정하고, n이 0보다 크거나 같다면 for문(980) 내 동작을 수행하고, n을 1만큼 감소시킨 후에, n이 0보다 크거나 같다면 for문(980) 동작을 다시 수행할 수 있다. 만약, n이 0보다 작다면 for문(980) 내 동작을 더 이상 수행하지 않을 수 있다.If the flag coded_sub_block_flag [xS] [yS] for the current subblock i is 1 and rsp is applied (rsp_apply), the video decoding apparatus 100 determines n to be 15, and if n is greater than 0 If it is the same, the for statement (980) operation can be performed again if n is greater than or equal to 0 after performing the operation in the for statement (980) and decrementing n by 1. If n is less than 0, the operation in the for statement (980) may not be performed any more.
비디오 복호화 장치(100)는 현재 서브 블록 내 현재 변환 계수의 위치 n에 대응하는 현재 변환 계수의 수평방향 위치 및 수직방향 위치 xC 및 yC를 결정할 수 있다. 비디오 복호화 장치(100)는 xC 및 yC에 기초하여 현재 변환 계수의 위치(blkpos)를 결정할 수 있다.The video decoding apparatus 100 can determine the horizontal position and the vertical position xC and yC of the current transform coefficient corresponding to the position n of the current transform coefficient in the current subblock. The video decoding apparatus 100 can determine the position (blkpos) of the current transform coefficient based on xC and yC.
비디오 복호화 장치(100)는 현재 변환 계수의 위치 blkpos가 rsp_pos가 아닌 경우, 부호가 숨겨진 변환 계수의 위치 hidden_pos이라면, 현재 변환 계수의 부호를 숨겨진 변환 계수의 부호 hidden_sign으로 결정할 수 있다.If the position blkpos of the current transform coefficient is not rsp_pos, the video decoding apparatus 100 can determine the sign of the current transform coefficient as the sign hidden_sign of the hidden transform coefficient if the code is the position hidden_pos of the transform coefficient hidden therein.
만약 그렇지 않은 경우(부호가 숨겨진 변환 계수의 위치 hidden_pos이 아닌 경우)라면, 비디오 복호화 장치(100)는 비트스트림으로부터 현재 변환 계수의 부호에 관한 정보 sign[xC][yC]를 획득할 수 있다.If not, the video decoding apparatus 100 can obtain the information sign [xC] [yC] concerning the sign of the current transform coefficient from the bitstream, if the code is not the position hidden_pos of the hidden transform coefficient.
비디오 복호화 장치(100)는 현재 변환 계수의 위치가 rsp_pos인 경우, 비트스트림으로부터 현재 변환 계수의 rsp 부호에 관한 정보 sign_rsp[xC][yC]를 획득할 수 있다.The video decoding apparatus 100 can obtain the information sign_rsp [xC] [yC] regarding the rsp code of the current transform coefficient from the bit stream when the current transform coefficient position is rsp_pos.
만약 rsp가 적용되지 않는다면, 비디오 복호화 장치(100)는 n을 15로 결정하고, n이 0보다 크다면 for문(985) 내 동작을 수행하고, n을 1만큼 감소시킨 후에 다시 n이 0보다 크거나 같다면 for문(985) 동작을 다시 수행할 수 있고, 만약, n이 0보다 작다면 for문(985) 내 동작을 더 이상 수행하지 않을 수 있다.If rsp is not applied, the video decoding apparatus 100 determines n to be 15. If n is greater than 0, the video decoding apparatus 100 performs the operation in the for statement (985), reduces n by 1, If greater than or equal to, the for statement (985) operation can be performed again, and if n is less than 0, the operation within the for statement (985) may no longer be performed.
비디오 복호화 장치(100)는 현재 서브 블록 내 현재 변환 계수의 위치 n에 대응하는 현재 변환 계수의 수평방향 위치 및 수직방향의 위치 xC 및 yC를 결정할 수 있다. 비디오 복호화 장치(100)는 xC 및 yC에 기초하여 현재 변환 계수의 위치(blkpos)를 결정할 수 있다.The video decoding apparatus 100 can determine the horizontal position and the vertical position xC and yC of the current transform coefficient corresponding to the position n of the current transform coefficient in the current subblock. The video decoding apparatus 100 can determine the position (blkpos) of the current transform coefficient based on xC and yC.
만약 현재 변환 계수의 유효 변환 계수 플래그 sig_coeff_flag[xC][yC]의 값이 1이고, 부호 데이터를 숨기는 것을 활성화하는지를 나타내는 플래그 sign_data_hiding_enabled_flag의 값이 0이거나, 현재 서브 블록에 대하여 숨겨진 부호가 없거나(!signHidden[i]), 정방향의 스캔 순서상 현재 서브 블록 내 현재 변환 계수의 위치가 첫번째 유효 변환 계수의 위치 firstSigScanPos가 0이 아닌 경우, 비트스트림으로부터 현재 변환 계수의 부호 정보 sign[xC][yC]를 획득할 수 있다.If the value of the flag sign_data_hiding_enabled_flag indicating whether the value of the effective conversion coefficient flag sig_coeff_flag [xC] [yC] of the current conversion coefficient is 1 and activating the hiding of the sign data is 0, or if there is no hidden code for the current subblock (! SignHidden If the position of the current transform coefficient in the current sub-block in the forward scan order is not the first effective transform coefficient position firstSigScanPos is 0, the sign information sign [xC] [yC] of the current transform coefficient is calculated from the bit stream Can be obtained.
이하, 도 10 내지 도 23을 참조하여 일 실시예에 따른 비디오 복호화 장치(100)가 영상을 복호화하는 과정에서 이용할 수 있는 데이터 단위를 결정하는 방법을 설명하도록 한다. 비디오 부호화 장치(150)의 동작은 후술하는 비디오 복호화 장치(100)의 동작에 대한 다양한 실시예와 유사하거나 반대되는 동작이 될 수 있다.Hereinafter, a method of determining a data unit usable in the process of decoding a video by the video decoding apparatus 100 according to an embodiment will be described with reference to FIGS. 10 to 23. FIG. The operation of the video encoding apparatus 150 may be similar to or opposite to the various embodiments of the operation of the video decoding apparatus 100 described later.
도 10은 일 실시예에 따라 비디오 복호화 장치(100)가 현재 부호화 단위를 분할하여 적어도 하나의 부호화 단위를 결정하는 과정을 도시한다.FIG. 10 illustrates a process in which the video decoding apparatus 100 determines at least one encoding unit by dividing a current encoding unit according to an embodiment.
일 실시예에 따라 비디오 복호화 장치(100)는 블록 형태 정보를 이용하여 부호화 단위의 형태를 결정할 수 있고, 분할 형태 정보를 이용하여 부호화 단위가 어떤 형태로 분할되는지를 결정할 수 있다. 즉, 비디오 복호화 장치(100)가 이용하는 블록 형태 정보가 어떤 블록 형태를 나타내는지에 따라 분할 형태 정보가 나타내는 부호화 단위의 분할 방법이 결정될 수 있다. According to an embodiment, the video decoding apparatus 100 can determine the type of an encoding unit using block type information, and can determine a type of an encoding unit to be divided using the type information. That is, the division method of the coding unit indicated by the division type information can be determined according to which block type the block type information used by the video decoding apparatus 100 represents.
일 실시예에 따라, 비디오 복호화 장치(100)는 현재 부호화 단위가 정사각형 형태임을 나타내는 블록 형태 정보를 이용할 수 있다. 예를 들어 비디오 복호화 장치(100)는 분할 형태 정보에 따라 정사각형의 부호화 단위를 분할하지 않을지, 수직으로 분할할지, 수평으로 분할할지, 4개의 부호화 단위로 분할할지 등을 결정할 수 있다. 도 10을 참조하면, 현재 부호화 단위(1000)의 블록 형태 정보가 정사각형의 형태를 나타내는 경우, 비디오 복호화 장치(100)는 분할되지 않음을 나타내는 분할 형태 정보에 따라 현재 부호화 단위(1000)와 동일한 크기를 가지는 부호화 단위(1010a)를 분할하지 않거나, 소정의 분할방법을 나타내는 분할 형태 정보에 기초하여 분할된 부호화 단위(1010b, 1010c, 1010d 등)를 결정할 수 있다. According to an embodiment, the video decoding apparatus 100 may use block type information indicating that the current encoding unit is a square type. For example, the video decoding apparatus 100 can determine whether to divide a square encoding unit according to division type information, vertically divide, horizontally divide, or divide into four encoding units. 10, if the block type information of the current encoding unit 1000 indicates a square shape, the video decoding apparatus 100 may calculate the size of the current encoding unit 1000 according to the division type information indicating that the current block is not divided, (1010b), 1010c (1010d, etc.) based on the division type information indicating the predetermined division method.
도 10을 참조하면 비디오 복호화 장치(100)는 일 실시예에 따라 수직방향으로 분할됨을 나타내는 분할 형태 정보에 기초하여 현재 부호화 단위(1000)를 수직방향으로 분할한 두개의 부호화 단위(1010b)를 결정할 수 있다. 비디오 복호화 장치(100)는 수평방향으로 분할됨을 나타내는 분할 형태 정보에 기초하여 현재 부호화 단위(1000)를 수평방향으로 분할한 두개의 부호화 단위(1010c)를 결정할 수 있다. 비디오 복호화 장치(100)는 수직방향 및 수평방향으로 분할됨을 나타내는 분할 형태 정보에 기초하여 현재 부호화 단위(1000)를 수직방향 및 수평방향으로 분할한 네개의 부호화 단위(1010d)를 결정할 수 있다. 다만 정사각형의 부호화 단위가 분할될 수 있는 분할 형태는 상술한 형태로 한정하여 해석되어서는 안되고, 분할 형태 정보가 나타낼 수 있는 다양한 형태가 포함될 수 있다. 정사각형의 부호화 단위가 분할되는 소정의 분할 형태들은 이하에서 다양한 실시예를 통해 구체적으로 설명하도록 한다. Referring to FIG. 10, the video decoding apparatus 100 determines two coding units 1010b obtained by dividing the current coding unit 1000 in the vertical direction based on division type information indicating division in the vertical direction according to an embodiment . The video decoding apparatus 100 can determine two coding units 1010c obtained by dividing the current coding unit 1000 in the horizontal direction based on the division type information indicating that the coding unit is divided in the horizontal direction. The video decoding apparatus 100 can determine four coding units 1010d obtained by dividing the current coding unit 1000 in the vertical direction and the horizontal direction based on the division type information indicating that the coding unit 1000 is divided in the vertical direction and the horizontal direction. However, the division type in which the square coding unit can be divided should not be limited to the above-mentioned form, but may include various forms in which the division type information can be represented. The predetermined divisional form in which the square encoding unit is divided will be described in detail by way of various embodiments below.
도 11은 일 실시예에 따라 비디오 복호화 장치(100)가 비-정사각형의 형태인 부호화 단위를 분할하여 적어도 하나의 부호화 단위를 결정하는 과정을 도시한다.FIG. 11 illustrates a process in which the video decoding apparatus 100 determines at least one encoding unit by dividing an encoding unit in the form of a non-square according to an embodiment.
일 실시예에 따라 비디오 복호화 장치(100)는 현재 부호화 단위가 비-정사각형 형태임을 나타내는 블록 형태 정보를 이용할 수 있다. 비디오 복호화 장치(100)는 분할 형태 정보에 따라 비-정사각형의 현재 부호화 단위를 분할하지 않을지 소정의 방법으로 분할할지 여부를 결정할 수 있다. 도 11을 참조하면, 현재 부호화 단위(1100 또는 1150)의 블록 형태 정보가 비-정사각형의 형태를 나타내는 경우, 비디오 복호화 장치(100)는 분할되지 않음을 나타내는 분할 형태 정보에 따라 현재 부호화 단위(1100 또는 1150)와 동일한 크기를 가지는 부호화 단위(1110 또는 1160)를 분할하지 않거나, 소정의 분할방법을 나타내는 분할 형태 정보에 따라 기초하여 분할된 부호화 단위(1120a, 1120b, 1130a, 1130b, 1130c, 1170a, 1170b, 1180a, 1180b, 1180c)를 결정할 수 있다. 비-정사각형의 부호화 단위가 분할되는 소정의 분할 방법은 이하에서 다양한 실시예를 통해 구체적으로 설명하도록 한다.According to an exemplary embodiment, the video decoding apparatus 100 may use block type information indicating that the current encoding unit is a non-square format. The video decoding apparatus 100 can determine whether to divide the non-square current encoding unit according to the division type information or not in a predetermined method. 11, if the block type information of the current encoding unit 1100 or 1150 indicates a non-square shape, the video decoding apparatus 100 determines the current encoding unit 1100 or 1150 according to the division type information indicating that the current block is not divided 1130a, 1130b, 1130c, 1170a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1130a, 1170b, 1180a, 1180b, and 1180c. The predetermined division method in which the non-square coding unit is divided will be described in detail through various embodiments.
일 실시예에 따라 비디오 복호화 장치(100)는 분할 형태 정보를 이용하여 부호화 단위가 분할되는 형태를 결정할 수 있고, 이 경우 분할 형태 정보는 부호화 단위가 분할되어 생성되는 적어도 하나의 부호화 단위의 개수를 나타낼 수 있다. 도 11를 참조하면 분할 형태 정보가 두개의 부호화 단위로 현재 부호화 단위(1100 또는 1150)가 분할되는 것을 나타내는 경우, 비디오 복호화 장치(100)는 분할 형태 정보에 기초하여 현재 부호화 단위(1100 또는 1150)를 분할하여 현재 부호화 단위에 포함되는 두개의 부호화 단위(1120a, 11420b, 또는 1170a, 1170b)를 결정할 수 있다. According to an embodiment, the video decoding apparatus 100 may determine a type in which a coding unit is divided using the division type information. In this case, the division type information indicates a number of at least one coding unit generated by dividing an encoding unit . 11, when the division type information indicates that the current encoding unit 1100 or 1150 is divided into two encoding units, the video decoding apparatus 100 determines the current encoding unit 1100 or 1150 based on the division type information, To determine two encoding units 1120a, 11420b, or 1170a and 1170b included in the current encoding unit.
일 실시예에 따라 비디오 복호화 장치(100)가 분할 형태 정보에 기초하여 비-정사각형의 형태의 현재 부호화 단위(1100 또는 1150)를 분할하는 경우, 비-정사각형의 현재 부호화 단위(1100 또는 1150)의 긴 변의 위치를 고려하여 현재 부호화 단위를 분할할 수 있다. 예를 들면, 비디오 복호화 장치(100)는 현재 부호화 단위(1100 또는 1150)의 형태를 고려하여 현재 부호화 단위(1100 또는 1150)의 긴 변을 분할하는 방향으로 현재 부호화 단위(1100 또는 1150)를 분할하여 복수개의 부호화 단위를 결정할 수 있다. When the video decoding apparatus 100 divides the current encoding unit 1100 or 1150 in the form of non-square based on the division type information according to an embodiment, the non-square current encoding unit 1100 or 1150 The current encoding unit can be divided in consideration of the position of the long side. For example, the video decoding apparatus 100 divides the current encoding unit 1100 or 1150 in the direction of dividing the long side of the current encoding unit 1100 or 1150 in consideration of the type of the current encoding unit 1100 or 1150 So that a plurality of encoding units can be determined.
일 실시예에 따라, 분할 형태 정보가 홀수개의 블록으로 부호화 단위를 분할하는 것을 나타내는 경우, 비디오 복호화 장치(100)는 현재 부호화 단위(1100 또는 1150)에 포함되는 홀수개의 부호화 단위를 결정할 수 있다. 예를 들면, 분할 형태 정보가 3개의 부호화 단위로 현재 부호화 단위(1100 또는 1150)를 분할하는 것을 나타내는 경우, 비디오 복호화 장치(100)는 현재 부호화 단위(1100 또는 1150)를 3개의 부호화 단위(1130a, 1130b, 1130c, 1180a, 1180b, 1180c)로 분할할 수 있다. 일 실시예에 따라 비디오 복호화 장치(100)는 현재 부호화 단위(1100 또는 1150)에 포함되는 홀수개의 부호화 단위를 결정할 수 있으며, 결정된 부호화 단위들의 크기 모두가 동일하지는 않을 수 있다. 예를 들면, 결정된 홀수개의 부호화 단위(1130a, 1130b, 1130c, 1180a, 1180b, 1180c) 중 소정의 부호화 단위(1130b 또는 1180b)의 크기는 다른 부호화 단위(1130a, 1130c, 1180a, 1180c)들과는 다른 크기를 가질 수도 있다. 즉, 현재 부호화 단위(1100 또는 1150)가 분할되어 결정될 수 있는 부호화 단위는 복수의 종류의 크기를 가질 수 있고, 경우에 따라서는 홀수개의 부호화 단위(1130a, 1130b, 1130c, 1180a, 1180b, 1180c)가 각각 서로 다른 크기를 가질 수도 있다. According to an embodiment, when the division type information indicates division of an encoding unit into odd number of blocks, the video decoding apparatus 100 may determine an odd number of encoding units included in the current encoding unit 1100 or 1150. For example, when the division type information indicates that the current encoding unit 1100 or 1150 is divided into three encoding units, the video decoding apparatus 100 divides the current encoding unit 1100 or 1150 into three encoding units 1130a , 1130b, 1130c, 1180a, 1180b, 1180c. According to an embodiment, the video decoding apparatus 100 may determine an odd number of encoding units included in the current encoding unit 1100 or 1150, and the sizes of the determined encoding units may not be the same. For example, the size of a predetermined encoding unit 1130b or 1180b among the determined odd number of encoding units 1130a, 1130b, 1130c, 1180a, 1180b, and 1180c is different from that of other encoding units 1130a, 1130c, 1180a, and 1180c . That is, an encoding unit that can be determined by dividing the current encoding unit 1100 or 1150 may have a plurality of types of sizes, and an odd number of encoding units 1130a, 1130b, 1130c, 1180a, 1180b, May have different sizes.
일 실시예에 따라 분할 형태 정보가 홀수개의 블록으로 부호화 단위가 분할되는 것을 나타내는 경우, 비디오 복호화 장치(100)는 현재 부호화 단위(1100 또는 1150)에 포함되는 홀수개의 부호화 단위를 결정할 수 있고, 나아가 비디오 복호화 장치(100)는 분할하여 생성되는 홀수개의 부호화 단위들 중 적어도 하나의 부호화 단위에 대하여 소정의 제한을 둘 수 있다. 도 11을 참조하면 비디오 복호화 장치(100)는 현재 부호화 단위(1100 또는 1150)가 분할되어 생성된 3개의 부호화 단위(1130a, 1130b, 1130c, 1180a, 1180b, 1180c)들 중 중앙에 위치하는 부호화 단위(1130b, 1180b)에 대한 복호화 과정을 다른 부호화 단위(1130a, 1130c, 1180a, 1180c)와 다르게 할 수 있다. 예를 들면, 비디오 복호화 장치(100)는 중앙에 위치하는 부호화 단위(1130b, 1180b)에 대하여는 다른 부호화 단위(1130a, 1130c, 1180a, 1180c)와 달리 더 이상 분할되지 않도록 제한하거나, 소정의 횟수만큼만 분할되도록 제한할 수 있다.According to an embodiment, when the division type information indicates that an encoding unit is divided into an odd number of blocks, the video decoding apparatus 100 can determine an odd number of encoding units included in the current encoding unit 1100 or 1150, The video decoding apparatus 100 may limit a coding unit of at least one of odd number of coding units generated by division. Referring to FIG. 11, the video decoding apparatus 100 includes an encoding unit 1130a, 1130b, 1130c, 1180a, 1180b, and 1180c generated by dividing a current encoding unit 1100 or 1150, 1130b, and 1180b may be different from the other encoding units 1130a, 1130c, 1180a, and 1180c. For example, in the video decoding apparatus 100, unlike the other encoding units 1130a, 1130c, 1180a, and 1180c, the encoding units 1130b and 1180b positioned at the center are restricted so as not to be further divided, It can be limited to be divided.
도 12는 일 실시예에 따라 비디오 복호화 장치(100)가 블록 형태 정보 및 분할 형태 정보 중 적어도 하나에 기초하여 부호화 단위를 분할하는 과정을 도시한다.12 shows a process in which the video decoding apparatus 100 divides an encoding unit based on at least one of block type information and division type information according to an embodiment.
일 실시예에 따라 비디오 복호화 장치(100)는 블록 형태 정보 및 분할 형태 정보 중 적어도 하나에 기초하여 정사각형 형태의 제1 부호화 단위(1200)를 부호화 단위들로 분할하거나 분할하지 않는 것으로 결정할 수 있다. 일 실시예에 따라 분할 형태 정보가 수평 방향으로 제1 부호화 단위(1200)를 분할하는 것을 나타내는 경우, 비디오 복호화 장치(100)는 제1 부호화 단위(1200)를 수평 방향으로 분할하여 제2 부호화 단위(1210)를 결정할 수 있다. 일 실시예에 따라 이용되는 제1 부호화 단위, 제2 부호화 단위, 제3 부호화 단위는 부호화 단위 간의 분할 전후 관계를 이해하기 위해 이용된 용어이다. 예를 들면, 제1 부호화 단위를 분할하면 제2 부호화 단위가 결정될 수 있고, 제2 부호화 단위가 분할되면 제3 부호화 단위가 결정될 수 있다. 이하에서는 이용되는 제1 부호화 단위, 제2 부호화 단위 및 제3 부호화 단위의 관계는 상술한 특징에 따르는 것으로 이해될 수 있다. According to an embodiment, the video decoding apparatus 100 may determine to divide or not divide the first coding unit 1200 in units of coding units into coding units based on at least one of the block type information and the division type information. According to an embodiment, when the division type information indicates that the first encoding unit 1200 is divided in the horizontal direction, the video decoding apparatus 100 divides the first encoding unit 1200 in the horizontal direction, (1210). The first encoding unit, the second encoding unit, and the third encoding unit used according to an embodiment are terms used to understand the relation before and after the division between encoding units. For example, if the first encoding unit is divided, the second encoding unit can be determined, and if the second encoding unit is divided, the third encoding unit can be determined. Hereinafter, the relationship between the first coding unit, the second coding unit and the third coding unit used can be understood to be in accordance with the above-mentioned characteristic.
일 실시예에 따라 비디오 복호화 장치(100)는 결정된 제2 부호화 단위(1210)를 블록 형태 정보 및 분할 형태 정보 중 적어도 하나에 기초하여 부호화 단위들로 분할하거나 분할하지 않는 것으로 결정할 수 있다. 도 12를 참조하면 비디오 복호화 장치(100)는 블록 형태 정보 및 분할 형태 정보 중 적어도 하나에 기초하여 제1 부호화 단위(1200)를 분할하여 결정된 비-정사각형의 형태의 제2 부호화 단위(1210)를 적어도 하나의 제3 부호화 단위(1220a, 1220b, 1220c, 1220d 등)로 분할하거나 제2 부호화 단위(1210)를 분할하지 않을 수 있다. 비디오 복호화 장치(100)는 블록 형태 정보 및 분할 형태 정보 중 적어도 하나를 획득할 수 있고 비디오 복호화 장치(100)는 획득한 블록 형태 정보 및 분할 형태 정보 중 적어도 하나에 기초하여 제1 부호화 단위(1200)를 분할하여 다양한 형태의 복수개의 제2 부호화 단위(예를 들면, 1210)를 분할할 수 있으며, 제2 부호화 단위(1210)는 블록 형태 정보 및 분할 형태 정보 중 적어도 하나에 기초하여 제1 부호화 단위(1200)가 분할된 방식에 따라 분할될 수 있다. 일 실시예에 따라, 제1 부호화 단위(1200)가 제1 부호화 단위(1200)에 대한 블록 형태 정보 및 분할 형태 정보 중 적어도 하나에 기초하여 제2 부호화 단위(1210)로 분할된 경우, 제2 부호화 단위(1210) 역시 제2 부호화 단위(1210)에 대한 블록 형태 정보 및 분할 형태 정보 중 적어도 하나에 기초하여 제3 부호화 단위(예를 들면, 1220a, 1220b, 1220c, 1220d 등)으로 분할될 수 있다. 즉, 부호화 단위는 부호화 단위 각각에 관련된 분할 형태 정보 및 블록 형태 정보 중 적어도 하나에 기초하여 재귀적으로 분할될 수 있다. 따라서 비-정사각형 형태의 부호화 단위에서 정사각형의 부호화 단위가 결정될 수 있고, 이러한 정사각형 형태의 부호화 단위가 재귀적으로 분할되어 비-정사각형 형태의 부호화 단위가 결정될 수도 있다. 도 12를 참조하면, 비-정사각형 형태의 제2 부호화 단위(1210)가 분할되어 결정되는 홀수개의 제3 부호화 단위(1220b, 1220c, 1220d) 중 소정의 부호화 단위(예를 들면, 가운데에 위치하는 부호화 단위 또는 정사각형 형태의 부호화 단위)는 재귀적으로 분할될 수 있다. 일 실시예에 따라 홀수개의 제3 부호화 단위(1220b, 1220c, 1220d) 중 하나인 정사각형 형태의 제3 부호화 단위(1220c)는 수평 방향으로 분할되어 복수개의 제4 부호화 단위로 분할될 수 있다. 복수개의 제4 부호화 단위 중 하나인 비-정사각형 형태의 제4 부호화 단위(1240)는 다시 복수개의 부호화 단위들로 분할될 수 있다. 예를 들면, 비-정사각형 형태의 제4 부호화 단위(1240)는 홀수개의 부호화 단위(1250a, 1250b, 1250c)로 다시 분할될 수도 있다.According to an embodiment, the video decoding apparatus 100 may determine that the determined second encoding unit 1210 is not divided or divided into encoding units based on at least one of the block type information and the division type information. 12, the video decoding apparatus 100 includes a second encoding unit 1210 of a non-square shape determined by dividing a first encoding unit 1200 based on at least one of block type information and division type information, It may be divided into at least one third encoding unit 1220a, 1220b, 1220c, 1220d, or the like, or the second encoding unit 1210 may not be divided. The video decoding apparatus 100 can acquire at least one of block type information and division type information and the video decoding apparatus 100 can acquire at least one of the first encoding unit 1200 The second encoding unit 1210 may divide a plurality of second encoding units (for example, 1210) of various types into a first encoding unit 1210 based on at least one of block type information and division type information, The unit 1200 can be divided according to the divided method. According to one embodiment, when the first encoding unit 1200 is divided into the second encoding units 1210 based on at least one of the block type information and the division type information for the first encoding unit 1200, The encoding unit 1210 may also be divided into a third encoding unit (e.g., 1220a, 1220b, 1220c, 1220d, etc.) based on at least one of block type information and division type information for the second encoding unit 1210 have. That is, an encoding unit can be recursively divided based on at least one of division type information and block type information associated with each encoding unit. Therefore, a square encoding unit may be determined in a non-square encoding unit, and a non-square encoding unit may be determined by dividing the square encoding unit recursively. Referring to FIG. 12, among the odd third encoding units 1220b, 1220c, and 1220d in which the non-square second encoding unit 1210 is divided and determined, predetermined encoding units (for example, An encoding unit or a square-shaped encoding unit) can be recursively divided. According to an exemplary embodiment, the third encoding unit 1220c in the form of a square, which is one of the odd numbered third encoding units 1220b, 1220c, and 1220d, may be divided in the horizontal direction and divided into a plurality of fourth encoding units. The non-square fourth encoding unit 1240, which is one of the plurality of fourth encoding units, may be further divided into a plurality of encoding units. For example, the non-square-shaped fourth encoding unit 1240 may be further divided into odd-numbered encoding units 1250a, 1250b, and 1250c.
부호화 단위의 재귀적 분할에 이용될 수 있는 방법에 대하여는 다양한 실시예를 통해 후술하도록 한다.A method which can be used for recursive division of an encoding unit will be described later in various embodiments.
일 실시예에 따라 비디오 복호화 장치(100)는 블록 형태 정보 및 분할 형태 정보 중 적어도 하나에 기초하여 제3 부호화 단위(1220a, 1220b, 1220c, 1220d 등) 각각을 부호화 단위들로 분할하거나 제2 부호화 단위(1210)를 분할하지 않는 것으로 결정할 수 있다. 비디오 복호화 장치(100)는 일 실시예에 따라 비-정사각형 형태의 제2 부호화 단위(1210)를 홀수개의 제3 부호화 단위(1220b, 1220c, 1220d)로 분할할 수 있다. 비디오 복호화 장치(100)는 홀수개의 제3 부호화 단위(1220b, 1220c, 1220d) 중 소정의 제3 부호화 단위에 대하여 소정의 제한을 둘 수 있다. 예를 들면 비디오 복호화 장치(100)는 홀수개의 제3 부호화 단위(1220b, 1220c, 1220d) 중 가운데에 위치하는 부호화 단위(1220c)에 대하여는 더 이상 분할되지 않는 것으로 제한하거나 또는 설정 가능한 횟수로 분할되어야 하는 것으로 제한할 수 있다. 도 12를 참조하면, 비디오 복호화 장치(100)는 비-정사각형 형태의 제2 부호화 단위(1210)에 포함되는 홀수개의 제3 부호화 단위(1220b, 1220c, 1220d)들 중 가운데에 위치하는 부호화 단위(1220c)는 더 이상 분할되지 않거나, 소정의 분할 형태로 분할(예를 들면 4개의 부호화 단위로만 분할하거나 제2 부호화 단위(1210)가 분할된 형태에 대응하는 형태로 분할)되는 것으로 제한하거나, 소정의 횟수로만 분할(예를 들면 n회만 분할, n>0)하는 것으로 제한할 수 있다. 다만 가운데에 위치한 부호화 단위(1220c)에 대한 상기 제한은 단순한 실시예들에 불과하므로 상술한 실시예들로 제한되어 해석되어서는 안되고, 가운데에 위치한 부호화 단위(1220c)가 다른 부호화 단위(1220b, 1220d)와 다르게 복호화 될 수 있는 다양한 제한들을 포함하는 것으로 해석되어야 한다.According to one embodiment, the video decoding apparatus 100 divides each of the third encoding units 1220a, 1220b, 1220c, and 1220d into units of encoding based on at least one of block type information and division type information, It can be determined that the unit 1210 is not divided. The video decoding apparatus 100 may divide the second encoding unit 1210 in a non-square form into third encoding units 1220b, 1220c, and 1220d in an odd number according to an embodiment. The video decoding apparatus 100 may set a predetermined restriction on a predetermined third encoding unit among odd numbered third encoding units 1220b, 1220c, and 1220d. For example, the video decoding apparatus 100 may restrict the encoding unit 1220c located in the middle among the odd-numbered third encoding units 1220b, 1220c, and 1220d to no longer be divided, or be divided into a set number of times . 12, the video decoding apparatus 100 may include an encoding unit (not shown) located in the middle among the odd third encoding units 1220b, 1220c, and 1220d included in the second encoding unit 1210 in the non- 1220c may not be further divided or may be limited to being divided into a predetermined division type (for example, divided into four coding units or divided into a form corresponding to the divided form of the second coding unit 1210) (For example, dividing only n times, n > 0). The above restriction on the encoding unit 1220c positioned in the center is merely an example and should not be construed to be limited to the above embodiments and the encoding unit 1220c located in the center is not limited to the other encoding units 1220b and 1220d Quot;), &lt; / RTI &gt; which can be decoded differently.
일 실시예에 따라 비디오 복호화 장치(100)는 현재 부호화 단위를 분할하기 위해 이용되는 블록 형태 정보 및 분할 형태 정보 중 적어도 하나를 현재 부호화 단위 내의 소정의 위치에서 획득할 수 있다. According to an embodiment, the video decoding apparatus 100 can acquire at least one of the block type information and the division type information used for dividing the current encoding unit at a predetermined position in the current encoding unit.
도 13은 일 실시예에 따라 비디오 복호화 장치(100)가 홀수개의 부호화 단위들 중 소정의 부호화 단위를 결정하기 위한 방법을 도시한다. 도 13을 참조하면, 현재 부호화 단위(1300)의 블록 형태 정보 및 분할 형태 정보 중 적어도 하나는 현재 부호화 단위(1300)에 포함되는 복수개의 샘플 중 소정 위치의 샘플(예를 들면, 가운데에 위치하는 샘플(1340))에서 획득될 수 있다. 다만 이러한 블록 형태 정보 및 분할 형태 정보 중 적어도 하나가 획득될 수 있는 현재 부호화 단위(1300) 내의 소정 위치가 도 13에서 도시하는 가운데 위치로 한정하여 해석되어서는 안되고, 소정 위치에는 현재 부호화 단위(1300)내에 포함될 수 있는 다양한 위치(예를 들면, 최상단, 최하단, 좌측, 우측, 좌측상단, 좌측하단, 우측상단 또는 우측하단 등)가 포함될 수 있는 것으로 해석되어야 한다. 비디오 복호화 장치(100)는 소정 위치로부터 획득되는 블록 형태 정보 및 분할 형태 정보 중 적어도 하나를 획득하여 현재 부호화 단위를 다양한 형태 및 크기의 부호화 단위들로 분할하거나 분할하지 않는 것으로 결정할 수 있다.FIG. 13 illustrates a method for the video decoding apparatus 100 to determine a predetermined encoding unit among an odd number of encoding units according to an embodiment. 13, at least one of the block type information and the division type information of the current encoding unit 1300 is a sample of a predetermined position among a plurality of samples included in the current encoding unit 1300 (for example, Sample 1340). However, the predetermined position in the current coding unit 1300 in which at least one of the block type information and the division type information can be obtained should not be limited to the middle position shown in FIG. 13, and the current coding unit 1300 (E.g., top, bottom, left, right, top left, bottom left, top right or bottom right, etc.) The video decoding apparatus 100 may determine that the current encoding unit is not divided or divided into the encoding units of various types and sizes by acquiring at least one of the block type information and the division type information obtained from the predetermined position.
일 실시예에 따라 비디오 복호화 장치(100)는 현재 부호화 단위가 소정의 개수의 부호화 단위들로 분할된 경우 그 중 하나의 부호화 단위를 선택할 수 있다. 복수개의 부호화 단위들 중 하나를 선택하기 위한 방법은 다양할 수 있으며, 이러한 방법들에 대한 설명은 이하의 다양한 실시예를 통해 후술하도록 한다.According to an exemplary embodiment, when the current encoding unit is divided into a predetermined number of encoding units, the video decoding apparatus 100 may select one of the encoding units. The method for selecting one of the plurality of encoding units may be various, and description of these methods will be described later in various embodiments.
일 실시예에 따라 비디오 복호화 장치(100) 는 현재 부호화 단위를 복수개의 부호화 단위들로 분할하고, 소정 위치의 부호화 단위를 결정할 수 있다. According to an embodiment, the video decoding apparatus 100 may divide the current encoding unit into a plurality of encoding units and determine a unit of encoding at a predetermined position.
도 13은 일 실시예에 따라 비디오 복호화 장치(100)가 홀수개의 부호화 단위들 중 소정 위치의 부호화 단위를 결정하기 위한 방법을 도시한다.FIG. 13 illustrates a method for the video decoding apparatus 100 to determine an encoding unit of a predetermined position among odd number of encoding units according to an embodiment.
일 실시예에 따라 비디오 복호화 장치(100)는 홀수개의 부호화 단위들 중 가운데에 위치하는 부호화 단위를 결정하기 위하여 홀수개의 부호화 단위들 각각의 위치를 나타내는 정보를 이용할 수 있다. 도 13을 참조하면, 비디오 복호화 장치(100)는 현재 부호화 단위(1300)를 분할하여 홀수개의 부호화 단위들(1320a, 1320b, 1320c)을 결정할 수 있다. 비디오 복호화 장치(100)는 홀수개의 부호화 단위들(1320a, 1320b, 1320c)의 위치에 대한 정보를 이용하여 가운데 부호화 단위(1320b)를 결정할 수 있다. 예를 들면 비디오 복호화 장치(100)는 부호화 단위들(1320a, 1320b, 1320c)에 포함되는 소정의 샘플의 위치를 나타내는 정보에 기초하여 부호화 단위들(1320a, 1320b, 1320c)의 위치를 결정함으로써 가운데에 위치하는 부호화 단위(1320b)를 결정할 수 있다. 구체적으로, 비디오 복호화 장치(100)는 부호화 단위들(1320a, 1320b, 1320c)의 좌측 상단의 샘플(1330a, 1330b, 1330c)의 위치를 나타내는 정보에 기초하여 부호화 단위(1320a, 1320b, 1320c)의 위치를 결정함으로써 가운데에 위치하는 부호화 단위(1320b)를 결정할 수 있다. According to an embodiment, the video decoding apparatus 100 may use information indicating positions of odd-numbered encoding units in order to determine an encoding unit located in the middle among odd-numbered encoding units. Referring to FIG. 13, the video decoding apparatus 100 may determine an odd number of encoding units 1320a, 1320b, and 1320c by dividing the current encoding unit 1300. FIG. The video decoding apparatus 100 may determine the center encoding unit 1320b using information on the positions of odd number of encoding units 1320a, 1320b, and 1320c. For example, the video decoding apparatus 100 determines the positions of the encoding units 1320a, 1320b, and 1320c based on information indicating the positions of predetermined samples included in the encoding units 1320a, 1320b, and 1320c, Can be determined. More specifically, the video decoding apparatus 100 decodes the coding units 1320a, 1320b, and 1320c based on information indicating the positions of the upper left samples 1330a, 1330b, and 1330c of the coding units 1320a, 1320b, By determining the position, the coding unit 1320b located in the center can be determined.
일 실시예에 따라 부호화 단위(1320a, 1320b, 1320c)에 각각 포함되는 좌측 상단의 샘플(1330a, 1330b, 1330c)의 위치를 나타내는 정보는 부호화 단위(1320a, 1320b, 1320c)의 픽쳐 내에서의 위치 또는 좌표에 대한 정보를 포함할 수 있다. 일 실시예에 따라 부호화 단위(1320a, 1320b, 1320c)에 각각 포함되는 좌측 상단의 샘플(1330a, 1330b, 1330c)의 위치를 나타내는 정보는 현재 부호화 단위(1300)에 포함되는 부호화단위(1320a, 1320b, 1320c)들의 너비 또는 높이를 나타내는 정보를 포함할 수 있고, 이러한 너비 또는 높이는 부호화 단위(1320a, 1320b, 1320c)의 픽쳐 내에서의 좌표 간의 차이를 나타내는 정보에 해당할 수 있다. 즉, 비디오 복호화 장치(100)는 부호화 단위(1320a, 1320b, 1320c)의 픽쳐 내에서의 위치 또는 좌표에 대한 정보를 직접이용하거나 좌표간의 차이값에 대응하는 부호화 단위의 너비 또는 높이에 대한 정보를 이용함으로써 가운데에 위치하는 부호화 단위(1320b)를 결정할 수 있다. Information indicating the positions of the upper left samples 1330a, 1330b, and 1330c included in the coding units 1320a, 1320b, and 1320c according to an exemplary embodiment is a position in the picture of the coding units 1320a, 1320b, and 1320c Or information about the coordinates. Information indicating the positions of the upper left samples 1330a, 1330b, and 1330c included in the coding units 1320a, 1320b, and 1320c according to one embodiment is stored in the coding units 1320a and 1320b included in the current coding unit 1300 And 1320c, and the width or height may correspond to information indicating a difference between coordinates in the picture of the encoding units 1320a, 1320b, and 1320c. That is, the video decoding apparatus 100 can directly use the information on the position or the coordinates in the picture of the coding units 1320a, 1320b, and 1320c or the information on the width or height of the coding unit corresponding to the difference value between the coordinates The encoding unit 1320b located in the center can be determined.
일 실시예에 따라, 상단 부호화 단위(1320a)의 좌측 상단의 샘플(1330a)의 위치를 나타내는 정보는 (xa, ya) 좌표를 나타낼 수 있고, 가운데 부호화 단위(1320b)의 좌측 상단의 샘플(1330b)의 위치를 나타내는 정보는 (xb, yb) 좌표를 나타낼 수 있고, 하단 부호화 단위(1320c)의 좌측 상단의 샘플(1330c)의 위치를 나타내는 정보는 (xc, yc) 좌표를 나타낼 수 있다. 비디오 복호화 장치(100)는 부호화 단위(1320a, 1320b, 1320c)에 각각 포함되는 좌측 상단의 샘플(1330a, 1330b, 1330c)의 좌표를 이용하여 가운데 부호화 단위(1320b)를 결정할 수 있다. 예를 들면, 좌측 상단의 샘플(1330a, 1330b, 1330c)의 좌표를 오름차순 또는 내림차순으로 정렬하였을 때, 가운데에 위치하는 샘플(1330b)의 좌표인 (xb, yb)를 포함하는 부호화 단위(1320b)를 현재 부호화 단위(1300)가 분할되어 결정된 부호화 단위(1320a, 1320b, 1320c) 중 가운데에 위치하는 부호화 단위로 결정할 수 있다. 다만 좌측 상단의 샘플(1330a, 1330b, 1330c)의 위치를 나타내는 좌표는 픽쳐 내에서의 절대적인 위치를 나타내는 좌표를 나타낼 수 있고, 나아가 상단 부호화 단위(1320a)의 좌측 상단의 샘플(1330a)의 위치를 기준으로, 가운데 부호화 단위(1320b)의 좌측 상단의 샘플(1330b)의 상대적 위치를 나타내는 정보인 (dxb, dyb)좌표, 하단 부호화 단위(1320c)의 좌측 상단의 샘플(1330c)의 상대적 위치를 나타내는 정보인 (dxc, dyc)좌표를 이용할 수도 있다. 또한 부호화 단위에 포함되는 샘플의 위치를 나타내는 정보로서 해당 샘플의 좌표를 이용함으로써 소정 위치의 부호화 단위를 결정하는 방법이 상술한 방법으로 한정하여 해석되어서는 안되고, 샘플의 좌표를 이용할 수 있는 다양한 산술적 방법으로 해석되어야 한다.The information indicating the position of the upper left sample 1330a of the upper coding unit 1320a may indicate the coordinates (xa, ya) and the upper left sample 1330b of the middle coding unit 1320b May represent the coordinates (xb, yb), and the information indicating the position of the upper left sample 1330c of the lower coding unit 1320c may indicate the coordinates (xc, yc). The video decoding apparatus 100 can determine the center encoding unit 1320b using the coordinates of the upper left samples 1330a, 1330b, and 1330c included in the encoding units 1320a, 1320b, and 1320c. For example, when the coordinates of the upper left samples 1330a, 1330b, and 1330c are sorted in ascending or descending order, the coding unit 1320b including the coordinates (xb, yb) of the sample 1330b positioned at the center, May be determined as a coding unit located in the middle of the coding units 1320a, 1320b, and 1320c determined by dividing the current coding unit 1300. [ However, the coordinates indicating the positions of the samples 1330a, 1330b, and 1330c in the upper left corner may indicate the coordinates indicating the absolute position in the picture, and the position of the upper left sample 1330a of the upper coding unit 1320a may be (Dxb, dyb), which is the information indicating the relative position of the sample 1330b at the upper left of the middle encoding unit 1320b, and the relative position of the sample 1330c at the upper left of the lower encoding unit 1320c Information dyn (dxc, dyc) coordinates may also be used. Also, the method of determining the coding unit at a predetermined position by using the coordinates of the sample as information indicating the position of the sample included in the coding unit should not be limited to the above-described method, and various arithmetic Should be interpreted as a method.
일 실시예에 따라 비디오 복호화 장치(100)는 현재 부호화 단위(1300)를 복수개의 부호화 단위(1320a, 1320b, 1320c)로 분할할 수 있고, 부호화 단위(1320a, 1320b, 1320c)들 중 소정의 기준에 따라 부호화 단위를 선택할 수 있다. 예를 들면, 비디오 복호화 장치(100)는 부호화 단위(1320a, 1320b, 1320c) 중 크기가 다른 부호화 단위(1320b)를 선택할 수 있다.The video decoding apparatus 100 may divide the current encoding unit 1300 into a plurality of encoding units 1320a, 1320b, and 1320c and may convert the encoding units 1320a, 1320b, The encoding unit can be selected. For example, the video decoding apparatus 100 can select an encoding unit 1320b having a different size from among the encoding units 1320a, 1320b, and 1320c.
일 실시예에 따라 비디오 복호화 장치(100)는 상단 부호화 단위(1320a)의 좌측 상단의 샘플(1330a)의 위치를 나타내는 정보인 (xa, ya) 좌표, 가운데 부호화 단위(1320b)의 좌측 상단의 샘플(1330b)의 위치를 나타내는 정보인 (xb, yb) 좌표, 하단 부호화 단위(1320c)의 좌측 상단의 샘플(1330c)의 위치를 나타내는 정보인 (xc, yc) 좌표를 이용하여 부호화 단위(1320a, 1320b, 1320c) 각각의 너비 또는 높이를 결정할 수 있다. 비디오 복호화 장치(100)는 부호화 단위(1320a, 1320b, 1320c)의 위치를 나타내는 좌표인 (xa, ya), (xb, yb), (xc, yc)를 이용하여 부호화 단위(1320a, 1320b, 1320c) 각각의 크기를 결정할 수 있다. According to an embodiment, the video decoding apparatus 100 may be configured to include (xa, ya) coordinates, which is information indicating the position of the upper left sample 1330a of the upper encoding unit 1320a, (Xc, yc) coordinates, which is information indicating the position of the lower-stage coding unit 1330b and the position of the upper-left sample 1330c of the lower- stage coding unit 1320c, 1320b, and 1320c, respectively. The video decoding apparatus 100 encodes the encoding units 1320a, 1320b, and 1320c using the coordinates (xa, ya), (xb, yb), (xc, yc) indicating the positions of the encoding units 1320a, ) Can be determined.
일 실시예에 따라, 비디오 복호화 장치(100)는 상단 부호화 단위(1320a)의 너비를 xb-xa로 결정할 수 있고 높이를 yb-ya로 결정할 수 있다. 일 실시예에 따라 비디오 복호화 장치(100)는 가운데 부호화 단위(1320b)의 너비를 xc-xb로 결정할 수 있고 높이를 yc-yb로 결정할 수 있다. 일 실시예에 따라 비디오 복호화 장치(100)는 하단 부호화 단위의 너비 또는 높이는 현재 부호화 단위의 너비 또는 높이와 상단 부호화 단위(1320a) 및 가운데 부호화 단위(1320b)의 너비 및 높이를 이용하여 결정할 수 있다. 비디오 복호화 장치(100)는 결정된 부호화 단위(1320a, 1320b, 1320c)의 너비 및 높이에 기초하여 다른 부호화 단위와 다른 크기를 갖는 부호화 단위를 결정할 수 있다. 도 13을 참조하면, 비디오 복호화 장치(100)는 상단 부호화 단위(1320a) 및 하단 부호화 단위(1320c)의 크기와 다른 크기를 가지는 가운데 부호화 단위(1320b)를 소정 위치의 부호화 단위로 결정할 수 있다. 다만 상술한 비디오 복호화 장치(100)가 다른 부호화 단위와 다른 크기를 갖는 부호화 단위를 결정하는 과정은 샘플 좌표에 기초하여 결정되는 부호화 단위의 크기를 이용하여 소정 위치의 부호화 단위를 결정하는 일 실시예에 불과하므로, 소정의 샘플 좌표에 따라 결정되는 부호화 단위의 크기를 비교하여 소정 위치의 부호화 단위를 결정하는 다양한 과정이 이용될 수 있다. According to one embodiment, the video decoding apparatus 100 can determine the width of the upper encoding unit 1320a as xb-xa and the height as yb-ya. According to an embodiment, the video decoding apparatus 100 can determine the width of the middle encoding unit 1320b as xc-xb and the height as yc-yb. The video decoding apparatus 100 may determine the width or height of the lower encoding unit using the width or height of the current encoding unit and the width and height of the upper encoding unit 1320a and the middle encoding unit 1320b . The video decoding apparatus 100 may determine an encoding unit having a different size from the other encoding units based on the widths and heights of the determined encoding units 1320a, 1320b, and 1320c. Referring to FIG. 13, the video decoding apparatus 100 may determine a coding unit 1320b as a coding unit at a predetermined position while having a size different from that of the upper coding unit 1320a and the lower coding unit 1320c. However, the process of the above-described video decoding apparatus 100 determining an encoding unit having a size different from that of the other encoding units may be the same as the process of determining an encoding unit at a predetermined position using the size of an encoding unit determined based on sample coordinates , Various processes may be used for determining the encoding unit at a predetermined position by comparing the sizes of the encoding units determined according to predetermined sample coordinates.
다만 부호화 단위의 위치를 결정하기 위하여 고려하는 샘플의 위치는 상술한 좌측 상단으로 한정하여 해석되어서는 안되고 부호화 단위에 포함되는 임의의 샘플의 위치에 대한 정보가 이용될 수 있는 것으로 해석될 수 있다. However, the position of the sample to be considered for determining the position of the coding unit should not be interpreted as being limited to the left upper end, and information about the position of any sample included in the coding unit can be interpreted as being available.
일 실시예에 따라 비디오 복호화 장치(100)는 현재 부호화 단위의 형태를 고려하여, 현재 부호화 단위가 분할되어 결정되는 홀수개의 부호화 단위들 중 소정 위치의 부호화 단위를 선택할 수 있다. 예를 들면, 현재 부호화 단위가 너비가 높이보다 긴 비-정사각형 형태라면 비디오 복호화 장치(100)는 수평 방향에 따라 소정 위치의 부호화 단위를 결정할 수 있다. 즉, 비디오 복호화 장치(100)는 수평 방향으로 위치를 달리 하는 부호화 단위들 중 하나를 결정하여 해당 부호화 단위에 대한 제한을 둘 수 있다. 현재 부호화 단위가 높이가 너비보다 긴 비-정사각형 형태라면 비디오 복호화 장치(100)는 수직 방향에 따라 소정 위치의 부호화 단위를 결정할 수 있다. 즉, 비디오 복호화 장치(100)는 수직 방향으로 위치를 달리 하는 부호화 단위들 중 하나를 결정하여 해당 부호화 단위에 대한 제한을 둘 수 있다. According to an embodiment, the video decoding apparatus 100 may select a coding unit at a predetermined position among the odd number of coding units in which the current coding unit is divided by considering the type of the current coding unit. For example, if the current coding unit is a non-square shape having a width greater than the height, the video decoding apparatus 100 can determine a coding unit at a predetermined position along the horizontal direction. That is, the video decoding apparatus 100 may determine one of the encoding units that are located in the horizontal direction and set a restriction on the encoding unit. If the current coding unit is a non-square shape having a height greater than the width, the video decoding apparatus 100 can determine a coding unit at a predetermined position in the vertical direction. That is, the video decoding apparatus 100 may determine one of the encoding units which are located in the vertical direction and limit the encoding unit.
일 실시예에 따라 비디오 복호화 장치(100)는 짝수개의 부호화 단위들 중 소정 위치의 부호화 단위를 결정하기 위하여 짝수개의 부호화 단위들 각각의 위치를 나타내는 정보를 이용할 수 있다. 비디오 복호화 장치(100)는 현재 부호화 단위를 분할하여 짝수개의 부호화 단위들을 결정할 수 있고 짝수개의 부호화 단위들의 위치에 대한 정보를 이용하여 소정 위치의 부호화 단위를 결정할 수 있다. 이에 대한 구체적인 과정은 도 13에서 상술한 홀수개의 부호화 단위들 중 소정 위치(예를 들면, 가운데 위치)의 부호화 단위를 결정하는 과정에 대응하는 과정일 수 있으므로 생략하도록 한다.According to an exemplary embodiment, the video decoding apparatus 100 may use information indicating positions of even-numbered encoding units to determine encoding units at predetermined positions among the even-numbered encoding units. The video decoding apparatus 100 can determine an even number of encoding units by dividing the current encoding unit and determine a encoding unit at a predetermined position using information on the positions of the even number of encoding units. A concrete procedure for this is omitted because it may be a process corresponding to a process of determining a coding unit of a predetermined position (for example, a middle position) among the above-mentioned odd number of coding units.
일 실시예에 따라, 비-정사각형 형태의 현재 부호화 단위를 복수개의 부호화 단위로 분할한 경우, 복수개의 부호화 단위들 중 소정 위치의 부호화 단위를 결정하기 위하여 분할 과정에서 소정 위치의 부호화 단위에 대한 소정의 정보를 이용할 수 있다. 예를 들면 비디오 복호화 장치(100)는 현재 부호화 단위가 복수개로 분할된 부호화 단위들 중 가운데에 위치하는 부호화 단위를 결정하기 위하여 분할 과정에서 가운데 부호화 단위에 포함된 샘플에 저장된 블록 형태 정보 및 분할 형태 정보 중 적어도 하나를 이용할 수 있다. According to one embodiment, when a non-square current encoding unit is divided into a plurality of encoding units, in order to determine an encoding unit at a predetermined position among a plurality of encoding units, Can be used. For example, in order to determine a coding unit located in the middle among the coding units in which the current coding unit is divided into a plurality of coding units, the video decoding apparatus 100 may include block type information stored in a sample included in the middle coding unit, Information can be used.
도 13을 참조하면 비디오 복호화 장치(100)는 블록 형태 정보 및 분할 형태 정보 중 적어도 하나에 기초하여 현재 부호화 단위(1300)를 복수개의 부호화 단위들(1320a, 1320b, 1320c)로 분할할 수 있으며, 복수개의 부호화 단위들(1320a, 1320b, 1320c) 중 가운데에 위치하는 부호화 단위(1320b)를 결정할 수 있다. 나아가 비디오 복호화 장치(100)는 블록 형태 정보 및 분할 형태 정보 중 적어도 하나가 획득되는 위치를 고려하여, 가운데에 위치하는 부호화 단위(1320b)를 결정할 수 있다. 즉, 현재 부호화 단위(1300)의 블록 형태 정보 및 분할 형태 정보 중 적어도 하나는 현재 부호화 단위(1300)의 가운데에 위치하는 샘플(1340)에서 획득될 수 있으며, 상기 블록 형태 정보 및 상기 분할 형태 정보 중 적어도 하나에 기초하여 현재 부호화 단위(1300)가 복수개의 부호화 단위들(1320a, 1320b, 1320c)로 분할된 경우 상기 샘플(1340)을 포함하는 부호화 단위(1320b)를 가운데에 위치하는 부호화 단위로 결정할 수 있다. 다만 가운데에 위치하는 부호화 단위로 결정하기 위해 이용되는 정보가 블록 형태 정보 및 분할 형태 정보 중 적어도 하나로 한정하여 해석되어서는 안되고, 다양한 종류의 정보가 가운데에 위치하는 부호화 단위를 결정하는 과정에서 이용될 수 있다.13, the video decoding apparatus 100 may divide the current encoding unit 1300 into a plurality of encoding units 1320a, 1320b, and 1320c based on at least one of the block type information and the division type information, The encoding unit 1320b positioned in the middle of the plurality of encoding units 1320a, 1320b, and 1320c can be determined. Furthermore, the video decoding apparatus 100 may determine a coding unit 1320b positioned at the center in consideration of a position where at least one of the block type information and the division type information is obtained. That is, at least one of the block type information and the division type information of the current encoding unit 1300 can be acquired in the sample 1340 located in the middle of the current encoding unit 1300, and the block type information and the division type information If the current encoding unit 1300 is divided into a plurality of encoding units 1320a, 1320b, and 1320c based on at least one of the encoding units 1320a to 1320c and 1320c, You can decide. However, the information used for determining the coding unit located in the middle should not be limited to at least one of the block type information and the division type information, and various kinds of information may be used in the process of determining the coding unit located in the middle .
일 실시예에 따라 소정 위치의 부호화 단위를 식별하기 위한 소정의 정보는, 결정하려는 부호화 단위에 포함되는 소정의 샘플에서 획득될 수 있다. 도 13을 참조하면, 비디오 복호화 장치(100)는 현재 부호화 단위(1300)가 분할되어 결정된 복수개의 부호화 단위들(1320a, 1320b, 1320c) 중 소정 위치의 부호화 단위(예를 들면, 복수개로 분할된 부호화 단위 중 가운데에 위치하는 부호화 단위)를 결정하기 위하여 현재 부호화 단위(1300) 내의 소정 위치의 샘플(예를 들면, 현재 부호화 단위(1300)의 가운데에 위치하는 샘플)에서 획득되는 블록 형태 정보 및 분할 형태 정보 중 적어도 하나를 이용할 수 있다. . 즉, 비디오 복호화 장치(100)는 현재 부호화 단위(1300)의 블록 블록 형태를 고려하여 상기 소정 위치의 샘플을 결정할 수 있고, 비디오 복호화 장치(100)는 현재 부호화 단위(1300)가 분할되어 결정되는 복수개의 부호화 단위(1320a, 1320b, 1320c)들 중, 소정의 정보(예를 들면, 블록 형태 정보 및 분할 형태 정보 중 적어도 하나)가 획득될 수 있는 샘플이 포함된 부호화 단위(1320b)를 결정하여 소정의 제한을 둘 수 있다. 도 13을 참조하면 일 실시예에 따라 비디오 복호화 장치(100)는 소정의 정보가 획득될 수 있는 샘플로서 현재 부호화 단위(1300)의 가운데에 위치하는 샘플(1340)을 결정할 수 있고, 비디오 복호화 장치(100)는 이러한 샘플(1340)이 포함되는 부호화 단위(1320b)를 복호화 과정에서의 소정의 제한을 둘 수 있다. 다만 소정의 정보가 획득될 수 있는 샘플의 위치는 상술한 위치로 한정하여 해석되어서는 안되고, 제한을 두기 위해 결정하려는 부호화 단위(1320b)에 포함되는 임의의 위치의 샘플들로 해석될 수 있다.According to an embodiment, predetermined information for identifying a coding unit at a predetermined position may be obtained from a predetermined sample included in a coding unit to be determined. 13, the video decoding apparatus 100 includes a plurality of coding units 1320a, 1320b, and 1320c, which are determined by dividing the current coding unit 1300, and encoding units (for example, (For example, a sample located in the middle of the current encoding unit 1300) at a predetermined position in the current encoding unit 1300 in order to determine an encoding unit located in the middle of the encoding unit, And at least one of division type information. . That is, the video decoding apparatus 100 can determine the sample of the predetermined position in consideration of the block block type of the current encoding unit 1300, and the video decoding apparatus 100 determines that the current encoding unit 1300 is divided A coding unit 1320b including a sample from which predetermined information (for example, at least one of block type information and division type information) can be obtained is determined among a plurality of coding units 1320a, 1320b, and 1320c A predetermined limit can be set. Referring to FIG. 13, the video decoding apparatus 100 may determine a sample 1340 located in the middle of a current encoding unit 1300 as a sample from which predetermined information can be obtained, The coding unit 100 may limit the coding unit 1320b including the sample 1340 to a predetermined limit in the decoding process. However, the position of the sample from which predetermined information can be obtained can not be construed to be limited to the above-mentioned position, but can be interpreted as samples at arbitrary positions included in the encoding unit 1320b to be determined for limiting.
일 실시예에 따라 소정의 정보가 획득될 수 있는 샘플의 위치는 현재 부호화 단위(1300)의 형태에 따라 결정될 수 있다. 일 실시예에 따라 블록 형태 정보는 현재 부호화 단위의 형태가 정사각형인지 또는 비-정사각형인지 여부를 결정할 수 있고, 형태에 따라 소정의 정보가 획득될 수 있는 샘플의 위치를 결정할 수 있다. 예를 들면, 비디오 복호화 장치(100)는 현재 부호화 단위의 너비에 대한 정보 및 높이에 대한 정보 중 적어도 하나를 이용하여 현재 부호화 단위의 너비 및 높이 중 적어도 하나를 반으로 분할하는 경계 상에 위치하는 샘플을 소정의 정보가 획득될 수 있는 샘플로 결정할 수 있다. 또다른 예를 들면, 비디오 복호화 장치(100)는 현재 부호화 단위에 관련된 블록 형태 정보가 비-정사각형 형태임을 나타내는 경우, 현재 부호화 단위의 긴 변을 반으로 분할하는 경계에 인접하는 샘플 중 하나를 소정의 정보가 획득될 수 있는 샘플로 결정할 수 있다. The position of a sample from which predetermined information can be obtained according to an embodiment may be determined according to the type of the current encoding unit 1300. According to one embodiment, the block type information can determine whether the current encoding unit is a square or a non-square, and determine the position of a sample from which predetermined information can be obtained according to the shape. For example, the video decoding apparatus 100 may use at least one of the information on the width of the current encoding unit and the information on the height, and may be located on a boundary that divides at least one of the width and the height of the current encoding unit by half The sample can be determined as a sample from which predetermined information can be obtained. In another example, when the video decoding apparatus 100 indicates that the block type information related to the current encoding unit is a non-square format, one of the samples adjacent to the boundary dividing the long side of the current encoding unit into half is divided into a predetermined Can be determined as a sample from which the information of &lt; / RTI &gt;
일 실시예에 따라 비디오 복호화 장치(100)는 현재 부호화 단위를 복수개의 부호화 단위로 분할한 경우, 복수개의 부호화 단위들 중 소정 위치의 부호화 단위를 결정하기 위하여, 블록 형태 정보 및 분할 형태 정보 중 적어도 하나를 이용할 수 있다. 일 실시예에 따라 비디오 복호화 장치(100)는 블록 형태 정보 및 분할 형태 정보 중 적어도 하나를 부호화 단위에 포함된 소정 위치의 샘플에서 획득할 수 있고, 비디오 복호화 장치(100)는 현재 부호화 단위가 분할되어 생성된 복수개의 부호화 단위들을 복수개의 부호화 단위 각각에 포함된 소정 위치의 샘플로부터 획득되는 분할 형태 정보 및 블록 형태 정보 중 적어도 하나를 이용하여 분할할 수 있다. 즉, 부호화 단위는 부호화 단위 각각에 포함된 소정 위치의 샘플에서 획득되는 블록 형태 정보 및 분할 형태 정보 중 적어도 하나를 이용하여 재귀적으로 분할될 수 있다. 부호화 단위의 재귀적 분할 과정에 대하여는 도 12를 통해 상술하였으므로 자세한 설명은 생략하도록 한다. According to an exemplary embodiment, when the current encoding unit is divided into a plurality of encoding units, the video decoding apparatus 100 may determine at least one of the block type information and the division type information One can be used. According to an embodiment, the video decoding apparatus 100 can acquire at least one of the block type information and the division type information from a sample at a predetermined position included in an encoding unit, and the video decoding apparatus 100 determines whether the current encoding unit is divided And divide the generated plurality of coding units by using at least one of division type information and block type information obtained from samples at predetermined positions included in each of the plurality of coding units. That is, the coding unit can be recursively divided using at least one of the block type information and the division type information obtained in the sample at the predetermined position included in each of the coding units. Since the recursive division process of the encoding unit has been described with reference to FIG. 12, a detailed description will be omitted.
일 실시예에 따라 비디오 복호화 장치(100)는 현재 부호화 단위를 분할하여 적어도 하나의 부호화 단위를 결정할 수 있고, 이러한 적어도 하나의 부호화 단위가 복호화되는 순서를 소정의 블록(예를 들면, 현재 부호화 단위)에 따라 결정할 수 있다. According to an embodiment, the video decoding apparatus 100 may determine at least one encoding unit by dividing the current encoding unit, and the order in which the at least one encoding unit is decoded is determined as a predetermined block (for example, ). &Lt; / RTI &gt;
도 14는 일 실시예에 따라 비디오 복호화 장치(100)가 현재 부호화 단위를 분할하여 복수개의 부호화 단위들을 결정하는 경우, 복수개의 부호화 단위들이 처리되는 순서를 도시한다.FIG. 14 shows a sequence in which a plurality of coding units are processed when the video decoding apparatus 100 determines a plurality of coding units by dividing a current coding unit according to an embodiment.
일 실시예에 따라 비디오 복호화 장치(100)는 블록 형태 정보 및 분할 형태 정보에 따라 제1 부호화 단위(1400)를 수직 방향으로 분할하여 제2 부호화 단위(1410a, 1410b)를 결정하거나 제1 부호화 단위(1400)를 수평 방향으로 분할하여 제2 부호화 단위(1430a, 1430b)를 결정하거나 제1 부호화 단위(1400)를 수직 방향 및 수평 방향으로 분할하여 제2 부호화 단위(1450a, 1450b, 1450c, 1450d)를 결정할 수 있다. According to an embodiment, the video decoding apparatus 100 divides the first encoding unit 1400 in the vertical direction according to the block type information and the division type information to determine the second encoding units 1410a and 1410b, 1450b, 1450c, and 1450d by dividing the first coding unit 1400 in the horizontal direction to determine the second coding units 1430a and 1430b or dividing the first coding unit 1400 in the vertical direction and the horizontal direction, Can be determined.
도 14를 참조하면, 비디오 복호화 장치(100)는 제1 부호화 단위(1400)를 수직 방향으로 분할하여 결정된 제2 부호화 단위(1410a, 1410b)를 수평 방향(1410c)으로 처리되도록 순서를 결정할 수 있다. 비디오 복호화 장치(100)는 제1 부호화 단위(1400)를 수평 방향으로 분할하여 결정된 제2 부호화 단위(1430a, 1430b)의 처리 순서를 수직 방향(1430c)으로 결정할 수 있다. 비디오 복호화 장치(100)는 제1 부호화 단위(1400)를 수직 방향 및 수평 방향으로 분할하여 결정된 제2 부호화 단위(1450a, 1450b, 1450c, 1450d)를 하나의 행에 위치하는 부호화 단위들이 처리된 후 다음 행에 위치하는 부호화 단위들이 처리되는 소정의 순서(예를 들면, 래스터 스캔 순서((raster scan order) 또는 z 스캔 순서(z scan order)(1450e) 등)에 따라 결정할 수 있다. Referring to FIG. 14, the video decoding apparatus 100 may determine the order in which the second encoding units 1410a and 1410b determined by dividing the first encoding unit 1400 in the vertical direction are processed in the horizontal direction 1410c . The video decoding apparatus 100 may determine the processing order of the second encoding units 1430a and 1430b determined by dividing the first encoding unit 1400 in the horizontal direction as the vertical direction 1430c. The video decoding apparatus 100 processes the encoding units located in one row of the second encoding units 1450a, 1450b, 1450c, and 1450d determined by dividing the first encoding unit 1400 in the vertical direction and the horizontal direction (For example, a raster scan order or a z scan order 1450e) in which the encoding units located in the next row are processed.
일 실시예에 따라 비디오 복호화 장치(100)는 부호화 단위들을 재귀적으로 분할할 수 있다. 도 14를 참조하면, 비디오 복호화 장치(100)는 제1 부호화 단위(1400)를 분할하여 복수개의 부호화 단위들(1410a, 1410b, 1430a, 1430b, 1450a, 1450b, 1450c, 1450d)을 결정할 수 있고, 결정된 복수개의 부호화 단위들(1410a, 1410b, 1430a, 1430b, 1450a, 1450b, 1450c, 1450d) 각각을 재귀적으로 분할할 수 있다. 복수개의 부호화 단위들(1410a, 1410b, 1430a, 1430b, 1450a, 1450b, 1450c, 1450d)을 분할하는 방법은 제1 부호화 단위(1400)를 분할하는 방법에 대응하는 방법이 될 수 있다. 이에 따라 복수개의 부호화 단위들(1410a, 1410b, 1430a, 1430b, 1450a, 1450b, 1450c, 1450d)은 각각 독립적으로 복수개의 부호화 단위들로 분할될 수 있다. 도 14를 참조하면 비디오 복호화 장치(100)는 제1 부호화 단위(1400)를 수직 방향으로 분할하여 제2 부호화 단위(1410a, 1410b)를 결정할 수 있고, 나아가 제2 부호화 단위(1410a, 1410b) 각각을 독립적으로 분할하거나 분할하지 않는 것으로 결정할 수 있다. According to an embodiment, the video decoding apparatus 100 may recursively divide encoding units. 14, the video decoding apparatus 100 may determine a plurality of encoding units 1410a, 1410b, 1430a, 1430b, 1450a, 1450b, 1450c, and 1450d by dividing the first encoding unit 1400, It is possible to recursively divide each of the determined plurality of encoding units 1410a, 1410b, 1430a, 1430b, 1450a, 1450b, 1450c, and 1450d. The method of dividing the plurality of encoding units 1410a, 1410b, 1430a, 1430b, 1450a, 1450b, 1450c, and 1450d may be a method corresponding to the method of dividing the first encoding unit 1400. [ Accordingly, the plurality of coding units 1410a, 1410b, 1430a, 1430b, 1450a, 1450b, 1450c, and 1450d may be independently divided into a plurality of coding units. Referring to FIG. 14, the video decoding apparatus 100 may determine the second encoding units 1410a and 1410b by dividing the first encoding unit 1400 in the vertical direction, and may further determine the second encoding units 1410a and 1410b Can be determined not to divide or separate independently.
일 실시예에 따라 비디오 복호화 장치(100)는 좌측의 제2 부호화 단위(1410a)를 수평 방향으로 분할하여 제3 부호화 단위(1420a, 1420b)로 분할할 수 있고, 우측의 제2 부호화 단위(1410b)는 분할하지 않을 수 있다. The video decoding apparatus 100 may divide the left second encoding unit 1410a in the horizontal direction into the third encoding units 1420a and 1420b and the second encoding units 1410b ) May not be divided.
일 실시예에 따라 부호화 단위들의 처리 순서는 부호화 단위의 분할 과정에 기초하여 결정될 수 있다. 다시 말해, 분할된 부호화 단위들의 처리 순서는 분할되기 직전의 부호화 단위들의 처리 순서에 기초하여 결정될 수 있다. 비디오 복호화 장치(100)는 좌측의 제2 부호화 단위(1410a)가 분할되어 결정된 제3 부호화 단위(1420a, 1420b)가 처리되는 순서를 우측의 제2 부호화 단위(1410b)와 독립적으로 결정할 수 있다. 좌측의 제2 부호화 단위(1410a)가 수평 방향으로 분할되어 제3 부호화 단위(1420a, 1420b)가 결정되었으므로 제3 부호화 단위(1420a, 1420b)는 수직 방향(1420c)으로 처리될 수 있다. 또한 좌측의 제2 부호화 단위(1410a) 및 우측의 제2 부호화 단위(1410b)가 처리되는 순서는 수평 방향(1410c)에 해당하므로, 좌측의 제2 부호화 단위(1410a)에 포함되는 제3 부호화 단위(1420a, 1420b)가 수직 방향(1420c)으로 처리된 후에 우측 부호화 단위(1410b)가 처리될 수 있다. 상술한 내용은 부호화 단위들이 각각 분할 전의 부호화 단위에 따라 처리 순서가 결정되는 과정을 설명하기 위한 것이므로, 상술한 실시예에 한정하여 해석되어서는 안되고, 다양한 형태로 분할되어 결정되는 부호화 단위들이 소정의 순서에 따라 독립적으로 처리될 수 있는 다양한 방법으로 이용되는 것으로 해석되어야 한다.According to an embodiment, the processing order of the encoding units may be determined based on the division process of the encoding units. In other words, the processing order of the divided coding units can be determined based on the processing order of the coding units immediately before being divided. The video decoding apparatus 100 can determine the order in which the third coding units 1420a and 1420b determined by dividing the left second coding unit 1410a are processed independently of the second coding unit 1410b on the right side. The third coding units 1420a and 1420b may be processed in the vertical direction 1420c since the second coding units 1410a on the left side are divided in the horizontal direction and the third coding units 1420a and 1420b are determined. Since the order in which the left second encoding unit 1410a and the right second encoding unit 1410b are processed corresponds to the horizontal direction 1410c, the third encoding unit 1410a included in the left second encoding unit 1410a, The right encoding unit 1410b can be processed after the blocks 1420a and 1420b are processed in the vertical direction 1420c. The above description is intended to explain the process sequence in which encoding units are determined according to the encoding units before division. Therefore, it should not be construed to be limited to the above-described embodiments, It should be construed as being used in various ways that can be handled independently in sequence.
도 15는 일 실시예에 따라 비디오 복호화 장치(100)가 소정의 순서로 부호화 단위가 처리될 수 없는 경우, 현재 부호화 단위가 홀수개의 부호화 단위로 분할되는 것임을 결정하는 과정을 도시한다.FIG. 15 illustrates a process of determining that the current encoding unit is divided into odd number of encoding units when the video decoding apparatus 100 can not process the encoding units in a predetermined order according to an embodiment.
일 실시예에 따라 비디오 복호화 장치(100)는 획득된 블록 형태 정보 및 분할 형태 정보에 기초하여 현재 부호화 단위가 홀수개의 부호화 단위들로 분할되는 것을 결정할 수 있다. 도 15를 참조하면 정사각형 형태의 제1 부호화 단위(1500)가 비-정사각형 형태의 제2 부호화 단위(1510a, 1510b)로 분할될 수 있고, 제2 부호화 단위(1510a, 1510b)는 각각 독립적으로 제3 부호화 단위(1520a, 1520b, 1520c, 1520d, 1520e)로 분할될 수 있다. 일 실시예에 따라 비디오 복호화 장치(100)는 제2 부호화 단위 중 좌측 부호화 단위(1510a)는 수평 방향으로 분할하여 복수개의 제3 부호화 단위(1520a, 1520b)를 결정할 수 있고, 우측 부호화 단위(1510b)는 홀수개의 제3 부호화 단위(1520c, 1520d, 1520e)로 분할할 수 있다. According to an embodiment, the video decoding apparatus 100 may determine that the current encoding unit is divided into odd number of encoding units based on the obtained block type information and the division type information. Referring to FIG. 15, the first encoding unit 1500 in a square form may be divided into second non-square encoding units 1510a and 1510b, and the second encoding units 1510a and 1510b may be independently 3 encoding units 1520a, 1520b, 1520c, 1520d, and 1520e. According to an embodiment, the video decoding apparatus 100 may determine a plurality of third encoding units 1520a and 1520b by dividing the left encoding unit 1510a of the second encoding unit in the horizontal direction, May be divided into an odd number of third encoding units 1520c, 1520d, and 1520e.
일 실시예에 따라 비디오 복호화 장치(100)는 제3 부호화 단위들(1520a, 1520b, 1520c, 1520d, 1520e)이 소정의 순서로 처리될 수 있는지 여부를 판단하여 홀수개로 분할된 부호화 단위가 존재하는지를 결정할 수 있다. 도 15를 참조하면, 비디오 복호화 장치(100)는 제1 부호화 단위(1500)를 재귀적으로 분할하여 제3 부호화 단위(1520a, 1520b, 1520c, 1520d, 1520e)를 결정할 수 있다. 비디오 복호화 장치(100)는 블록 형태 정보 및 분할 형태 정보 중 적어도 하나에 기초하여, 제1 부호화 단위(1500), 제2 부호화 단위(1510a, 1510b) 또는 제3 부호화 단위(1520a, 1520b, 1520c, 1520d, 1520e)가 분할되는 형태 중 홀수개의 부호화 단위로 분할되는지 여부를 결정할 수 있다. 예를 들면, 제2 부호화 단위(1510a, 1510b) 중 우측에 위치하는 부호화 단위가 홀수개의 제3 부호화 단위(1520c, 1520d, 1520e)로 분할될 수 있다. 제1 부호화 단위(1500)에 포함되는 복수개의 부호화 단위들이 처리되는 순서는 소정의 순서(예를 들면, z-스캔 순서(z-scan order)(1530))가 될 수 있고, 비디오 복호화 장치(100)는 우측 제2 부호화 단위(1510b)가 홀수개로 분할되어 결정된 제3 부호화 단위(1520c, 1520d, 1520e)가 상기 소정의 순서에 따라 처리될 수 있는 조건을 만족하는지를 판단할 수 있다.According to one embodiment, the video decoding apparatus 100 determines whether or not the third encoding units 1520a, 1520b, 1520c, 1520d, and 1520e can be processed in a predetermined order and determines whether there are odd-numbered encoding units You can decide. Referring to FIG. 15, the video decoding apparatus 100 may recursively divide the first encoding unit 1500 to determine the third encoding units 1520a, 1520b, 1520c, 1520d, and 1520e. The video decoding apparatus 100 may further include a first coding unit 1500, a second coding unit 1510a and 1510b or a third coding unit 1520a, 1520b, 1520c, and 1520c based on at least one of block type information and division type information, 1520d, and 1520e may be divided into odd number of coding units among the divided types. For example, an encoding unit located on the right of the second encoding units 1510a and 1510b may be divided into odd third encoding units 1520c, 1520d, and 1520e. The order in which the plurality of coding units included in the first coding unit 1500 are processed may be a predetermined order (for example, a z-scan order 1530) 100 can determine whether the third encoding units 1520c, 1520d, and 1520e determined by dividing the right second encoding unit 1510b into odd numbers satisfy the condition that the third encoding units 1520c, 1520d, and 1520e can be processed according to the predetermined order.
일 실시예에 따라 비디오 복호화 장치(100)는 제1 부호화 단위(1500)에 포함되는 제3 부호화 단위(1520a, 1520b, 1520c, 1520d, 1520e)가 소정의 순서에 따라 처리될 수 있는 조건을 만족하는지를 결정할 수 있으며, 상기 조건은 제3 부호화 단위(1520a, 1520b, 1520c, 1520d, 1520e)의 경계에 따라 제2 부호화 단위(1510a, 1510b)의 너비 및 높이 중 적어도 하나를 반으로 분할되는지 여부와 관련된다. 예를 들면 비-정사각형 형태의 좌측 제2 부호화 단위(1510a)의 높이를 반으로 분할하여 결정되는 제3 부호화 단위(1520a, 1520b)는 조건을 만족하지만, 우측 제2 부호화 단위(1510b)를 3개의 부호화 단위로 분할하여 결정되는 제3 부호화 단위(1520c, 1520d, 1520e)들의 경계가 우측 제2 부호화 단위(1510b)의 너비 또는 높이를 반으로 분할하지 못하므로 제3 부호화 단위(1520c, 1520d, 1520e)는 조건을 만족하지 못하는 것으로 결정될 수 있고, 비디오 복호화 장치(100)는 이러한 조건 불만족의 경우 스캔 순서의 단절(disconnection)로 판단하고, 판단 결과에 기초하여 우측 제2 부호화 단위(1510b)는 홀수개의 부호화 단위로 분할되는 것으로 결정할 수 있다. 일 실시예에 따라 비디오 복호화 장치(100)는 홀수개의 부호화 단위로 분할되는 경우 분할된 부호화 단위들 중 소정 위치의 부호화 단위에 대하여 소정의 제한을 둘 수 있으며, 이러한 제한 내용 또는 소정 위치 등에 대하여는 다양한 실시예를 통해 상술하였으므로 자세한 설명은 생략하도록 한다.According to an embodiment, the video decoding apparatus 100 satisfies a condition that third encoding units 1520a, 1520b, 1520c, 1520d, and 1520e included in the first encoding unit 1500 can be processed in a predetermined order And it is determined whether or not at least one of the width and the height of the second encoding units 1510a and 1510b is divided in half according to the boundaries of the third encoding units 1520a, 1520b, 1520c, 1520d, and 1520e . For example, the third coding units 1520a and 1520b determined by dividing the height of the left-side second coding unit 1510a in the non-square form by half are satisfied, but the right second coding unit 1510b is set to 3 Since the boundaries of the third encoding units 1520c, 1520d, and 1520e determined by dividing the number of encoding units 1520c, 1520d, and 1520e can not divide the width or height of the right second encoding unit 1510b in half, The video decoding apparatus 100 may determine that the condition is not satisfied and the video decoding apparatus 100 determines that the scanning order is disconnection in the case of such unsatisfactory condition and the right second encoding unit 1510b is based on the determination result It can be determined to be divided into odd number of encoding units. According to an exemplary embodiment, when the video decoding apparatus 100 is divided into odd-numbered coding units, the video decoding apparatus 100 may limit a coding unit of a predetermined position among the divided coding units. Since the embodiment has been described above, a detailed description thereof will be omitted.
도 16은 일 실시예에 따라 비디오 복호화 장치(100)가 제1 부호화 단위(1600)를 분할하여 적어도 하나의 부호화 단위를 결정하는 과정을 도시한다. 일 실시예에 따라 비디오 복호화 장치(100)는 획득부(110)를 통해 획득한 블록 형태 정보 및 분할 형태 정보 중 적어도 하나에 기초하여 제1 부호화 단위(1600)를 분할할 수 있다. 정사각형 형태의 제1 부호화 단위(1600)는 4개의 정사각형 형태를 가지는 부호화 단위로 분할되거나 또는 비-정사각형 형태의 복수개의 부호화 단위로 분할할 수 있다. 예를 들면 도 16을 참조하면, 블록 형태 정보가 제1 부호화 단위(1600)는 정사각형임을 나타내고 분할 형태 정보가 비-정사각형의 부호화 단위로 분할됨을 나타내는 경우 비디오 복호화 장치(100)는 제1 부호화 단위(1600)를 복수개의 비-정사각형의 부호화 단위들로 분할할 수 있다. 구체적으로, 분할 형태 정보가 제1 부호화 단위(1600)를 수평 방향 또는 수직 방향으로 분할하여 홀수개의 부호화 단위를 결정하는 것을 나타내는 경우, 비디오 복호화 장치(100)는 정사각형 형태의 제1 부호화 단위(1600)을 홀수개의 부호화 단위들로서 수직 방향으로 분할되어 결정된 제2 부호화 단위(1610a, 1610b, 1610c) 또는 수평 방향으로 분할되어 결정된 제2 부호화 단위(1620a, 1620b, 1620c)로 분할할 수 있다. 16 illustrates a process in which the video decoding apparatus 100 determines at least one encoding unit by dividing a first encoding unit 1600 according to an embodiment. The video decoding apparatus 100 may divide the first encoding unit 1600 based on at least one of the block type information and the division type information acquired through the acquisition unit 110. [ The first encoding unit 1600 in the form of a square may be divided into four encoding units having a square shape or may be divided into a plurality of non-square encoding units. For example, referring to FIG. 16, when the block type information indicates that the first encoding unit 1600 is square and the division type information is divided into non-square encoding units, the video decoding apparatus 100 transmits the first encoding unit The encoding unit 1600 may be divided into a plurality of non-square encoding units. More specifically, when the division type information indicates that the first encoding unit 1600 is divided horizontally or vertically to determine an odd number of encoding units, the video decoding apparatus 100 includes a first encoding unit 1600 in the form of a square 1620b, and 1610c divided in the vertical direction as the odd number of coding units, or into the second coding units 1620a, 1620b, and 1620c determined by being divided in the horizontal direction.
일 실시예에 따라 비디오 복호화 장치(100)는 제1 부호화 단위(1600)에 포함되는 제2 부호화 단위(1610a, 1610b, 1610c, 1620a, 1620b, 1620c)가 소정의 순서에 따라 처리될 수 있는 조건을 만족하는지를 결정할 수 있으며, 상기 조건은 제2 부호화 단위(1610a, 1610b, 1610c, 1620a, 1620b, 1620c)의 경계에 따라 제1 부호화 단위(1600)의 너비 및 높이 중 적어도 하나를 반으로 분할되는지 여부와 관련된다. 도 16를 참조하면 정사각형 형태의 제1 부호화 단위(1600)를 수직 방향으로 분할하여 결정되는 제2 부호화 단위(1610a, 1610b, 1610c)들의 경계가 제1 부호화 단위(1600)의 너비를 반으로 분할하지 못하므로 제1 부호화 단위(1600)는 소정의 순서에 따라 처리될 수 있는 조건을 만족하지 못하는 것으로 결정될 수 있다. 또한 정사각형 형태의 제1 부호화 단위(1600)를 수평 방향으로 분할하여 결정되는 제2 부호화 단위(1620a, 1620b, 1620c)들의 경계가 제1 부호화 단위(1600)의 너비를 반으로 분할하지 못하므로 제1 부호화 단위(1600)는 소정의 순서에 따라 처리될 수 있는 조건을 만족하지 못하는 것으로 결정될 수 있다. 비디오 복호화 장치(100)는 이러한 조건 불만족의 경우 스캔 순서의 단절(disconnection)로 판단하고, 판단 결과에 기초하여 제1 부호화 단위(1600)는 홀수개의 부호화 단위로 분할되는 것으로 결정할 수 있다. 일 실시예에 따라 비디오 복호화 장치(100)는 홀수개의 부호화 단위로 분할되는 경우 분할된 부호화 단위들 중 소정 위치의 부호화 단위에 대하여 소정의 제한을 둘 수 있으며, 이러한 제한 내용 또는 소정 위치 등에 대하여는 다양한 실시예를 통해 상술하였으므로 자세한 설명은 생략하도록 한다.According to an embodiment, the video decoding apparatus 100 may be configured such that the second encoding units 1610a, 1610b, 1610c, 1620a, 1620b, and 1620c included in the first encoding unit 1600 can be processed in a predetermined order And the condition is that at least one of the width and height of the first encoding unit 1600 is divided in half according to the boundaries of the second encoding units 1610a, 1610b, 1610c, 1620a, 1620b, and 1620c . 16, the boundaries of the second encoding units 1610a, 1610b, and 1610c, which are determined by dividing the first encoding unit 1600 in the vertical direction, are divided in half by the width of the first encoding unit 1600 The first encoding unit 1600 can be determined as not satisfying a condition that can be processed in a predetermined order. In addition, since the boundaries of the second encoding units 1620a, 1620b, and 1620c determined by dividing the first encoding unit 1600 in the horizontal direction into the horizontal direction can not divide the width of the first encoding unit 1600 in half, 1 encoding unit 1600 may be determined as not satisfying a condition that can be processed in a predetermined order. The video decoding apparatus 100 may determine that the scan sequence is disconnection in the case of such unsatisfactory condition and determine that the first encoding unit 1600 is divided into odd number of encoding units based on the determination result. According to an exemplary embodiment, when the video decoding apparatus 100 is divided into odd-numbered coding units, the video decoding apparatus 100 may limit a coding unit of a predetermined position among the divided coding units. Since the embodiment has been described above, a detailed description thereof will be omitted.
일 실시예에 따라, 비디오 복호화 장치(100)는 제1 부호화 단위를 분할하여 다양한 형태의 부호화 단위들을 결정할 수 있다.According to an embodiment, the video decoding apparatus 100 may determine the encoding units of various types by dividing the first encoding unit.
도 16을 참조하면, 비디오 복호화 장치(100)는 정사각형 형태의 제1 부호화 단위(1600), 비-정사각형 형태의 제1 부호화 단위(1630 또는 1650)를 다양한 형태의 부호화 단위들로 분할할 수 있다. 16, the video decoding apparatus 100 may divide a first coding unit 1600 in a square form and a first coding unit 1630 or 1650 in a non-square form into various types of coding units .
도 17은 일 실시예에 따라 비디오 복호화 장치(100)가 제1 부호화 단위(1700)가 분할되어 결정된 비-정사각형 형태의 제2 부호화 단위가 소정의 조건을 만족하는 경우 제2 부호화 단위가 분할될 수 있는 형태가 제한되는 것을 도시한다.17 is a diagram illustrating a case where the second encoding unit is divided when the non-square second encoding unit determined by dividing the first encoding unit 1700 by the video decoding apparatus 100 satisfies a predetermined condition Lt; RTI ID = 0.0 &gt; limited. &Lt; / RTI &gt;
일 실시예에 따라 비디오 복호화 장치(100)는 획득부(105)를 통해 획득한 블록 형태 정보 및 분할 형태 정보 중 적어도 하나에 기초하여 정사각형 형태의 제1 부호화 단위(1700)를 비-정사각형 형태의 제2 부호화 단위(1710a, 1710b, 1720a, 1720b)로 분할하는 것으로 결정할 수 있다. 제2 부호화 단위(1710a, 1710b, 1720a, 1720b)는 독립적으로 분할될 수 있다. 이에 따라 비디오 복호화 장치(100)는 제2 부호화 단위(1710a, 1710b, 1720a, 1720b) 각각에 관련된 블록 형태 정보 및 분할 형태 정보 중 적어도 하나에 기초하여 복수개의 부호화 단위로 분할하거나 분할하지 않는 것을 결정할 수 있다. 일 실시예에 따라 비디오 복호화 장치(100)는 수직 방향으로 제1 부호화 단위(1700)가 분할되어 결정된 비-정사각형 형태의 좌측 제2 부호화 단위(1710a)를 수평 방향으로 분할하여 제3 부호화 단위(1712a, 1712b)를 결정할 수 있다. 다만 비디오 복호화 장치(100)는 좌측 제2 부호화 단위(1710a)를 수평 방향으로 분할한 경우, 우측 제2 부호화 단위(1710b)는 좌측 제2 부호화 단위(1710a)가 분할된 방향과 동일하게 수평 방향으로 분할될 수 없도록 제한할 수 있다. 만일 우측 제2 부호화 단위(1710b)가 동일한 방향으로 분할되어 제3 부호화 단위(1714a, 1714b)가 결정된 경우, 좌측 제2 부호화 단위(1710a) 및 우측 제2 부호화 단위(1710b)가 수평 방향으로 각각 독립적으로 분할됨으로써 제3 부호화 단위(1712a, 1712b, 1714a, 1714b)가 결정될 수 있다. 하지만 이는 비디오 복호화 장치(100)가 블록 형태 정보 및 분할 형태 정보 중 적어도 하나에 기초하여 제1 부호화 단위(1700)를 4개의 정사각형 형태의 제2 부호화 단위(1730a, 1730b, 1730c, 1730d)로 분할한 것과 동일한 결과이며 이는 영상 복호화 측면에서 비효율적일 수 있다.According to an embodiment, the video decoding apparatus 100 may convert a first encoded unit 1700 of a square form into a non-square format (e.g., a first encoded unit 1700) based on at least one of the block type information and the division type information acquired through the acquisition unit 105 It can be determined to divide it into the second encoding units 1710a, 1710b, 1720a, and 1720b. The second encoding units 1710a, 1710b, 1720a, and 1720b may be independently divided. Accordingly, the video decoding apparatus 100 determines whether to divide or not divide into a plurality of coding units based on at least one of the block type information and the division type information related to each of the second coding units 1710a, 1710b, 1720a, and 1720b . According to an embodiment, the video decoding apparatus 100 divides the left second encoding unit 1710a in the non-square form determined by dividing the first encoding unit 1700 in the vertical direction into the horizontal direction, 1712a, and 1712b. However, in the case where the left second encoding unit 1710a is divided in the horizontal direction, the right side second encoding unit 1710b is arranged in the horizontal direction in the same way as the direction in which the left second encoding unit 1710a is divided, As shown in Fig. When the right second encoding unit 1710b is divided in the same direction and the third encoding units 1714a and 1714b are determined, the left second encoding unit 1710a and the right second encoding unit 1710b are arranged in the horizontal direction The third encoding units 1712a, 1712b, 1714a, and 1714b can be determined by being independently divided. However, the video decoding apparatus 100 divides the first encoding unit 1700 into four square-shaped second encoding units 1730a, 1730b, 1730c, and 1730d based on at least one of the block type information and the division type information. And this may be inefficient in terms of image decoding.
일 실시예에 따라 비디오 복호화 장치(100)는 수평 방향으로 제1 부호화 단위(11300)가 분할되어 결정된 비-정사각형 형태의 제2 부호화 단위(1720a 또는 1720b)를 수직 방향으로 분할하여 제3 부호화 단위(1722a, 1722b, 1724a, 1724b)를 결정할 수 있다. 다만 비디오 복호화 장치(100)는 제2 부호화 단위 중 하나(예를 들면 상단 제2 부호화 단위(1720a))를 수직 방향으로 분할한 경우, 상술한 이유에 따라 다른 제2 부호화 단위(예를 들면 하단 부호화 단위(1720b))는 상단 제2 부호화 단위(1720a)가 분할된 방향과 동일하게 수직 방향으로 분할될 수 없도록 제한할 수 있다. According to an embodiment, the video decoding apparatus 100 divides the second encoding unit 1720a or 1720b in the non-square form determined by dividing the first encoding unit 11300 in the horizontal direction into the vertical direction, (1722a, 1722b, 1724a, 1724b). However, when one of the second coding units (for example, the upper second coding unit 1720a) is divided in the vertical direction, the video decoding apparatus 100 may generate a second coding unit (for example, Coding unit 1720b) can be restricted such that the upper second encoding unit 1720a can not be divided vertically in the same direction as the divided direction.
도 18은 일 실시예에 따라 분할 형태 정보가 4개의 정사각형 형태의 부호화 단위로 분할하는 것을 나타낼 수 없는 경우, 비디오 복호화 장치(100)가 정사각형 형태의 부호화 단위를 분할하는 과정을 도시한다.FIG. 18 illustrates a process in which the video decoding apparatus 100 divides a square-shaped encoding unit when the division type information can not be divided into four square-shaped encoding units according to an embodiment.
일 실시예에 따라 비디오 복호화 장치(100)는 블록 형태 정보 및 분할 형태 정보 중 적어도 하나에 기초하여 제1 부호화 단위(1800)를 분할하여 제2 부호화 단위(1810a, 1810b, 1820a, 1820b 등)를 결정할 수 있다. 분할 형태 정보에는 부호화 단위가 분할될 수 있는 다양한 형태에 대한 정보가 포함될 수 있으나, 다양한 형태에 대한 정보에는 정사각형 형태의 4개의 부호화 단위로 분할하기 위한 정보가 포함될 수 없는 경우가 있다. 이러한 분할 형태 정보에 따르면, 비디오 복호화 장치(100)는 정사각형 형태의 제1 부호화 단위(1800)를 4개의 정사각형 형태의 제2 부호화 단위(1830a, 1830b, 1830c, 1830d)로 분할하지 못한다. 분할 형태 정보에 기초하여 비디오 복호화 장치(100)는 비-정사각형 형태의 제2 부호화 단위(1810a, 1810b, 1820a, 1820b 등)를 결정할 수 있다. According to an embodiment, the video decoding apparatus 100 divides the first encoding unit 1800 based on at least one of the block type information and the division type information, and outputs the second encoding units 1810a, 1810b, 1820a, and 1820b You can decide. The division type information may include information on various types in which the coding unit can be divided, but information on various types may not include information for dividing into four square units of coding units. According to the division type information, the video decoding apparatus 100 can not divide the first encoding unit 1800 in the square form into the second encoding units 1830a, 1830b, 1830c, and 1830d in the form of four squares. Based on the division type information, the video decoding apparatus 100 can determine the second encoding units 1810a, 1810b, 1820a, and 1820b in the non-square form.
일 실시예에 따라 비디오 복호화 장치(100)는 비-정사각형 형태의 제2 부호화 단위(1810a, 1810b, 1820a, 1820b 등)를 각각 독립적으로 분할할 수 있다. 재귀적인 방법을 통해 제2 부호화 단위(1810a, 1810b, 1820a, 1820b 등) 각각이 소정의 순서대로 분할될 수 있으며, 이는 블록 형태 정보 및 분할 형태 정보 중 적어도 하나에 기초하여 제1 부호화 단위(1800)가 분할되는 방법에 대응하는 분할 방법일 수 있다. According to an embodiment, the video decoding apparatus 100 may independently divide the second encoding units 1810a, 1810b, 1820a, and 1820b in the non-square form. Each of the second encoding units 1810a, 1810b, 1820a, 1820b, and the like may be divided in a predetermined order through a recursive method, and the first encoding unit 1800 May be a partitioning method corresponding to a method in which a partition is divided.
예를 들면 비디오 복호화 장치(100)는 좌측 제2 부호화 단위(1810a)가 수평 방향으로 분할되어 정사각형 형태의 제3 부호화 단위(1812a, 1812b)를 결정할 수 있고, 우측 제2 부호화 단위(1810b)가 수평 방향으로 분할되어 정사각형 형태의 제3 부호화 단위(1814a, 1814b)를 결정할 수 있다. 나아가 비디오 복호화 장치(100)는 좌측 제2 부호화 단위(1810a) 및 우측 제2 부호화 단위(1810b) 모두 수평 방향으로 분할되어 정사각형 형태의 제3 부호화 단위(1816a, 1816b, 1816c, 1816d)를 결정할 수도 있다. 이러한 경우 제1 부호화 단위(1800)가 4개의 정사각형 형태의 제2 부호화 단위(1830a, 1830b, 1830c, 1830d)로 분할된 것과 동일한 형태로 부호화 단위가 결정될 수 있다. For example, the video decoding apparatus 100 can determine the third encoding units 1812a and 1812b in the form of a square by dividing the left second encoding unit 1810a in the horizontal direction, and the right second encoding unit 1810b It is possible to determine the third encoding units 1814a and 1814b in the form of a square by being divided in the horizontal direction. Further, the video decoding apparatus 100 may divide the left second encoding unit 1810a and the right second encoding unit 1810b in the horizontal direction to determine the square-shaped third encoding units 1816a, 1816b, 1816c, and 1816d have. In this case, the encoding unit may be determined in the same manner as the first encoding unit 1800 is divided into the four second-type second encoding units 1830a, 1830b, 1830c, and 1830d.
또 다른 예를 들면 비디오 복호화 장치(100)는 상단 제2 부호화 단위(1820a)가 수직 방향으로 분할되어 정사각형 형태의 제3 부호화 단위(1822a, 1822b)를 결정할 수 있고, 하단 제2 부호화 단위(1820b)가 수직 방향으로 분할되어 정사각형 형태의 제3 부호화 단위(1824a, 1824b)를 결정할 수 있다. 나아가 비디오 복호화 장치(100)는 상단 제2 부호화 단위(1820a) 및 하단 제2 부호화 단위(1820b) 모두 수직 방향으로 분할되어 정사각형 형태의 제3 부호화 단위(1822a, 1822b, 1824a, 1824b)를 결정할 수도 있다. 이러한 경우 제1 부호화 단위(1800)가 4개의 정사각형 형태의 제2 부호화 단위(1830a, 1830b, 1830c, 1830d)로 분할된 것과 동일한 형태로 부호화 단위가 결정될 수 있다.  In another example, the video decoding apparatus 100 can determine the third encoding units 1822a and 1822b in the form of a square by dividing the upper second encoding unit 1820a in the vertical direction, and the lower second encoding units 1820b May be divided in the vertical direction to determine the third encoding units 1824a and 1824b in the form of a square. Further, the video decoding apparatus 100 may divide the upper second encoding unit 1820a and the lower second encoding unit 1820b in the vertical direction to determine the square-shaped third encoding units 1822a, 1822b, 1824a, and 1824b have. In this case, the encoding unit may be determined in the same manner as the first encoding unit 1800 is divided into the four second-type second encoding units 1830a, 1830b, 1830c, and 1830d.
도 19는 일 실시예에 따라 복수개의 부호화 단위들 간의 처리 순서가 부호화 단위의 분할 과정에 따라 달라질 수 있음을 도시한 것이다.FIG. 19 illustrates that the processing order among a plurality of coding units may be changed according to the division process of the coding unit according to an embodiment.
일 실시예에 따라 비디오 복호화 장치(100)는 블록 형태 정보 및 분할 형태 정보에 기초하여 제1 부호화 단위(1900)를 분할할 수 있다. 블록 형태 정보가 정사각형 형태를 나타내고, 분할 형태 정보가 제1 부호화 단위(1900)가 수평 방향 및 수직 방향 중 적어도 하나의 방향으로 분할됨을 나타내는 경우, 비디오 복호화 장치(100)는 제1 부호화 단위(1900)를 분할하여 제2 부호화 단위(예를 들면, 1910a, 1910b, 1920a, 1920b, 1930a, 1930b, 1930c, 1930d 등)를 결정할 수 있다. 도 19를 참조하면 제1 부호화 단위1900)가 수평 방향 또는 수직 방향만으로 분할되어 결정된 비-정사각형 형태의 제2 부호화 단위(1910a, 1910b, 1920a, 1920b)는 각각에 대한 블록 형태 정보 및 분할 형태 정보에 기초하여 독립적으로 분할될 수 있다. 예를 들면 비디오 복호화 장치(100)는 제1 부호화 단위(1900)가 수직 방향으로 분할되어 생성된 제2 부호화 단위(1910a, 1910b)를 수평 방향으로 각각 분할하여 제3 부호화 단위(1916a, 1916b, 1916c, 1916d)를 결정할 수 있고, 제1 부호화 단위(1900)가 수평 방향으로 분할되어 생성된 제2 부호화 단위(1920a, 1920b)를 수평 방향으로 각각 분할하여 제3 부호화 단위(1926a, 1926b, 1926c, 1926d)를 결정할 수 있다. 이러한 제2 부호화 단위(1910a, 1910b, 1920a, 1920b)의 분할 과정은 도 17과 관련하여 상술하였으므로 자세한 설명은 생략하도록 한다. According to an embodiment, the video decoding apparatus 100 may divide the first encoding unit 1900 based on the block type information and the division type information. When the block type information indicates a square shape and the division type information indicates that the first encoding unit 1900 is divided into at least one of a horizontal direction and a vertical direction, the video decoding apparatus 100 includes a first encoding unit 1900 (For example, 1910a, 1910b, 1920a, 1920b, 1930a, 1930b, 1930c, 1930d, etc.) can be determined. Referring to FIG. 19, the non-square second encoding units 1910a, 1910b, 1920a, and 1920b, which are determined by dividing the first encoding unit 1900 only in the horizontal direction or the vertical direction, As shown in FIG. For example, the video decoding apparatus 100 divides the second encoding units 1910a and 1910b, which are generated by dividing the first encoding unit 1900 in the vertical direction, in the horizontal direction to generate third encoding units 1916a, 1916b, 1926c and 1916d can be determined and the second encoding units 1920a and 1920b generated by dividing the first encoding unit 1900 in the horizontal direction are divided in the horizontal direction and the third encoding units 1926a, 1926b, and 1926c , 1926d) can be determined. Since the process of dividing the second encoding units 1910a, 1910b, 1920a, and 1920b has been described in detail with reference to FIG. 17, a detailed description thereof will be omitted.
일 실시예에 따라 비디오 복호화 장치(100)는 소정의 순서에 따라 부호화 단위를 처리할 수 있다. 소정의 순서에 따른 부호화 단위의 처리에 대한 특징은 도 14과 관련하여 상술하였으므로 자세한 설명은 생략하도록 한다. 도 19를 참조하면 비디오 복호화 장치(100)는 정사각형 형태의 제1 부호화 단위(1900)를 분할하여 4개의 정사각형 형태의 제3 부호화 단위(1916a, 1916b, 1916c, 1916d, 1926a, 1926b, 1926c, 1926d)를 결정할 수 있다. 일 실시예에 따라 비디오 복호화 장치(100)는 제1 부호화 단위(1900)가 분할되는 형태에 따라 제3 부호화 단위(1916a, 1916b, 1916c, 1916d, 1926a, 1926b, 1926c, 1926d)의 처리 순서를 결정할 수 있다. According to an embodiment, the video decoding apparatus 100 may process an encoding unit in a predetermined order. The features of the processing of the encoding unit in the predetermined order have been described in detail with reference to FIG. 14, and a detailed description thereof will be omitted. 19, the video decoding apparatus 100 divides a first encoding unit 1900 in a square form into four quadrangle-shaped third encoding units 1916a, 1916b, 1916c, 1916d, 1926a, 1926b, 1926c, and 1926d Can be determined. According to an embodiment, the video decoding apparatus 100 may process the third encoding units 1916a, 1916b, 1916c, 1916d, 1926a, 1926b, 1926c, and 1926d according to the form in which the first encoding unit 1900 is divided You can decide.
일 실시예에 따라 비디오 복호화 장치(100)는 수직 방향으로 분할되어 생성된 제2 부호화 단위(1910a, 1910b)를 수평 방향으로 각각 분할하여 제3 부호화 단위(1916a, 1916b, 1916c, 1916d)를 결정할 수 있고, 비디오 복호화 장치(100)는 좌측 제2 부호화 단위(1910a)에 포함되는 제3 부호화 단위(1916a, 1916b)를 수직 방향으로 먼저 처리한 후, 우측 제2 부호화 단위(1910b)에 포함되는 제3 부호화 단위(1916c, 1916d)를 수직 방향으로 처리하는 순서(1917)에 따라 제3 부호화 단위(1916a, 1916b, 1916c, 1916d)를 처리할 수 있다. According to an embodiment, the video decoding apparatus 100 divides the second encoding units 1910a and 1910b generated in the vertical direction and divides them in the horizontal direction to determine the third encoding units 1916a, 1916b, 1916c, and 1916d And the video decoding apparatus 100 first processes the third encoding units 1916a and 1916b included in the left second encoding unit 1910a in the vertical direction and then processes the third encoding units 1916a and 1916b included in the right second encoding unit 1910b The third encoding units 1916a, 1916b, 1916c, and 1916d can be processed in accordance with the order 1917 of processing the third encoding units 1916c and 1916d in the vertical direction.
일 실시예에 따라 비디오 복호화 장치(100)는 수평 방향으로 분할되어 생성된 제2 부호화 단위(1920a, 1920b)를 수직 방향으로 각각 분할하여 제3 부호화 단위(1926a, 1926b, 1926c, 1926d)를 결정할 수 있고, 비디오 복호화 장치(100)는 상단 제2 부호화 단위(1920a)에 포함되는 제3 부호화 단위(1926a, 1926b)를 수평 방향으로 먼저 처리한 후, 하단 제2 부호화 단위(1920b)에 포함되는 제3 부호화 단위(1926c, 1926d)를 수평 방향으로 처리하는 순서(1927)에 따라 제3 부호화 단위(1926a, 1926b, 1926c, 1926d)를 처리할 수 있다.According to an embodiment, the video decoding apparatus 100 divides the second encoding units 1920a and 1920b generated in the horizontal direction into vertical directions to determine the third encoding units 1926a, 1926b, 1926c, and 1926d And the video decoding apparatus 100 first processes the third encoding units 1926a and 1926b included in the upper second encoding unit 1920a in the horizontal direction and then processes the third encoding units 1926a and 1926b included in the lower second encoding unit 1920b The third encoding units 1926a, 1926b, 1926c, and 1926d can be processed according to the order 1927 of processing the third encoding units 1926c and 1926d in the horizontal direction.
도 19를 참조하면, 제2 부호화 단위(1910a, 1910b, 1920a, 1920b)가 각각 분할되어 정사각형 형태의 제3 부호화 단위(1916a, 1916b, 1916c, 1916d, 1926a, 1926b, 1926c, 1926d)가 결정될 수 있다. 수직 방향으로 분할되어 결정된 제2 부호화 단위(1910a, 1910b) 및 수평 방향으로 분할되어 결정된 제2 부호화 단위(1920a, 1920b)는 서로 다른 형태로 분할된 것이지만, 이후에 결정되는 제3 부호화 단위(1916a, 1916b, 1916c, 1916d, 1926a, 1926b, 1926c, 1926d)에 따르면 결국 동일한 형태의 부호화 단위들로 제1 부호화 단위(1900)가 분할된 결과가 된다. 이에 따라 비디오 복호화 장치(100)는 블록 형태 정보 및 분할 형태 정보 중 적어도 하나에 기초하여 상이한 과정을 통해 재귀적으로 부호화 단위를 분할함으로써 결과적으로 동일한 형태의 부호화 단위들을 결정하더라도, 동일한 형태로 결정된 복수개의 부호화 단위들을 서로 다른 순서로 처리할 수 있다.Referring to FIG. 19, the second encoding units 1910a, 1910b, 1920a, and 1920b are divided to determine the third encoding units 1916a, 1916b, 1916c, 1916d, 1926a, 1926b, 1926c, and 1926d, have. The second encoding units 1910a and 1910b determined to be divided in the vertical direction and the second encoding units 1920a and 1920b determined to be divided in the horizontal direction are divided into different formats, but the third encoding unit 1916a , 1916b, 1916c, 1916d, 1926a, 1926b, 1926c, and 1926d, the result is that the first encoding unit 1900 is divided into the same type of encoding units. Accordingly, the video decoding apparatus 100 recursively divides the encoding units through different processes based on at least one of the block type information and the division type information, thereby eventually determining the same type of encoding units, Lt; RTI ID = 0.0 &gt; units of &lt; / RTI &gt;
도 20은 일 실시예에 따라 부호화 단위가 재귀적으로 분할되어 복수개의 부호화 단위가 결정되는 경우, 부호화 단위의 형태 및 크기가 변함에 따라 부호화 단위의 심도가 결정되는 과정을 도시한다.FIG. 20 illustrates a process of determining the depth of an encoding unit according to a change in type and size of an encoding unit when the encoding unit is recursively divided according to an embodiment to determine a plurality of encoding units.
일 실시예에 따라 비디오 복호화 장치(100)는 부호화 단위의 심도를 소정의 기준에 따라 결정할 수 있다. 예를 들면 소정의 기준은 부호화 단위의 긴 변의 길이가 될 수 있다. 비디오 복호화 장치(100)는 현재 부호화 단위의 긴 변의 길이가 분할되기 전의 부호화 단위의 긴 변의 길이보다 2n (n>0) 배로 분할된 경우, 현재 부호화 단위의 심도는 분할되기 전의 부호화 단위의 심도보다 n만큼 심도가 증가된 것으로 결정할 수 있다. 이하에서는 심도가 증가된 부호화 단위를 하위 심도의 부호화 단위로 표현하도록 한다.According to an embodiment, the video decoding apparatus 100 may determine the depth of a coding unit according to a predetermined criterion. For example, a predetermined criterion may be a length of a long side of a coding unit. When the length of the long side of the current coding unit is divided by 2n (n > 0) times longer than the length of the long side of the coding unit before the current coding unit is divided, the depth of the current coding unit is smaller than the depth of the coding unit before being divided it can be determined that the depth is increased by n. Hereinafter, an encoding unit with an increased depth is expressed as a lower-depth encoding unit.
도 20을 참조하면, 일 실시예에 따라 정사각형 형태임을 나타내는 블록 형태 정보(예를 들면 블록 형태 정보는 ′0: SQUARE′를 나타낼 수 있음)에 기초하여 비디오 복호화 장치(100)는 정사각형 형태인 제1 부호화 단위(2000)를 분할하여 하위 심도의 제2 부호화 단위(2002), 제3 부호화 단위(2004) 등을 결정할 수 있다. 정사각형 형태의 제1 부호화 단위(2000)의 크기를 2Nx2N이라고 한다면, 제1 부호화 단위(2000)의 너비 및 높이를 1/21배로 분할하여 결정된 제2 부호화 단위(2002)는 NxN의 크기를 가질 수 있다. 나아가 제2 부호화 단위(2002)의 너비 및 높이를 1/2크기로 분할하여 결정된 제3 부호화 단위(2004)는 N/2xN/2의 크기를 가질 수 있다. 이 경우 제3 부호화 단위(2004)의 너비 및 높이는 제1 부호화 단위(2000)의 1/22배에 해당한다. 제1 부호화 단위(2000)의 심도가 D인 경우 제1 부호화 단위(2000)의 너비 및 높이의 1/21배인 제2 부호화 단위(2002)의 심도는 D+1일 수 있고, 제1 부호화 단위(2000)의 너비 및 높이의 1/22배인 제3 부호화 단위(2004)의 심도는 D+2일 수 있다. Referring to FIG. 20, on the basis of block type information (for example, block type information may indicate '0: SQUARE') indicating a square form according to an embodiment, the video decoding apparatus 100 generates a square 1 coding unit 2000 can be divided to determine the second coding unit 2002, the third coding unit 2004, etc. of the lower depth. If the size of the first encoding unit 2000 in the form of a square is 2Nx2N, the second encoding unit 2002 determined by dividing the width and height of the first encoding unit 2000 by 1/21 times may have a size of NxN have. Furthermore, the third encoding unit 2004 determined by dividing the width and height of the second encoding unit 2002 by a half size may have a size of N / 2xN / 2. In this case, the width and the height of the third encoding unit 2004 correspond to 1/22 of the first encoding unit 2000. When the depth of the first encoding unit 2000 is D, the depth of the second encoding unit 2002, which is 1/21 times the width and height of the first encoding unit 2000, may be D + 1, The depth of the third encoding unit 2004, which is one-22 times the width and height of the second encoding unit 2000, may be D + 2.
일 실시예에 따라 비-정사각형 형태를 나타내는 블록 형태 정보(예를 들면 블록 형태 정보는, 높이가 너비보다 긴 비-정사각형임을 나타내는 ′1: NS_VER′ 또는 너비가 높이보다 긴 비-정사각형임을 나타내는 ′2: NS_HOR′를 나타낼 수 있음)에 기초하여, 비디오 복호화 장치(100)는 비-정사각형 형태인 제1 부호화 단위(2010 또는 2020)를 분할하여 하위 심도의 제2 부호화 단위(2012 또는 2022), 제3 부호화 단위(2014 또는 2024) 등을 결정할 수 있다. According to an exemplary embodiment, block type information indicating a non-square shape (for example, block type information is' 1: NS_VER 'indicating that the height is a non-square having a width greater than the width or' 2 &gt;: NS_HOR '), the video decoding apparatus 100 divides the first coding unit 2010 or 2020 in a non-square form to generate a second coding unit 2012 or 2022 of lower depth, The third encoding unit 2014 or 2024, or the like.
비디오 복호화 장치(100)는 Nx2N 크기의 제1 부호화 단위(2010)의 너비 및 높이 중 적어도 하나를 분할하여 제2 부호화 단위(예를 들면, 2002, 2012, 2022 등)를 결정할 수 있다. 즉, 비디오 복호화 장치(100)는 제1 부호화 단위(2010)를 수평 방향으로 분할하여 NxN 크기의 제2 부호화 단위(2002) 또는 NxN/2 크기의 제2 부호화 단위(2022)를 결정할 수 있고, 수평 방향 및 수직 방향으로 분할하여 N/2xN 크기의 제2 부호화 단위(2012)를 결정할 수도 있다.The video decoding apparatus 100 may determine a second encoding unit (e.g., 2002, 2012, 2022, etc.) by dividing at least one of the width and the height of the first encoding unit 2010 of Nx2N size. That is, the video decoding apparatus 100 can determine the second encoding unit 2002 of the NxN size or the second encoding unit 2022 of the NxN / 2 size by dividing the first encoding unit 2010 in the horizontal direction, The second encoding unit 2012 may be divided into the horizontal direction and the vertical direction to determine the second encoding unit 2012 of N / 2xN size.
일 실시예에 따라 비디오 복호화 장치(100)는 2NxN 크기의 제1 부호화 단위(2020) 의 너비 및 높이 중 적어도 하나를 분할하여 제2 부호화 단위(예를 들면, 2002, 2012, 2022 등)를 결정할 수도 있다. 즉, 비디오 복호화 장치(100)는 제1 부호화 단위(2020)를 수직 방향으로 분할하여 NxN 크기의 제2 부호화 단위(2002) 또는 N/2xN 크기의 제2 부호화 단위(2012)를 결정할 수 있고, 수평 방향 및 수직 방향으로 분할하여 NxN/2 크기의 제2 부호화 단위(2022)를 결정할 수도 있다.According to an embodiment, the video decoding apparatus 100 divides at least one of the width and the height of the 2NxN-size first encoding unit 2020 to determine a second encoding unit (for example, 2002, 2012, 2022, etc.) It is possible. That is, the video decoding apparatus 100 can determine the second encoding unit 2002 of NxN size or the second encoding unit 2012 of N / 2xN size by dividing the first encoding unit 2020 in the vertical direction, The second encoding unit 2022 of the NxN / 2 size may be determined by dividing the image data in the horizontal direction and the vertical direction.
일 실시예에 따라 비디오 복호화 장치(100)는 NxN 크기의 제2 부호화 단위(2002) 의 너비 및 높이 중 적어도 하나를 분할하여 제3 부호화 단위(예를 들면, 2004, 2014, 2024 등)를 결정할 수도 있다. 즉, 비디오 복호화 장치(100)는 제2 부호화 단위(2002)를 수직 방향 및 수평 방향으로 분할하여 N/2xN/2 크기의 제3 부호화 단위(2004)를 결정하거나 N/22xN/2 크기의 제3 부호화 단위(2014)를 결정하거나 N/2xN/22 크기의 제3 부호화 단위(2024)를 결정할 수 있다.According to an embodiment, the video decoding apparatus 100 divides at least one of the width and the height of the second encoding unit 2002 of NxN size to determine a third encoding unit (for example, 2004, 2014, 2024, etc.) It is possible. That is, the video decoding apparatus 100 determines the third encoding unit 2004 of N / 2xN / 2 size by dividing the second encoding unit 2002 in the vertical direction and the horizontal direction, 3 encoding unit 2014 or a third encoding unit 2024 of N / 2xN / 22 size.
일 실시예에 따라 비디오 복호화 장치(100)는 N/2xN 크기의 제2 부호화 단위(2012)의 너비 및 높이 중 적어도 하나를 분할하여 제3 부호화 단위(예를 들면, 2004, 2014, 2024 등)를 결정할 수도 있다. 즉, 비디오 복호화 장치(100)는 제2 부호화 단위(2012)를 수평 방향으로 분할하여 N/2xN/2 크기의 제3 부호화 단위(2004) 또는 N/2xN/22 크기의 제3 부호화 단위(2024)를 결정하거나 수직 방향 및 수평 방향으로 분할하여 N/22xN/2 크기의 제3 부호화 단위(2014)를 결정할 수 있다.According to an embodiment, the video decoding apparatus 100 divides at least one of the width and the height of the second encoding unit 2012 of N / 2xN size, and encodes the third encoding unit (for example, 2004, 2014, 2024, . That is, the video decoding apparatus 100 divides the second encoding unit 2012 in the horizontal direction to generate a third encoding unit 2004 of N / 2xN / 2 or a third encoding unit 2024 of N / 2xN / 22 size ) Or may be divided into vertical and horizontal directions to determine a third encoding unit 2014 of N / 22xN / 2 size.
일 실시예에 따라 비디오 복호화 장치(100)는 NxN/2 크기의 제2 부호화 단위(2014)의 너비 및 높이 중 적어도 하나를 분할하여 제3 부호화 단위(예를 들면, 2004, 2014, 2024 등)를 결정할 수도 있다. 즉, 비디오 복호화 장치(100)는 제2 부호화 단위(2012)를 수직 방향으로 분할하여 N/2xN/2 크기의 제3 부호화 단위(2004) 또는 N/22xN/2 크기의 제3 부호화 단위(2014)를 결정하거나 수직 방향 및 수평 방향으로 분할하여 N/2xN/22크기의 제3 부호화 단위(2024)를 결정할 수 있다.According to an embodiment, the video decoding apparatus 100 divides at least one of the width and the height of the second encoding unit 2014 of NxN / 2 size into a third encoding unit (e.g., 2004, 2014, 2024, etc.) . That is, the video decoding apparatus 100 divides the second encoding unit 2012 in the vertical direction to obtain a third encoding unit 2004 of N / 2xN / 2 or a third encoding unit 2014 of N / 22xN / 2 size ) Or may be divided into vertical and horizontal directions to determine a third encoding unit 2024 of N / 2xN / 22 size.
일 실시예에 따라 비디오 복호화 장치(100)는 정사각형 형태의 부호화 단위(예를 들면, 2000, 2002, 2004)를 수평 방향 또는 수직 방향으로 분할할 수 있다. 예를 들면, 2Nx2N 크기의 제1 부호화 단위(2000)를 수직 방향으로 분할하여 Nx2N 크기의 제1 부호화 단위(2010)를 결정하거나 수평 방향으로 분할하여 2NxN 크기의 제1 부호화 단위(2020)를 결정할 수 있다. 일 실시예에 따라 심도가 부호화 단위의 가장 긴 변의 길이에 기초하여 결정되는 경우, 2Nx2N 크기의 제1 부호화 단위(2000, 2002 또는 2004)가 수평 방향 또는 수직 방향으로 분할되어 결정되는 부호화 단위의 심도는 제1 부호화 단위(2000, 2002 또는 2004)의 심도와 동일할 수 있다.According to an embodiment, the video decoding apparatus 100 may divide a square-shaped encoding unit (for example, 2000, 2002, 2004) into a horizontal direction or a vertical direction. For example, the first encoding unit 2000 of the size 2Nx2N is divided in the vertical direction to determine the first encoding unit 2010 of the size Nx2N or the horizontal direction to determine the first encoding unit 2020 of 2NxN size . If the depth is determined based on the length of the longest side of the encoding unit according to one embodiment, the depth of the encoding unit in which the first encoding unit 2000, 2002, or 2004 of size 2Nx2N is divided in the horizontal direction or the vertical direction is determined May be the same as the depth of the first encoding unit (2000, 2002 or 2004).
일 실시예에 따라 제3 부호화 단위(2014 또는 2024)의 너비 및 높이는 제1 부호화 단위(2010 또는 2020)의 1/22배에 해당할 수 있다. 제1 부호화 단위(2010 또는 2020)의 심도가 D인 경우 제1 부호화 단위(2010 또는 2020)의 너비 및 높이의 1/2배인 제2 부호화 단위(2012 또는 2014)의 심도는 D+1일 수 있고, 제1 부호화 단위(2010 또는 2020)의 너비 및 높이의 1/22배인 제3 부호화 단위(2014 또는 2024)의 심도는 D+2일 수 있다. According to one embodiment, the width and height of the third encoding unit 2014 or 2024 may correspond to 1/22 of the first encoding unit (2010 or 2020). When the depth of the first coding unit 2010 or 2020 is D, the depth of the second coding unit 2012 or 2014, which is half the width and height of the first coding unit 2010 or 2020, is D + 1 And the depth of the third coding unit 2014 or 2024 which is 1/22 times the width and height of the first coding unit 2010 or 2020 may be D + 2.
도 21은 일 실시예에 따라 부호화 단위들의 형태 및 크기에 따라 결정될 수 있는 심도 및 부호화 단위 구분을 위한 인덱스(part index, 이하 PID)를 도시한다.FIG. 21 illustrates a depth index (PID) for coding unit classification and depth that can be determined according to the type and size of coding units according to an exemplary embodiment.
일 실시예에 따라 비디오 복호화 장치(100)는 정사각형 형태의 제1 부호화 단위(2100)를 분할하여 다양한 형태의 제2 부호화 단위를 결정할 수 있다. 도 21를 참조하면, 비디오 복호화 장치(100)는 분할 형태 정보에 따라 제1 부호화 단위(2100)를 수직 방향 및 수평 방향 중 적어도 하나의 방향으로 분할하여 제2 부호화 단위(2102a, 2102b, 2104a, 2104b, 2106a, 2106b, 2106c, 2106d)를 결정할 수 있다. 즉, 비디오 복호화 장치(100)는 제1 부호화 단위(2100)에 대한 분할 형태 정보에 기초하여 제2 부호화 단위(2102a, 2102b, 2104a, 2104b, 2106a, 2106b, 2106c, 2106d)를 결정할 수 있다. According to an embodiment, the video decoding apparatus 100 may divide the first encoding unit 2100 in a square form to determine various types of second encoding units. 21, the video decoding apparatus 100 divides the first coding unit 2100 into at least one of a vertical direction and a horizontal direction according to the division type information, and outputs the second coding units 2102a, 2102b, 2104a, 2104b, 2106a, 2106b, 2106c, and 2106d. That is, the video decoding apparatus 100 can determine the second encoding units 2102a, 2102b, 2104a, 2104b, 2106a, 2106b, 2106c, and 2106d based on the division type information for the first encoding unit 2100. [
일 실시예에 따라 정사각형 형태의 제1 부호화 단위(2100)에 대한 분할 형태 정보에 따라 결정되는 제2 부호화 단위(2102a, 2102b, 2104a, 2104b, 2106a, 2106b, 2106c, 2106d)는 긴 변의 길이에 기초하여 심도가 결정될 수 있다. 예를 들면, 정사각형 형태의 제1 부호화 단위(2100)의 한 변의 길이와 비-정사각형 형태의 제2 부호화 단위(2102a, 2102b, 2104a, 2104b)의 긴 변의 길이가 동일하므로, 제1 부호화 단위(2100)와 비-정사각형 형태의 제2 부호화 단위(2102a, 2102b, 2104a, 2104b)의 심도는 D로 동일하다고 볼 수 있다. 이에 반해 비디오 복호화 장치(100)가 분할 형태 정보에 기초하여 제1 부호화 단위(2100)를 4개의 정사각형 형태의 제2 부호화 단위(2106a, 2106b, 2106c, 2106d)로 분할한 경우, 정사각형 형태의 제2 부호화 단위(2106a, 2106b, 2106c, 2106d)의 한 변의 길이는 제1 부호화 단위(2100)의 한 변의 길이의 1/2배 이므로, 제2 부호화 단위(2106a, 2106b, 2106c, 2106d)의 심도는 제1 부호화 단위(2100)의 심도인 D보다 한 심도 하위인 D+1의 심도일 수 있다.The second encoding units 2102a, 2102b, 2104a, 2104b, 2106a, 2106b, 2106c, and 2106d, which are determined according to the division type information for the first encoding unit 2100 in a square form, Depth can be determined based on. For example, since the length of one side of the first encoding unit 2100 in the square form is the same as the length of long sides of the second encoding units 2102a, 2102b, 2104a, and 2104b in the non-square form, 2100 and the non-square type second encoding units 2102a, 2102b, 2104a, and 2104b are denoted by D in the same manner. On the other hand, when the video decoding apparatus 100 divides the first encoding unit 2100 into four square-shaped second encoding units 2106a, 2106b, 2106c, and 2106d based on the division type information, The length of one side of the second encoding units 2106a, 2106b, 2106c and 2106d is one-half the length of one side of the first encoding unit 2100. Therefore, the depths of the second encoding units 2106a, 2106b, May be a depth of D + 1 that is one depth lower than D, which is the depth of the first encoding unit 2100.
일 실시예에 따라 비디오 복호화 장치(100)는 높이가 너비보다 긴 형태의 제1 부호화 단위(2110)를 분할 형태 정보에 따라 수평 방향으로 분할하여 복수개의 제2 부호화 단위(2112a, 2112b, 2114a, 2114b, 2114c)로 분할할 수 있다. 일 실시예에 따라 비디오 복호화 장치(100)는 너비가 높이보다 긴 형태의 제1 부호화 단위(2120)를 분할 형태 정보에 따라 수직 방향으로 분할하여 복수개의 제2 부호화 단위(2122a, 2122b, 2124a, 2124b, 2124c)로 분할할 수 있다.According to an embodiment, the video decoding apparatus 100 divides a first coding unit 2110 having a height greater than a width in a horizontal direction according to the division type information, and generates a plurality of second coding units 2112a, 2112b, 2114a, 2114b, and 2114c. According to an embodiment, the video decoding apparatus 100 divides the first coding unit 2120 of a shape whose width is longer than a height in the vertical direction according to the division type information, and generates a plurality of second coding units 2122a, 2122b, 2124a, 2124b, and 2124c.
일 실시예에 따라 비-정사각형 형태의 제1 부호화 단위(2110 또는 2120)에 대한 분할 형태 정보에 따라 결정되는 제2 부호화 단위(2112a, 2112b, 2114a, 2114b, 2116a, 2116b, 2116c, 2116d)는 긴 변의 길이에 기초하여 심도가 결정될 수 있다. 예를 들면, 정사각형 형태의 제2 부호화 단위(2112a, 2112b)의 한 변의 길이는 높이가 너비보다 긴 비-정사각형 형태의 제1 부호화 단위(2110)의 한 변의 길이의 1/2배이므로, 정사각형 형태의 제2 부호화 단위(2102a, 2102b, 2104a, 2104b)의 심도는 비-정사각형 형태의 제1 부호화 단위(2110)의 심도 D보다 한 심도 하위의 심도인 D+1이다. The second encoding units 2112a, 2112b, 2114a, 2114b, 2116a, 2116b, 2116c, and 2116d determined according to the division type information for the first encoding unit 2110 or 2120 in the non- The depth can be determined based on the length of the long side. For example, since the length of one side of the square-shaped second encoding units 2112a and 2112b is 1/2 times the length of one side of the non-square first encoding unit 2110 whose height is longer than the width, The depth of the second encoding units 2102a, 2102b, 2104a and 2104b in the form of D + 1 is one depth lower than the depth D of the first encoding unit 2110 in the non-square form.
나아가 비디오 복호화 장치(100)가 분할 형태 정보에 기초하여 비-정사각형 형태의 제1 부호화 단위(2110)를 홀수개의 제2 부호화 단위(2114a, 2114b, 2114c)로 분할할 수 있다. 홀수개의 제2 부호화 단위(2114a, 2114b, 2114c)는 비-정사각형 형태의 제2 부호화 단위(2114a, 2114c) 및 정사각형 형태의 제2 부호화 단위(2114b)를 포함할 수 있다. 이 경우 비-정사각형 형태의 제2 부호화 단위(2114a, 2114c)의 긴 변의 길이 및 정사각형 형태의 제2 부호화 단위(2114b)의 한 변의 길이는 제1 부호화 단위(2110)의 한 변의 길이의 1/2배 이므로, 제2 부호화 단위(2114a, 2114b, 2114c)의 심도는 제1 부호화 단위(2110)의 심도인 D보다 한 심도 하위인 D+1의 심도일 수 있다. 비디오 복호화 장치(100)는 제1 부호화 단위(2110)와 관련된 부호화 단위들의 심도를 결정하는 상기 방식에 대응하는 방식으로, 너비가 높이보다 긴 비-정사각형 형태의 제1 부호화 단위(2120)와 관련된 부호화 단위들의 심도를 결정할 수 있다.Furthermore, the video decoding apparatus 100 may divide the non-square first encoding unit 2110 into odd second encoding units 2114a, 2114b, and 2114c based on the division type information. The odd number of second encoding units 2114a, 2114b and 2114c may include non-square second encoding units 2114a and 2114c and a square second encoding unit 2114b. In this case, the length of the longer sides of the non-square second encoding units 2114a and 2114c and the length of one side of the second encoding unit 2114b of the square shape are 1 / The depth of the second encoding units 2114a, 2114b and 2114c may be a depth of D + 1 which is one depth lower than the depth D of the first encoding unit 2110. [ The video decoding apparatus 100 is connected to the first encoding unit 2120 in the form of a non-square shape whose width is longer than the height in a manner corresponding to the scheme for determining the depths of the encoding units associated with the first encoding unit 2110 The depth of the encoding units can be determined.
일 실시예에 따라 비디오 복호화 장치(100)는 분할된 부호화 단위들의 구분을 위한 인덱스(PID)를 결정함에 있어서, 홀수개로 분할된 부호화 단위들이 서로 동일한 크기가 아닌 경우, 부호화 단위들 간의 크기 비율에 기초하여 인덱스를 결정할 수 있다. 도 21를 참조하면, 홀수개로 분할된 부호화 단위들(2114a, 2114b, 2114c) 중 가운데에 위치하는 부호화 단위(2114b)는 다른 부호화 단위들(2114a, 2114c)와 너비는 동일하지만 높이가 다른 부호화 단위들(2114a, 2114c)의 높이의 두 배일 수 있다. 즉, 이 경우 가운데에 위치하는 부호화 단위(2114b)는 다른 부호화 단위들(2114a, 2114c)의 두 개를 포함할 수 있다. 따라서, 스캔 순서에 따라 가운데에 위치하는 부호화 단위(2114b)의 인덱스(PID)가 1이라면 그 다음 순서에 위치하는 부호화 단위(2114c)는 인덱스가 2가 증가한 3일수 있다. 즉 인덱스의 값의 불연속성이 존재할 수 있다. 일 실시예에 따라 비디오 복호화 장치(100)는 이러한 분할된 부호화 단위들 간의 구분을 위한 인덱스의 불연속성의 존재 여부에 기초하여 홀수개로 분할된 부호화 단위들이 서로 동일한 크기가 아닌지 여부를 결정할 수 있다. According to an exemplary embodiment, the video decoding apparatus 100 determines an index (PID) for distinguishing divided coding units. If the odd-numbered coding units are not the same size, The index can be determined based on the index. 21, an encoding unit 2114b positioned at the center among the odd-numbered encoding units 2114a, 2114b, and 2114c has the same width as other encoding units 2114a and 2114c, May be two times as high as the height of the first and second electrodes 2114a and 2114c. That is, in this case, the coding unit 2114b positioned at the center may include two of the other coding units 2114a and 2114c. Accordingly, if the index (PID) of the coding unit 2114b positioned at the center is 1 according to the scanning order, the coding unit 2114c positioned next to the coding unit 2114c may be three days in which the index is increased by two. That is, there may be a discontinuity in the value of the index. According to an embodiment, the video decoding apparatus 100 may determine whether odd-numbered encoding units are not the same size based on the presence or absence of an index discontinuity for distinguishing between the divided encoding units.
일 실시예에 따라 비디오 복호화 장치(100)는 현재 부호화 단위로부터 분할되어 결정된 복수개의 부호화 단위들을 구분하기 위한 인덱스의 값에 기초하여 특정 분할 형태로 분할된 것인지를 결정할 수 있다. 도 21를 참조하면 비디오 복호화 장치(100)는 높이가 너비보다 긴 직사각형 형태의 제1 부호화 단위(2110)를 분할하여 짝수개의 부호화 단위(2112a, 2112b)를 결정하거나 홀수개의 부호화 단위(2114a, 2114b, 2114c)를 결정할 수 있다. 비디오 복호화 장치(100)는 복수개의 부호화 단위 각각을 구분하기 위하여 각 부호화 단위를 나타내는 인덱스(PID)를 이용할 수 있다. 일 실시예에 따라 PID는 각각의 부호화 단위의 소정 위치의 샘플(예를 들면, 좌측 상단 샘플)에서 획득될 수 있다. According to an embodiment, the video decoding apparatus 100 may determine whether the video decoding apparatus 100 is divided into a specific division type based on a value of an index for identifying a plurality of coding units divided and determined from the current coding unit. 21, the video decoding apparatus 100 divides a rectangular first encoding unit 2110 having a height greater than the width to determine even-numbered encoding units 2112a and 2112b or odd-numbered encoding units 2114a and 2114b , 2114c can be determined. The video decoding apparatus 100 may use an index (PID) indicating each coding unit in order to identify each of the plurality of coding units. According to one embodiment, the PID may be obtained at a sample of a predetermined position of each coding unit (e.g., the upper left sample).
일 실시예에 따라 비디오 복호화 장치(100)는 부호화 단위의 구분을 위한 인덱스를 이용하여 분할되어 결정된 부호화 단위들 중 소정 위치의 부호화 단위를 결정할 수 있다. 일 실시예에 따라 높이가 너비보다 긴 직사각형 형태의 제1 부호화 단위(2110)에 대한 분할 형태 정보가 3개의 부호화 단위로 분할됨을 나타내는 경우 비디오 복호화 장치(100)는 제1 부호화 단위(2110)를 3개의 부호화 단위(2114a, 2114b, 2114c)로 분할할 수 있다. 비디오 복호화 장치(100)는 3개의 부호화 단위(2114a, 2114b, 2114c) 각각에 대한 인덱스를 할당할 수 있다. 비디오 복호화 장치(100)는 홀수개로 분할된 부호화 단위 중 가운데 부호화 단위를 결정하기 위하여 각 부호화 단위에 대한 인덱스를 비교할 수 있다. 비디오 복호화 장치(100)는 부호화 단위들의 인덱스에 기초하여 인덱스들 중 가운데 값에 해당하는 인덱스를 갖는 부호화 단위(2114b)를, 제1 부호화 단위(2110)가 분할되어 결정된 부호화 단위 중 가운데 위치의 부호화 단위로서 결정할 수 있다. 일 실시예에 따라 비디오 복호화 장치(100)는 분할된 부호화 단위들의 구분을 위한 인덱스를 결정함에 있어서, 부호화 단위들이 서로 동일한 크기가 아닌 경우, 부호화 단위들 간의 크기 비율에 기초하여 인덱스를 결정할 수 있다. 도 21를 참조하면, 제1 부호화 단위(2110)가 분할되어 생성된 부호화 단위(2114b)는 다른 부호화 단위들(2114a, 2114c)와 너비는 동일하지만 높이가 다른 부호화 단위들(2114a, 2114c)의 높이의 두 배일 수 있다. 이 경우 가운데에 위치하는 부호화 단위(2114b)의 인덱스(PID)가 1이라면 그 다음 순서에 위치하는 부호화 단위(2114c)는 인덱스가 2가 증가한 3일수 있다. 이러한 경우처럼 균일하게 인덱스가 증가하다가 증가폭이 달라지는 경우, 비디오 복호화 장치(100)는 다른 부호화 단위들과 다른 크기를 가지는 부호화 단위를 포함하는 복수개의 부호화 단위로 분할된 것으로 결정할 수 있다, 일 실시예에 따라 분할 형태 정보가 홀수개의 부호화 단위로 분할됨을 나타내는 경우, 비디오 복호화 장치(100)는 홀수개의 부호화 단위 중 소정 위치의 부호화 단위(예를 들면 가운데 부호화 단위)가 다른 부호화 단위와 크기가 다른 형태로 현재 부호화 단위를 분할할 수 있다. 이 경우 비디오 복호화 장치(100)는 부호화 단위에 대한 인덱스(PID)를 이용하여 다른 크기를 가지는 가운데 부호화 단위를 결정할 수 있다. 다만 상술한 인덱스, 결정하고자 하는 소정 위치의 부호화 단위의 크기 또는 위치는 일 실시예를 설명하기 위해 특정한 것이므로 이에 한정하여 해석되어서는 안되며, 다양한 인덱스, 부호화 단위의 위치 및 크기가 이용될 수 있는 것으로 해석되어야 한다. According to an embodiment, the video decoding apparatus 100 may determine a coding unit at a predetermined position among the coding units divided and determined using an index for classifying a coding unit. According to an embodiment, when the division type information for the rectangular first type encoding unit 2110 whose height is longer than the width is divided into three encoding units, the video decoding apparatus 100 transmits the first encoding unit 2110 It can be divided into three encoding units 2114a, 2114b, and 2114c. The video decoding apparatus 100 can assign an index to each of the three encoding units 2114a, 2114b, and 2114c. The video decoding apparatus 100 may compare the indexes of the respective encoding units in order to determine the middle encoding unit among the encoding units divided into odd numbers. The video decoding apparatus 100 encodes an encoding unit 2114b having an index corresponding to a middle value among indices based on indexes of encoding units into an encoding unit 2114b encoding an intermediate position among encoding units determined by dividing the first encoding unit 2110 Can be determined as a unit. According to an embodiment, the video decoding apparatus 100 may determine an index based on a size ratio between coding units when the coding units are not the same size in determining the index for dividing the divided coding units . 21, the coding unit 2114b generated by dividing the first coding unit 2110 is divided into coding units 2114a and 2114c having the same width as the coding units 2114a and 2114c but different in height Can be double the height. In this case, if the index (PID) of the coding unit 2114b positioned at the center is 1, the coding unit 2114c located next to the coding unit 2114c may be three (3) In this case, if the index increases uniformly and the increment increases, the video decoding apparatus 100 may determine that the encoding unit is divided into a plurality of encoding units including encoding units having different sizes from other encoding units. , The video decoding apparatus 100 determines that the encoding unit (for example, the middle encoding unit) at a predetermined position among the odd number of encoding units has a format different from that of the other encoding units The current encoding unit can be divided into. In this case, the video decoding apparatus 100 may determine an encoding unit having a different size by using an index (PID) for the encoding unit. However, the index and the size or position of the encoding unit at a predetermined position to be determined are specific for explaining an embodiment, and thus should not be construed to be limited thereto, and various indexes, positions and sizes of encoding units can be used Should be interpreted.
일 실시예에 따라 비디오 복호화 장치(100)는 부호화 단위의 재귀적인 분할이 시작되는 소정의 데이터 단위를 이용할 수 있다. According to an embodiment, the video decoding apparatus 100 may use a predetermined data unit in which recursive division of an encoding unit starts.
도 22는 일 실시예에 따라 픽쳐에 포함되는 복수개의 소정의 데이터 단위에 따라 복수개의 부호화 단위들이 결정된 것을 도시한다.22 shows that a plurality of coding units are determined according to a plurality of predetermined data units included in a picture according to an embodiment.
일 실시예에 따라 소정의 데이터 단위는 부호화 단위가 블록 형태 정보 및 분할 형태 정보 중 적어도 하나를 이용하여 재귀적으로 분할되기 시작하는 데이터 단위로 정의될 수 있다. 즉, 현재 픽쳐를 분할하는 복수개의 부호화 단위들이 결정되는 과정에서 이용되는 최상위 심도의 부호화 단위에 해당할 수 있다. 이하에서는 설명 상 편의를 위해 이러한 소정의 데이터 단위를 기준 데이터 단위라고 지칭하도록 한다. According to an exemplary embodiment, a predetermined data unit may be defined as a data unit in which an encoding unit starts to be recursively segmented using at least one of block type information and partition type information. That is, it may correspond to a coding unit of the highest depth used in the process of determining a plurality of coding units for dividing the current picture. Hereinafter, such a predetermined data unit is referred to as a reference data unit for convenience of explanation.
일 실시예에 따라 기준 데이터 단위는 소정의 크기 및 형태를 나타낼 수 있다. 일 실시예에 따라, 기준 부호화 단위는 MxN의 샘플들을 포함할 수 있다. 여기서 M 및 N은 서로 동일할 수도 있으며, 2의 승수로 표현되는 정수일 수 있다. 즉, 기준 데이터 단위는 정사각형 또는 비-정사각형의 형태를 나타낼 수 있으며, 이후에 정수개의 부호화 단위로 분할될 수 있다. According to one embodiment, the reference data unit may represent a predetermined size and shape. According to one embodiment, the reference encoding unit may comprise samples of MxN. Here, M and N may be equal to each other, or may be an integer represented by a multiplier of 2. That is, the reference data unit may represent a square or a non-square shape, and may be divided into an integer number of encoding units.
일 실시예에 따라 비디오 복호화 장치(100)는 현재 픽쳐를 복수개의 기준 데이터 단위로 분할할 수 있다. 일 실시예에 따라 비디오 복호화 장치(100)는 현재 픽쳐를 분할하는 복수개의 기준 데이터 단위를 각각의 기준 데이터 단위에 대한 분할 정보를 이용하여 분할할 수 있다. 이러한 기준 데이터 단위의 분할 과정은 쿼드 트리(quad-tree)구조를 이용한 분할 과정에 대응될 수 있다. According to an embodiment, the video decoding apparatus 100 may divide the current picture into a plurality of reference data units. According to an embodiment, the video decoding apparatus 100 may divide a plurality of reference data units for dividing a current picture into pieces using division information for each reference data unit. The segmentation process of the reference data unit may correspond to the segmentation process using a quad-tree structure.
일 실시예에 따라 비디오 복호화 장치(100)는 현재 픽쳐에 포함되는 기준 데이터 단위가 가질 수 있는 최소 크기를 미리 결정할 수 있다. 이에 따라, 비디오 복호화 장치(100)는 최소 크기 이상의 크기를 갖는 다양한 크기의 기준 데이터 단위를 결정할 수 있고, 결정된 기준 데이터 단위를 기준으로 블록 형태 정보 및 분할 형태 정보를 이용하여 적어도 하나의 부호화 단위를 결정할 수 있다. According to an embodiment, the video decoding apparatus 100 may determine in advance the minimum size that the reference data unit included in the current picture can have. Accordingly, the video decoding apparatus 100 can determine reference data units of various sizes having sizes equal to or larger than a minimum size, and determine at least one coding unit using block type information and division type information based on the determined reference data unit You can decide.
도 22를 참조하면, 비디오 복호화 장치(100)는 정사각형 형태의 기준 부호화 단위(2200)를 이용할 수 있고, 또는 비-정사각형 형태의 기준 부호화 단위(2202)를 이용할 수도 있다. 일 실시예에 따라 기준 부호화 단위의 형태 및 크기는 적어도 하나의 기준 부호화 단위를 포함할 수 있는 다양한 데이터 단위(예를 들면, 시퀀스(sequence), 픽쳐(picture), 슬라이스(slice), 슬라이스 세그먼트(slice segment), 최대부호화단위 등)에 따라 결정될 수 있다. 22, the video decoding apparatus 100 may use a reference encoding unit 2200 in a square form or a reference encoding unit 2202 in a non-square form. According to an exemplary embodiment, the type and size of the reference encoding unit may include various data units (e.g., a sequence, a picture, a slice, a slice segment a slice segment, a maximum encoding unit, and the like).
일 실시예에 따라 비디오 복호화 장치(100)의 획득부(105)는 기준 부호화 단위의 형태에 대한 정보 및 기준 부호화 단위의 크기에 대한 정보 중 적어도 하나를 상기 다양한 데이터 단위마다 비트스트림으로부터 획득할 수 있다. 정사각형 형태의 기준 부호화 단위(2200)에 포함되는 적어도 하나의 부호화 단위가 결정되는 과정은 도 10의 현재 부호화 단위(300)가 분할되는 과정을 통해 상술하였고, 비-정사각형 형태의 기준 부호화 단위(2200)에 포함되는 적어도 하나의 부호화 단위가 결정되는 과정은 도 11의 현재 부호화 단위(1100 또는 1150)가 분할되는 과정을 통해 상술하였으므로 자세한 설명은 생략하도록 한다.According to an embodiment, the obtaining unit 105 of the video decoding apparatus 100 may obtain at least one of the information on the type of the reference encoding unit and the size of the reference encoding unit from the bit stream for each of the various data units have. The process of determining at least one encoding unit included in the reference-type encoding unit 2200 in the form of a square is described in detail in the process of dividing the current encoding unit 300 of FIG. 10, and the non- Is determined in the process of dividing the current encoding unit 1100 or 1150 of FIG. 11, so that a detailed description thereof will be omitted.
일 실시예에 따라 비디오 복호화 장치(100)는 소정의 조건에 기초하여 미리 결정되는 일부 데이터 단위에 따라 기준 부호화 단위의 크기 및 형태를 결정하기 위하여, 기준 부호화 단위의 크기 및 형태를 식별하기 위한 인덱스를 이용할 수 있다. 즉, 획득부(105)는 비트스트림으로부터 상기 다양한 데이터 단위(예를 들면, 시퀀스, 픽쳐, 슬라이스, 슬라이스 세그먼트, 최대부호화단위 등) 중 소정의 조건(예를 들면 슬라이스 이하의 크기를 갖는 데이터 단위)을 만족하는 데이터 단위로서 슬라이스, 슬라이스 세그먼트, 최대부호화 단위 등 마다, 기준 부호화 단위의 크기 및 형태의 식별을 위한 인덱스만을 획득할 수 있다. 비디오 복호화 장치(100)는 인덱스를 이용함으로써 상기 소정의 조건을 만족하는 데이터 단위마다 기준 데이터 단위의 크기 및 형태를 결정할 수 있다. 기준 부호화 단위의 형태에 대한 정보 및 기준 부호화 단위의 크기에 대한 정보를 상대적으로 작은 크기의 데이터 단위마다 비트스트림으로부터 획득하여 이용하는 경우, 비트스트림의 이용 효율이 좋지 않을 수 있으므로, 기준 부호화 단위의 형태에 대한 정보 및 기준 부호화 단위의 크기에 대한 정보를 직접 획득하는 대신 상기 인덱스만을 획득하여 이용할 수 있다. 이 경우 기준 부호화 단위의 크기 및 형태를 나타내는 인덱스에 대응하는 기준 부호화 단위의 크기 및 형태 중 적어도 하나는 미리 결정되어 있을 수 있다. 즉, 비디오 복호화 장치(100)는 미리 결정된 기준 부호화 단위의 크기 및 형태 중 적어도 하나를 인덱스에 따라 선택함으로써, 인덱스 획득의 기준이 되는 데이터 단위에 포함되는 기준 부호화 단위의 크기 및 형태 중 적어도 하나를 결정할 수 있다.In order to determine the size and type of the reference encoding unit according to a predetermined data unit predetermined based on a predetermined condition, the video decoding apparatus 100 may include an index for identifying the size and type of the reference encoding unit Can be used. That is, the acquiring unit 105 acquires from the bitstream a predetermined condition (for example, a data unit having a size equal to or smaller than a slice) among the various data units (e.g., sequence, picture, slice, slice segment, ), It is possible to obtain only an index for identification of the size and type of the reference encoding unit for each slice, slice segment, maximum encoding unit, and the like. The video decoding apparatus 100 can determine the size and type of the reference data unit for each data unit satisfying the predetermined condition by using the index. When the information on the type of the reference encoding unit and the information on the size of the reference encoding unit are obtained from the bitstream for each relatively small data unit and used, the use efficiency of the bitstream may not be good. Therefore, Information on the size of the reference encoding unit and information on the size of the reference encoding unit can be acquired and used. In this case, at least one of the size and the type of the reference encoding unit corresponding to the index indicating the size and type of the reference encoding unit may be predetermined. That is, the video decoding apparatus 100 selects at least one of the size and the type of the reference encoding unit included in the data unit that is the basis of the index acquisition by selecting at least one of the size and the shape of the predetermined reference encoding unit You can decide.
일 실시예에 따라 비디오 복호화 장치(100)는 하나의 최대 부호화 단위에 포함하는 적어도 하나의 기준 부호화 단위를 이용할 수 있다. 즉, 영상을 분할하는 최대 부호화 단위에는 적어도 하나의 기준 부호화 단위가 포함될 수 있고, 각각의 기준 부호화 단위의 재귀적인 분할 과정을 통해 부호화 단위가 결정될 수 있다. 일 실시예에 따라 최대 부호화 단위의 너비 및 높이 중 적어도 하나는 기준 부호화 단위의 너비 및 높이 중 적어도 하나의 정수배에 해당할 수 있다. 일 실시예에 따라 기준 부호화 단위의 크기는 최대부호화단위를 쿼드 트리 구조에 따라 n번 분할한 크기일 수 있다. 즉, 비디오 복호화 장치(100)는 최대부호화단위를 쿼드 트리 구조에 따라 n 번 분할하여 기준 부호화 단위를 결정할 수 있고, 다양한 실시예들에 따라 기준 부호화 단위를 블록 형태 정보 및 분할 형태 정보 중 적어도 하나에 기초하여 분할할 수 있다.According to an exemplary embodiment, the video decoding apparatus 100 may use at least one reference encoding unit included in one maximum encoding unit. That is, the maximum encoding unit for dividing an image may include at least one reference encoding unit, and the encoding unit may be determined through a recursive division process of each reference encoding unit. According to an exemplary embodiment, at least one of the width and the height of the maximum encoding unit may correspond to at least one integer multiple of the width and height of the reference encoding unit. According to an exemplary embodiment, the size of the reference encoding unit may be a size obtained by dividing the maximum encoding unit n times according to a quadtree structure. That is, the video decoding apparatus 100 may determine the reference encoding unit by dividing the maximum encoding unit n times according to the quad tree structure, and may determine the reference encoding unit based on at least one of the block type information and the division type information As shown in FIG.
도 23은 일 실시예에 따라 픽쳐(2300)에 포함되는 기준 부호화 단위의 결정 순서를 결정하는 기준이 되는 프로세싱 블록을 도시한다.23 shows a processing block serving as a reference for determining a determination order of the reference encoding units included in the picture 2300 according to an embodiment.
일 실시예에 따라 비디오 복호화 장치(100)는 픽쳐를 분할하는 적어도 하나의 프로세싱 블록을 결정할 수 있다. 프로세싱 블록이란, 영상을 분할하는 적어도 하나의 기준 부호화 단위를 포함하는 데이터 단위로서, 프로세싱 블록에 포함되는 적어도 하나의 기준 부호화 단위는 특정 순서대로 결정될 수 있다. 즉, 각각의 프로세싱 블록에서 결정되는 적어도 하나의 기준 부호화 단위의 결정 순서는 기준 부호화 단위가 결정될 수 있는 다양한 순서의 종류 중 하나에 해당할 수 있으며, 각각의 프로세싱 블록에서 결정되는 기준 부호화 단위 결정 순서는 프로세싱 블록마다 상이할 수 있다. 프로세싱 블록마다 결정되는 기준 부호화 단위의 결정 순서는 래스터 스캔(raster scan), Z 스캔(Z-scan), N 스캔(N-scan), 우상향 대각 스캔(up-right diagonal scan), 수평적 스캔(horizontal scan), 수직적 스캔(vertical scan) 등 다양한 순서 중 하나일 수 있으나, 결정될 수 있는 순서는 상기 스캔 순서들에 한정하여 해석되어서는 안 된다. According to one embodiment, the video decoding apparatus 100 may determine at least one processing block that divides a picture. The processing block is a data unit including at least one reference encoding unit for dividing an image, and at least one reference encoding unit included in the processing block may be determined in a specific order. That is, the order of determination of at least one reference encoding unit determined in each processing block may correspond to one of various kinds of order in which the reference encoding unit can be determined, and the reference encoding unit determination order determined in each processing block May be different for each processing block. The order of determination of the reference encoding unit determined for each processing block is a raster scan, a Z scan, an N scan, an up-right diagonal scan, a horizontal scan a horizontal scan, and a vertical scan. However, the order that can be determined should not be limited to the scan orders.
일 실시예에 따라 비디오 복호화 장치(100)는 프로세싱 블록의 크기에 대한 정보를 획득하여 영상에 포함되는 적어도 하나의 프로세싱 블록의 크기를 결정할 수 있다. 비디오 복호화 장치(100)는 프로세싱 블록의 크기에 대한 정보를 비트스트림으로부터 획득하여 영상에 포함되는 적어도 하나의 프로세싱 블록의 크기를 결정할 수 있다. 이러한 프로세싱 블록의 크기는 프로세싱 블록의 크기에 대한 정보가 나타내는 데이터 단위의 소정의 크기일 수 있다. According to an embodiment, the video decoding apparatus 100 may obtain information on the size of the processing block to determine the size of the at least one processing block included in the image. The video decoding apparatus 100 may obtain information on the size of the processing block from the bitstream to determine the size of the at least one processing block included in the image. The size of such a processing block may be a predetermined size of a data unit represented by information on the size of the processing block.
일 실시예에 따라 비디오 복호화 장치(100)의 획득부(105)는 비트스트림으로부터 프로세싱 블록의 크기에 대한 정보를 특정의 데이터 단위마다 획득할 수 있다. 예를 들면 프로세싱 블록의 크기에 대한 정보는 영상, 시퀀스, 픽쳐, 슬라이스, 슬라이스 세그먼트 등의 데이터 단위로 비트스트림으로부터 획득될 수 있다. 즉 획득부(105)는 상기 여러 데이터 단위마다 비트스트림으로부터 프로세싱 블록의 크기에 대한 정보를 획득할 수 있고 비디오 복호화 장치(100)는 획득된 프로세싱 블록의 크기에 대한 정보를 이용하여 픽쳐를 분할하는 적어도 하나의 프로세싱 블록의 크기를 결정할 수 있으며, 이러한 프로세싱 블록의 크기는 기준 부호화 단위의 정수배의 크기일 수 있다. According to an embodiment, the obtaining unit 105 of the video decoding apparatus 100 may obtain information on the size of the processing block from the bitstream for each specific data unit. For example, information on the size of a processing block can be obtained from a bitstream in units of data such as an image, a sequence, a picture, a slice, a slice segment, and the like. That is, the obtaining unit 105 may obtain information on the size of the processing block from the bitstream for each of the plurality of data units, and the video decoding apparatus 100 divides the picture using information on the size of the obtained processing block The size of the at least one processing block may be determined, and the size of the processing block may be an integer multiple of the reference encoding unit.
일 실시예에 따라 비디오 복호화 장치(100)는 픽쳐(2300)에 포함되는 프로세싱 블록(2302, 2312)의 크기를 결정할 수 있다. 예를 들면, 비디오 복호화 장치(100)는 비트스트림으로부터 획득된 프로세싱 블록의 크기에 대한 정보에 기초하여 프로세싱 블록의 크기를 결정할 수 있다. 도 23을 참조하면, 비디오 복호화 장치(100)는 일 실시예에 따라 프로세싱 블록(2302, 2312)의 가로크기를 기준 부호화 단위 가로크기의 4배, 세로크기를 기준 부호화 단위의 세로크기의 4배로 결정할 수 있다. 비디오 복호화 장치(100)는 적어도 하나의 프로세싱 블록 내에서 적어도 하나의 기준 부호화 단위가 결정되는 순서를 결정할 수 있다.According to one embodiment, the video decoding apparatus 100 may determine the size of the processing blocks 2302 and 2312 included in the picture 2300. For example, the video decoding apparatus 100 may determine the size of the processing block based on information on the size of the processing block obtained from the bitstream. Referring to FIG. 23, the video decoding apparatus 100 according to an exemplary embodiment of the present invention has a horizontal size of the processing blocks 2302 and 2312 of four times the horizontal size of the reference encoding unit, a vertical size of four times the vertical size of the reference encoding unit You can decide. The video decoding apparatus 100 may determine an order in which at least one reference encoding unit is determined in at least one processing block.
일 실시예에 따라, 비디오 복호화 장치(100)는 프로세싱 블록의 크기에 기초하여 픽쳐(2300)에 포함되는 각각의 프로세싱 블록(2302, 2312)을 결정할 수 있고, 프로세싱 블록(2302, 2312)에 포함되는 적어도 하나의 기준 부호화 단위의 결정 순서를 결정할 수 있다. 일 실시예에 따라 기준 부호화 단위의 결정은 기준 부호화 단위의 크기의 결정을 포함할 수 있다.According to one embodiment, the video decoding apparatus 100 may determine each of the processing blocks 2302 and 2312 included in the picture 2300 based on the size of the processing block, and may include in the processing blocks 2302 and 2312 The determination order of at least one reference encoding unit is determined. The determination of the reference encoding unit may include determining the size of the reference encoding unit according to an embodiment.
일 실시예에 따라 비디오 복호화 장치(100)는 비트스트림으로부터 적어도 하나의 프로세싱 블록에 포함되는 적어도 하나의 기준 부호화 단위의 결정 순서에 대한 정보를 획득할 수 있고, 획득한 결정 순서에 대한 정보에 기초하여 적어도 하나의 기준 부호화 단위가 결정되는 순서를 결정할 수 있다. 결정 순서에 대한 정보는 프로세싱 블록 내에서 기준 부호화 단위들이 결정되는 순서 또는 방향으로 정의될 수 있다. 즉, 기준 부호화 단위들이 결정되는 순서는 각각의 프로세싱 블록마다 독립적으로 결정될 수 있다.According to an embodiment, the video decoding apparatus 100 may obtain information on a determination order of at least one reference encoding unit included in at least one processing block from a bitstream, So that the order in which at least one reference encoding unit is determined can be determined. The information on the decision order can be defined in the order or direction in which the reference encoding units are determined in the processing block. That is, the order in which the reference encoding units are determined may be independently determined for each processing block.
일 실시예에 따라 비디오 복호화 장치(100)는 특정 데이터 단위마다 기준 부호화 단위의 결정 순서에 대한 정보를 비트스트림으로부터 획득할 수 있다. 예를 들면, 획득부(105)는 기준 부호화 단위의 결정 순서에 대한 정보를 영상, 시퀀스, 픽쳐, 슬라이스, 슬라이스 세그먼트, 프로세싱 블록 등의 데이터 단위로마다 비트스트림으로부터 획득할 수 있다. 기준 부호화 단위의 결정 순서에 대한 정보는 프로세싱 블록 내에서의 기준 부호화 단위 결정 순서를 나타내므로, 결정 순서에 대한 정보는 정수개의 프로세싱 블록을 포함하는 특정 데이터 단위 마다 획득될 수 있다.According to an embodiment, the video decoding apparatus 100 may acquire information on a determination order of a reference encoding unit from a bitstream for each specific data unit. For example, the acquiring unit 105 can acquire information on the order of determination of the reference encoding unit from a bitstream for each data unit such as an image, a sequence, a picture, a slice, a slice segment, and a processing block. Since the information on the determination order of the reference encoding unit indicates the reference encoding unit determination order in the processing block, the information on the determination order can be obtained for each specific data unit including an integer number of processing blocks.
비디오 복호화 장치(100)는 일 실시예에 따라 결정된 순서에 기초하여 적어도 하나의 기준 부호화 단위를 결정할 수 있다.The video decoding apparatus 100 may determine at least one reference encoding unit based on the determined order according to an embodiment.
일 실시예에 따라 획득부(105)는 비트스트림으로부터 프로세싱 블록(2302, 2312)과 관련된 정보로서, 기준 부호화 단위 결정 순서에 대한 정보를 획득할 수 있고, 비디오 복호화 장치(100)는 상기 프로세싱 블록(2302, 2312)에 포함된 적어도 하나의 기준 부호화 단위를 결정하는 순서를 결정하고 부호화 단위의 결정 순서에 따라 픽쳐(2300)에 포함되는 적어도 하나의 기준 부호화 단위를 결정할 수 있다. 도 23을 참조하면, 비디오 복호화 장치(100)는 각각의 프로세싱 블록(2302, 2312)과 관련된 적어도 하나의 기준 부호화 단위의 결정 순서(2304, 2314)를 결정할 수 있다. 예를 들면, 기준 부호화 단위의 결정 순서에 대한 정보가 프로세싱 블록마다 획득되는 경우, 각각의 프로세싱 블록(2302, 2312)과 관련된 기준 부호화 단위 결정 순서는 프로세싱 블록마다 상이할 수 있다. 프로세싱 블록(2302)과 관련된 기준 부호화 단위 결정 순서(2304)가 래스터 스캔(raster scan)순서인 경우, 프로세싱 블록(2302)에 포함되는 기준 부호화 단위는 래스터 스캔 순서에 따라 결정될 수 있다. 이에 반해 다른 프로세싱 블록(2312)과 관련된 기준 부호화 단위 결정 순서(2314)가 래스터 스캔 순서의 역순인 경우, 프로세싱 블록(2312)에 포함되는 기준 부호화 단위는 래스터 스캔 순서의 역순에 따라 결정될 수 있다.According to one embodiment, the acquiring unit 105 may acquire information on the reference encoding unit determination order from the bitstream as information related to the processing blocks 2302 and 2312, and the video decoding apparatus 100 may acquire information It is possible to determine the order of determining at least one reference encoding unit included in the pictures 2302 and 2312 and determine at least one reference encoding unit included in the picture 2300 according to the determination order of the encoding units. Referring to FIG. 23, the video decoding apparatus 100 can determine the determination order 2304 and 2314 of at least one reference encoding unit associated with each processing block 2302 and 2312. For example, when information on a determination order of reference encoding units is obtained for each processing block, the reference encoding unit determination order associated with each processing block 2302, 2312 may be different for each processing block. When the reference encoding unit determination order 2304 related to the processing block 2302 is a raster scan order, the reference encoding unit included in the processing block 2302 can be determined according to the raster scan order. On the other hand, when the reference encoding unit determination order 2314 related to the other processing block 2312 is in the reverse order of the raster scan order, the reference encoding unit included in the processing block 2312 can be determined according to the reverse order of the raster scan order.
비디오 복호화 장치(100)는 일 실시예에 따라, 결정된 적어도 하나의 기준 부호화 단위를 복호화할 수 있다. 비디오 복호화 장치(100)는 상술한 실시예를 통해 결정된 기준 부호화 단위에 기초하여 영상을 복호화 할 수 있다. 기준 부호화 단위를 복호화 하는 방법은 영상을 복호화 하는 다양한 방법들을 포함할 수 있다.The video decoding apparatus 100 may decode the determined at least one reference encoding unit according to an embodiment. The video decoding apparatus 100 can decode an image based on the reference encoding unit determined through the above-described embodiment. The method of decoding the reference encoding unit may include various methods of decoding the image.
일 실시예에 따라 비디오 복호화 장치(100)는 현재 부호화 단위의 형태를 나타내는 블록 형태 정보 또는 현재 부호화 단위를 분할하는 방법을 나타내는 분할 형태 정보를 비트스트림으로부터 획득하여 이용할 수 있다. 블록 형태 정보 또는 분할 형태 정보는 다양한 데이터 단위와 관련된 비트스트림에 포함될 수 있다. 예를 들면, 비디오 복호화 장치(100)는 시퀀스 파라메터 세트(sequence parameter set), 픽쳐 파라메터 세트(picture parameter set), 비디오 파라메터 세트(video parameter set), 슬라이스 헤더(slice header), 슬라이스 세그먼트 헤더(slice segment header)에 포함된 블록 형태 정보 또는 분할 형태 정보를 이용할 수 있다. 나아가, 비디오 복호화 장치(100)는 최대 부호화 단위, 기준 부호화 단위, 프로세싱 블록마다 비트스트림으로부터 블록 형태 정보 또는 분할 형태 정보에 대응하는 신택스를 비트스트림으로부터 획득하여 이용할 수 있다.According to an embodiment, the video decoding apparatus 100 may obtain block type information indicating a type of a current encoding unit or division type information indicating a method of dividing a current encoding unit from a bitstream. The block type information or the division type information may be included in a bitstream related to various data units. For example, the video decoding apparatus 100 may include a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header slice segment type information included in the segment header can be used. Further, the video decoding apparatus 100 may obtain a syntax corresponding to the maximum encoding unit, the reference encoding unit, and the block type information or the division type information from the bitstream for each processing block, from the bitstream.
이제까지 다양한 실시예들을 중심으로 살펴보았다. 본 개시가 속하는 기술 분야에서 통상의 지식을 가진 자는 본 개시가 본 개시의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 개시의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 개시에 포함된 것으로 해석되어야 할 것이다.Various embodiments have been described above. It will be understood by those skilled in the art that the present disclosure may be embodied in various forms without departing from the essential characteristics of the present disclosure. Therefore, the disclosed embodiments should be considered in an illustrative rather than a restrictive sense. The scope of the present disclosure is set forth in the appended claims rather than the foregoing description, and all differences within the scope of equivalents thereof should be construed as being included in the present disclosure.
한편, 상술한 본 개시의 실시예들은 컴퓨터에서 실행될 수 있는 프로그램으로 작성가능하고, 컴퓨터로 읽을 수 있는 기록매체를 이용하여 상기 프로그램을 동작시키는 범용 디지털 컴퓨터에서 구현될 수 있다. 상기 컴퓨터로 읽을 수 있는 기록매체는 마그네틱 저장매체(예를 들면, 롬, 플로피 디스크, 하드디스크 등), 광학적 판독 매체(예를 들면, 시디롬, 디브이디 등)와 같은 저장매체를 포함한다.Meanwhile, the above-described embodiments of the present disclosure can be implemented in a general-purpose digital computer that can be created as a program that can be executed by a computer and operates the program using a computer-readable recording medium. The computer-readable recording medium includes a storage medium such as a magnetic storage medium (e.g., ROM, floppy disk, hard disk, etc.), optical reading medium (e.g., CD ROM,

Claims (15)

  1. 현재 블록 내 모든 유효 변환 계수를 포함하는 사각형 스캔 영역을 결정하는 단계;Determining a rectangular scan area including all effective transform coefficients in a current block;
    상기 사각형 스캔 영역 내 변환 계수에 관한 정보를 소정의 스캔 순서에 따라 스캔하는 단계; 및Scanning information on the transform coefficients in the quadrangular scan area according to a predetermined scan order; And
    상기 스캔된 변환 계수들에 관한 정보에 기초하여 상기 현재 블록의 변환 계수들을 획득하는 단계;Obtaining transform coefficients of the current block based on information about the scanned transform coefficients;
    상기 현재 블록의 변환 계수들에 대해 역양자화 및 역변환을 수행하여 현재 블록의 레지듀얼 블록을 생성하는 단계; 및Performing inverse quantization and inverse transform on the transform coefficients of the current block to generate a residual block of the current block; And
    상기 생성된 레지듀얼 블록에 기초하여 현재 블록을 복원하는 단계를 포함하는 비디오 복호화 방법.And reconstructing a current block based on the generated residual block.
  2. 제 1 항에 있어서,The method according to claim 1,
    상기 사각형 스캔 영역 내에는 상기 현재 블록 내 모든 유효 변환 계수를 포함하고,Wherein the rectangular scan area includes all effective transformation coefficients in the current block,
    상기 사각형 스캔 영역을 제외한 현재 블록 내 나머지 영역은 유효 변환 계수가 아닌 0의 값을 갖는 변환계수만을 포함하는 것을 특징으로 하는 비디오 복호화 방법.Wherein the remaining region in the current block excluding the square scan region includes only a transform coefficient having a value of 0 instead of an effective transform coefficient.
  3. 제 1항에 있어서,The method according to claim 1,
    상기 사각형 스캔 영역을 결정하는 단계는,Wherein the step of determining the rectangular scan area comprises:
    상기 사각형 스캔 영역을 특정하는 좌표에 관한 정보를 비트스트림으로부터 획득하는 단계; 및Obtaining information on coordinates specifying the quadrangular scan area from a bitstream; And
    상기 사각형 스캔 영역을 특정하는 좌표에 관한 정보에 기초하여 현재 블록 내 모든 유효 변환 계수를 포함하는 사각형 스캔 영역을 결정하는 단계를 포함하고,Determining a quadrangular scan area including all effective transformation coefficients in a current block based on information on coordinates specifying the quadrangular scan area,
    상기 사각형 스캔 영역을 특정하는 좌표는 상기 현재 블록 내 가장 우측에 위치하는 유효 변환 계수에 대한 수평방향 좌표 및 상기 현재 블록 내 가장 하측에 위치하는 유효 변환 계수에 대한 수직방향 좌표를 나타내는 것을 특징으로 하는 비디오 복호화 방법.Wherein the coordinates specifying the quadrangular scan area represent a horizontal coordinate for an effective transformation coefficient located at the rightmost position in the current block and a vertical coordinate for an effective transformation coefficient located at the lowermost position in the current block, Video decoding method.
  4. 제 3 항에 있어서,The method of claim 3,
    상기 사각형 스캔 영역을 특정하는 좌표에 관한 정보를 비트스트림으로부터 획득하는 단계는,Wherein the step of acquiring information on coordinates specifying the quadrangular scan area from a bitstream comprises:
    상기 사각형 스캔 영역을 특정하는 좌표에 관한 정보에 대해 컨텍스트 모델에 기초한 이진 산술 복호화를 수행하는 단계; 및 Performing binary arithmetic decoding based on the context model on information about coordinates specifying the rectangular scan area; And
    상기 이진 산술 복호화된 정보에 대해 소정의 역이진화 방법을 이용한 역이진화를 수행하여 상기 사각형 스캔영역을 특정하는 좌표에 관한 역이진화 정보를 획득하는 단계를 더 포함하는 것을 특징으로 하는 비디오 복호화 방법.Further comprising the step of performing inverse binarization using the inverse binarization method on the binary arithmetic decoding information to obtain inverse binarization information on the coordinates specifying the quadrangular scan area.
  5. 제 4 항에 있어서,5. The method of claim 4,
    상기 컨텍스트 모델은 상기 현재 블록의 크기, 상기 현재 블록의 컬러 성분(color component) 및 빈 인덱스(bin index) 중 적어도 하나에 기초하여 결정되는 것을 특징으로 하는 비디오 복호화 방법.Wherein the context model is determined based on at least one of a size of the current block, a color component of the current block, and a bin index.
  6. 제 4 항에 있어서,5. The method of claim 4,
    상기 소정의 역이진화 방법은 고정 길이(fixed length) 역이진화 방법 및 절삭형 단항(truncated unary) 역이진화 방법 중 적어도 하나인 것을 특징으로 하는 비디오 복호화 방법.Wherein the predetermined inverse binarization method is at least one of a fixed length inverse binarization method and a truncated unary inverse binarization method.
  7. 제 1 항에 있어서,The method according to claim 1,
    상기 소정의 스캔 순서는 역 지그재그 스캔(inverse zig-zag scan)에 따른 순서 또는 역 대각 스캔(inverse diagonal scan)에 따른 순서인 것을 특징으로 하는 비디오 복호화 방법.Wherein the predetermined scanning order is a sequence according to an inverse zig-zag scan or a sequence according to an inverse diagonal scan.
  8. 제 3 항에 있어서,The method of claim 3,
    상기 소정의 스캔 순서는 상기 현재 블록 내 가장 우측에 위치하는 유효 변환 계수 픽셀의 수평방향 좌표 및 상기 현재 블록 내 가장 하측에 위치하는 유효 변환 계수 픽셀의 수직방향 좌표 중 적어도 하나에 기초하여 결정되는 것을 특징으로 하는 비디오 복호화 방법.Wherein the predetermined scanning order is determined based on at least one of a horizontal direction coordinate of the effective conversion coefficient pixel located at the rightmost position in the current block and a vertical direction coordinate of the effective conversion coefficient pixel located at the lowermost position in the current block Wherein the video decoding method comprises the steps of:
  9. 제 1 항에 있어서,The method according to claim 1,
    상기 변환 계수에 관한 정보는, The information on the transform coefficients may be,
    상기 변환 계수의 절대값이 소정의 값보다 큰지 여부를 나타내는 플래그 정보, 상기 변환 계수의 절대값에 관한 잔여 레벨(remaining level) 정보, 상기 변환 계수의 부호 정보, 상기 변환 계수의 역이진화에 이용되는 이진화 파라메터 정보 중 적어도 하나를 포함하고, A flag information indicating whether an absolute value of the transform coefficient is larger than a predetermined value, remaining level information about an absolute value of the transform coefficient, sign information of the transform coefficient, And binarization parameter information,
    상기 소정의 값은 0, 1, 2 중 적어도 하나인 것을 특징으로 하는 비디오 복호화 방법. Wherein the predetermined value is at least one of 0, 1, and 2.
  10. 제 1 항에 있어서, The method according to claim 1,
    상기 스캔된 변환 계수들에 관한 정보에 기초하여 상기 현재 블록의 변환 계수들을 획득하는 단계는,Wherein obtaining the transform coefficients of the current block based on the information about the scanned transform coefficients comprises:
    상기 변환 계수들의 절대값이 소정의 값보다 큰지 여부를 나타내는 플래그 정보에 관한 컨텍스트 모델에 기초한 이진 산술 복호화 및 역이진화 중 적어도 하나를 수행하여 상기 현재 블록의 변환 계수들을 획득하는 단계를 포함하는 것을 특징으로 하는 비디오 복호화 방법.And performing binary arithmetic decoding and inverse binarization based on the context model on flag information indicating whether the absolute value of the transform coefficients is larger than a predetermined value to obtain transform coefficients of the current block .
  11. 제 9 항에 있어서,10. The method of claim 9,
    상기 변환 계수들의 절대값이 소정의 값보다 큰지 여부를 나타내는 플래그 정보는 제1 변환 계수를 포함하고,Wherein the flag information indicating whether the absolute value of the transform coefficients is larger than a predetermined value includes a first transform coefficient,
    상기 제1 변환 계수의 절대값이 소정의 값보다 큰지 여부를 나타내는 플래그 정보에 관한 컨텍스트 모델은 상기 소정의 스캔 순서에 따라 이전에 스캔된 적어도 하나의 제2 변환 계수에 관한 정보, 상기 현재 블록 내 제1 변환 계수의 위치 및 컬러 성분, 우측 또는 하측의 주변 변환 계수에 관한 정보 및 상기 제1 변환 계수의 스캔 위치, 상기 제1 변환 계수의 스캔영역에서의 상대 위치, 첫번째 스캔위치 여부 중 적어도 하나에 기초하여 결정되는 것을 특징으로 하는 비디오 복호화 방법. Wherein the context model of flag information indicating whether the absolute value of the first transform coefficient is larger than a predetermined value includes information on at least one second transform coefficient previously scanned in accordance with the predetermined scan order, At least one of a position and a color component of the first transformation coefficient, information on the right or lower peripheral transformation coefficient, and a scan position of the first transformation coefficient, a relative position in the scan region of the first transformation coefficient, Is determined on the basis of the motion vector.
  12. 제 1 항에 있어서,The method according to claim 1,
    상기 변환 계수들에 관한 정보는 변환 계수의 절대값이 소정의 값보다 큰지 여부를 나타내는 플래그 정보를 포함하고,Wherein the information on the transform coefficients includes flag information indicating whether the absolute value of the transform coefficient is larger than a predetermined value,
    비트스트림으로부터 획득될 수 있는 상기 플래그 정보의 최대 개수(maximum count)는 상기 스캔 영역의 크기에 기초하여 결정되는 것을 특징으로 하는 비디오 복호화 방법.Wherein a maximum count of the flag information that can be obtained from the bitstream is determined based on the size of the scan area.
  13. 제 1 항에 있어서,The method according to claim 1,
    소정의 스캔 순서에 따라 상기 사각형 스캔 영역 내 각 변환 계수들의 스캔 순위가 결정되고,A scan order of each of the transform coefficients in the rectangular scan region is determined according to a predetermined scan order,
    상기 사각형 스캔 영역 내 변환 계수에 관한 정보를 소정의 스캔 순서에 따라 스캔하는 단계는,Wherein the step of scanning the information on the transform coefficients in the quadrangular scan area according to a predetermined scan order comprises:
    상기 사각형 스캔 영역 내 변환 계수에 관한 정보를 사각형 스캔 영역 내 각 변환 계수들의 스캔 순위에 따라 스캔하는 단계를 포함하는 것을 특징으로 하는 비디오 복호화 방법.And scanning the information on the transform coefficients in the quadrangular scan area according to the scan order of each transform coefficients in the quadrangle scan area.
  14. 제 1 항에 있어서,The method according to claim 1,
    소정의 정방향 스캔 순서에 따라 상기 사각형 스캔 영역 내 소정의 복수개의 변환 계수를 포함하는 적어도 하나의 계수 그룹이 결정되고,At least one coefficient group including a predetermined plurality of transform coefficients in the rectangular scan region is determined according to a predetermined forward scan order,
    상기 계수 그룹 단위로 적어도 하나의 변환 계수의 부호에 관한 정보를 숨기는지 여부가 결정되는 것을 특징으로 하는 비디오 복호화 방법.Wherein whether to hide information on the code of at least one transform coefficient is determined for each coefficient group unit.
  15. 현재 블록의 변환 계수들을 획득하는 단계;Obtaining transform coefficients of a current block;
    상기 현재 블록 내 모든 유효 변환 계수를 포함하는 사각형 스캔 영역을 결정하는 단계;Determining a rectangular scan area including all the effective transform coefficients in the current block;
    상기 사각형 스캔 영역에 포함된 변환 계수에 관한 정보를 소정의 스캔 순서에 따라 스캔하는 단계;Scanning the information on the transform coefficients included in the quadrangular scan area according to a predetermined scan order;
    상기 스캔된 변환 계수에 관한 정보를 기초로 엔트로피 부호화하여 엔트로피 부호화된 정보를 생성하는 단계; 및Generating entropy-encoded information by entropy encoding based on the information about the scanned transform coefficients; And
    상기 엔트로피 부호화된 정보를 포함하는 비트스트림을 생성하는 단계를 포함하는 비디오 부호화 방법.And generating a bitstream including the entropy-encoded information.
PCT/KR2018/003820 2017-12-13 2018-03-30 Video decoding method and device thereof, and video encoding method and device thereof WO2019117402A1 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201880089303.1A CN111788830B (en) 2017-12-13 2018-03-30 Video decoding method and device, and video encoding method and device
KR1020207011249A KR102653848B1 (en) 2017-12-13 2018-03-30 Video decoding method and device and video encoding method and device
CN202310293317.8A CN116132674A (en) 2017-12-13 2018-03-30 Video decoding method and apparatus thereof, and video encoding method and apparatus thereof
CN202310286386.6A CN116132673A (en) 2017-12-13 2018-03-30 Video decoding method and apparatus thereof, and video encoding method and apparatus thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201762598002P 2017-12-13 2017-12-13
US62/598,002 2017-12-13

Publications (1)

Publication Number Publication Date
WO2019117402A1 true WO2019117402A1 (en) 2019-06-20

Family

ID=66819653

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2018/003820 WO2019117402A1 (en) 2017-12-13 2018-03-30 Video decoding method and device thereof, and video encoding method and device thereof

Country Status (2)

Country Link
CN (3) CN116132673A (en)
WO (1) WO2019117402A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112887727A (en) * 2019-11-29 2021-06-01 腾讯美国有限责任公司 Video coding and decoding method and electronic equipment
US20220417515A1 (en) * 2018-12-05 2022-12-29 Interdigital Vc Holdings, Inc. Method and device for picture encoding and decoding

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023193260A1 (en) * 2022-04-08 2023-10-12 Oppo广东移动通信有限公司 Encoding/decoding method, code stream, encoder, decoder, and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140025590A (en) * 2011-07-22 2014-03-04 모토로라 모빌리티 엘엘씨 Device and methods for scanning rectangular-shaped transforms in video coding
KR20140120341A (en) * 2012-01-22 2014-10-13 퀄컴 인코포레이티드 Coding of coefficients in video coding
KR20150003327A (en) * 2012-04-16 2015-01-08 퀄컴 인코포레이티드 Transform coefficient coding
KR101622450B1 (en) * 2011-06-27 2016-05-18 브리티쉬브로드캐스팅코퍼레이션 Video encoding and decoding using transforms
WO2017043760A1 (en) * 2015-09-08 2017-03-16 삼성전자 주식회사 Device and method for entropy encoding and decoding

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100927733B1 (en) * 2006-09-20 2009-11-18 한국전자통신연구원 An apparatus and method for encoding / decoding selectively using a transformer according to correlation of residual coefficients
WO2013012819A2 (en) * 2011-07-15 2013-01-24 General Instrument Corporation Context modeling techniques for transform coefficient level coding

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101622450B1 (en) * 2011-06-27 2016-05-18 브리티쉬브로드캐스팅코퍼레이션 Video encoding and decoding using transforms
KR20140025590A (en) * 2011-07-22 2014-03-04 모토로라 모빌리티 엘엘씨 Device and methods for scanning rectangular-shaped transforms in video coding
KR20140120341A (en) * 2012-01-22 2014-10-13 퀄컴 인코포레이티드 Coding of coefficients in video coding
KR20150003327A (en) * 2012-04-16 2015-01-08 퀄컴 인코포레이티드 Transform coefficient coding
WO2017043760A1 (en) * 2015-09-08 2017-03-16 삼성전자 주식회사 Device and method for entropy encoding and decoding

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220417515A1 (en) * 2018-12-05 2022-12-29 Interdigital Vc Holdings, Inc. Method and device for picture encoding and decoding
US11876968B2 (en) * 2018-12-05 2024-01-16 Interdigital Vc Holdings, Inc. Method and device for picture encoding and decoding
CN112887727A (en) * 2019-11-29 2021-06-01 腾讯美国有限责任公司 Video coding and decoding method and electronic equipment
CN112887727B (en) * 2019-11-29 2023-06-13 腾讯美国有限责任公司 Video encoding and decoding method and electronic equipment

Also Published As

Publication number Publication date
CN116132673A (en) 2023-05-16
CN111788830B (en) 2023-04-04
KR20200088297A (en) 2020-07-22
CN111788830A (en) 2020-10-16
CN116132674A (en) 2023-05-16

Similar Documents

Publication Publication Date Title
WO2017171370A1 (en) Method and apparatus for processing video signal
WO2017176030A1 (en) Method and apparatus for processing video signal
WO2017146526A1 (en) Video signal processing method and device
WO2017135759A1 (en) Video decoding method and apparatus by chroma-multi-transform, and video encoding method and apparatus by chroma-multi-transform
WO2017026681A1 (en) Inter prediction method and apparatus in video coding system
WO2018070552A1 (en) Method and apparatus for encoding/decoding image
WO2020076116A1 (en) Image encoding/decoding methods and apparatuses
WO2011126273A2 (en) Method and apparatus for encoding video by compensating for pixel value according to pixel groups, and method and apparatus for decoding video by the same
WO2020235951A1 (en) Image encoding method and device, and image decoding method and device
WO2017142335A1 (en) Video decoding method and device for same and video encoding method and device for same
WO2020130730A1 (en) Video encoding method and device, and video decoding method and device
WO2012044104A2 (en) Video encoding method for encoding hierarchical-structure symbols and a device therefor, and video decoding method for decoding hierarchical-structure symbols and a device therefor
WO2017222331A1 (en) Video signal processing method and device
WO2018226066A1 (en) Method and apparatus for decoding video according to affine prediction in video coding system
WO2020213963A1 (en) Method for encoding/decoding image signal, and device for same
WO2016190627A1 (en) Method and device for processing video signal
WO2020013532A1 (en) Method and device for image encoding/decoding, and recording medium having bitstream stored thereon
WO2019225994A1 (en) Method and apparatus for processing video signal
WO2019093598A1 (en) Apparatus and method for encoding motion information, and decoding apparatus and method
WO2020004978A1 (en) Method and apparatus for processing video signal
WO2020159199A1 (en) Image signal encoding/decoding method and device therefor
WO2019117402A1 (en) Video decoding method and device thereof, and video encoding method and device thereof
WO2020130714A1 (en) Video signal encoding/decoding method, and device therefor
WO2020141904A1 (en) Image signal encoding/decoding method and device for same
WO2011021914A2 (en) Method and apparatus for encoding/decoding images using adaptive motion vector resolution

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

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

Country of ref document: EP

Kind code of ref document: A1