WO2018143670A1 - Method and device for encoding/decoding image - Google Patents

Method and device for encoding/decoding image Download PDF

Info

Publication number
WO2018143670A1
WO2018143670A1 PCT/KR2018/001341 KR2018001341W WO2018143670A1 WO 2018143670 A1 WO2018143670 A1 WO 2018143670A1 KR 2018001341 W KR2018001341 W KR 2018001341W WO 2018143670 A1 WO2018143670 A1 WO 2018143670A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
coefficient
decoding
region
probability
Prior art date
Application number
PCT/KR2018/001341
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
Priority claimed from KR1020180007285A external-priority patent/KR20180089290A/en
Priority to CN202210973907.0A priority Critical patent/CN115379224A/en
Priority to CN202210973259.9A priority patent/CN115379222A/en
Priority to EP23195330.8A priority patent/EP4270956A3/en
Priority to CN202210975650.2A priority patent/CN115379225A/en
Priority to CN201880009395.8A priority patent/CN110235445B/en
Application filed by 세종대학교 산학협력단 filed Critical 세종대학교 산학협력단
Priority to CN202210975749.2A priority patent/CN115379226A/en
Priority to JP2019541229A priority patent/JP2020505870A/en
Priority to CN202210973319.7A priority patent/CN115379223A/en
Priority to US16/482,457 priority patent/US11425426B2/en
Priority to EP18747331.9A priority patent/EP3579557A4/en
Publication of WO2018143670A1 publication Critical patent/WO2018143670A1/en
Priority to JP2022078472A priority patent/JP2022106982A/en
Priority to US17/857,470 priority patent/US11882315B2/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/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/167Position within a video image, e.g. region of interest [ROI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/18Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Definitions

  • the present invention relates to a method and apparatus for encoding / decoding video signals, and more particularly, to entropy encoding and decoding.
  • HEVC has a variety of technologies such as intra picture prediction, inter picture prediction, transform, quantization, entropy coding, and in-loop filters.
  • Information that is input of entropy encoding is generated using various methods. As the size of an input image or a unit block to be encoded or decoded is increased, data to be entropy-encoded may rapidly increase.
  • the present invention has a main object to provide a more efficient entropy encoding and decoding technique.
  • the present invention has a main object to reduce the amount of data to be encoded by entropy encoding or decoding using a skip region.
  • the present invention has a main object to improve arithmetic coding and arithmetic decoding performance by effectively selecting probability information applied to encoding or decoding each symbol during context-adaptive arithmetic coding and decoding.
  • An image encoding method or encoding apparatus encodes a position of a reference coefficient in a current transform block to be encoded and encodes skip region information on a skipped region selected based on the position of the reference coefficient. Can be.
  • the skip region information may indicate whether the coefficients in the skip region have the same coefficient value.
  • a video encoding method or encoding apparatus obtains binarized information by binarizing a value of a transform coefficient, and encodes the binarized information according to a position of the transform coefficient in a transform block. Probability information to be applied can be determined.
  • the probability information to be applied to the encoding of the binarized information may be determined according to which region the transform coefficient is located in a transform block divided into a plurality of regions.
  • An image encoding method or encoding apparatus encodes a position of a reference coefficient in a current transform block to be encoded and encodes skip region information on a skipped region selected based on the position of the reference coefficient.
  • binarized information may be obtained by binarizing a value of a transform coefficient not included in the skip region, and a probability information table to be applied to encoding the binarized information may be selected from a plurality of probability information tables.
  • the probability information table to be applied to the encoding of the binarized information may be selected according to whether the skip region is used to encode the current transform block.
  • An image decoding method or apparatus may decode positions of reference coefficients in a current transform block to be decoded, and decode skip region information on skip regions selected based on the positions of the reference coefficients. Can be.
  • the skip region information may indicate whether the coefficients in the skip region have the same coefficient value.
  • An image decoding method or decoding apparatus obtains a value of an arithmetic-coded transform coefficient from a bitstream, and according to a position of the transform coefficient in a transform block, Probability information to be applied to the decoding can be determined.
  • Probability information to be applied to the decoding of the arithmetic coded transform coefficients may be determined according to which region the transform coefficient is located in a transform block divided into a plurality of regions.
  • An image decoding method or decoding apparatus decodes a position of a reference coefficient in a current transform block to be decoded, and decodes skip region information on a skipped region selected based on the position of the reference coefficient.
  • an arithmetic encoded value of a transform coefficient not included in the skip region may be obtained, and a probability information table may be selected from among a plurality of probability information tables to be applied to decoding an arithmetic encoded value of the transform coefficient.
  • one of the plurality of probability information tables may be selected depending on whether the skip region is used to decode the current transform block.
  • a method of decoding an image includes decoding a position of a reference coefficient in a current transform block, deriving probability information of a coding parameter based on the position of the reference coefficient, and determining the derived probability information. And decoding the coding parameter by using the same.
  • the reference coefficient may be a first non-zero coefficient in an inverse scan order of coefficients in the current transform block.
  • the current transform block is divided into a first region and a second region, and the probability information of the coding parameter may be determined based on which region the reference coefficient exists.
  • a method of decoding an image comprising: decoding partial information of a DC coefficient of a current transform block, deriving probability information of a coding parameter based on the partial information of the DC coefficient, and the derived probability And decoding the coding parameter using the information.
  • the DC coefficient may be a coefficient located at the upper left of the current transform block.
  • the partial information of the DC coefficient may be at least one piece of information for decoding the DC coefficient.
  • the decoding method of the image further comprising: decoding a position of a reference coefficient in the current transform block, wherein the probability information of the coding parameter includes distance information between the DC coefficient and the reference coefficient and partial information of the DC coefficient. Can be derived based on.
  • a method of encoding an image comprising: encoding positions of reference coefficients in a current transform block, deriving probability information of coding parameters based on positions of the reference coefficients, and using the derived probability information And encoding the coding parameter.
  • the reference coefficient may be a first non-zero coefficient in an inverse scan order of coefficients in the current transform block.
  • the current transform block is divided into a first region and a second region, and the probability information of the coding parameter may be determined based on which region the reference coefficient exists.
  • the DC coefficient may be a coefficient located at the upper left of the current transform block.
  • the partial information of the DC coefficient may be at least one piece of information for encoding the DC coefficient.
  • the coding method of the image further comprising: encoding a position of a reference coefficient in the current transform block, wherein the probability information of the coding parameter includes distance information between the DC coefficient and the reference coefficient and partial information of the DC coefficient. Can be derived based on.
  • the amount of encoded information generated as a result of encoding a video can be reduced, thereby improving the encoding efficiency.
  • arithmetic coding and arithmetic decoding performance can be improved by effectively selecting probability information applied to encoding or decoding each symbol during context-adaptive arithmetic coding and decoding.
  • FIG. 1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
  • FIG. 2 is a block diagram illustrating an image decoding apparatus according to an embodiment of the present invention.
  • FIG. 3 is a flowchart illustrating a method of encoding a transform block, according to an embodiment of the present invention.
  • 4A to 4D are diagrams illustrating a diagonal reverse scan, a vertical reverse scan, and a horizontal reverse scan in sub-block units.
  • FIG. 5 is a flowchart illustrating a method of decoding a transform block according to an embodiment of the present invention.
  • FIG. 6 is a flowchart illustrating a video encoding method using a skip region according to an embodiment of the present invention.
  • FIG. 7 is a diagram illustrating a skip region according to an embodiment of the present invention.
  • FIG. 8 is a diagram illustrating a skip region according to another embodiment of the present invention.
  • FIG. 9 is a diagram illustrating an additional skip area according to an embodiment of the present invention.
  • FIG. 10 is a flowchart illustrating a method of encoding a transform block including a skip region or an additional skip region according to an embodiment of the present invention.
  • FIG. 11 is a flowchart illustrating a method of decoding an image using a skip region according to an embodiment of the present invention.
  • FIG. 12 is a flowchart illustrating a method of decoding a transform block including a skip region or an additional skip region according to an embodiment of the present invention.
  • FIG. 13 is a flowchart illustrating a context-adaptive binarization arithmetic coding method according to an embodiment of the present invention.
  • FIG. 14 is a flowchart illustrating a context-adaptive binarization arithmetic decoding method according to an embodiment of the present invention.
  • 15A to 15C are diagrams illustrating an example in which probability information is differently applied according to information of neighboring coefficients.
  • 16A to 16C illustrate various embodiments of dividing a transform block of a frequency domain into a plurality of regions.
  • 17 is a flowchart illustrating an arithmetic coding method according to an embodiment of the present invention.
  • FIG. 18 is a flowchart illustrating an arithmetic decoding method according to an embodiment of the present invention.
  • 19A to 19C are diagrams for describing arithmetic encoding and arithmetic decoding according to another embodiment of the present invention.
  • 20 is a flowchart illustrating an arithmetic coding method or a decoding method according to another embodiment of the present invention.
  • 21 is a flowchart illustrating a context-adaptive binarization arithmetic coding method according to an embodiment of the present invention.
  • 22 is a flowchart illustrating a context-adaptive binarization arithmetic decoding method according to an embodiment of the present invention.
  • 23A and 24B illustrate an example in which probability information is differently applied according to information of neighboring coefficients.
  • 24 is a flowchart illustrating a method of deriving probability information based on a reference coefficient according to an embodiment of the present invention.
  • 25 is a diagram illustrating a reference counting position according to an embodiment of the present invention.
  • 26A and 26B illustrate an example in which probability information is differently applied according to information of neighboring coefficients.
  • FIG. 27 is a decoding flowchart illustrating a method of deriving probability information based on a reference coefficient according to an embodiment of the present invention.
  • 28 is a flowchart illustrating a method of deriving probability information based on partial information of DC according to an embodiment of the present invention.
  • 29 is a flowchart illustrating a method of encoding transform block coefficients using partial information of DC coefficients.
  • FIG. 30 is a decoding flowchart illustrating a method of deriving probability information based on partial information of a DC according to an embodiment of the present invention.
  • 31 is a flowchart illustrating a method of decoding transform block coefficients using partial information of DC coefficients.
  • 32 is a flowchart illustrating a method of deriving probability information based on a distance between a DC coefficient and a reference coefficient and partial information of the DC coefficient.
  • 33 is a diagram illustrating an example in which probability information is differently applied according to information of peripheral coefficients.
  • 34 is a decoding flowchart illustrating a method of deriving probability information based on a distance between a DC coefficient and a reference coefficient and partial information of the DC coefficient.
  • first and second may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another.
  • the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component.
  • FIG. 1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
  • the image encoding apparatus 100 may include an image splitter 101, an intra picture predictor 102, an inter picture predictor 103, a subtractor 104, a transformer 105, and a quantizer. 106, an entropy encoding unit 107, an inverse quantization unit 108, an inverse transform unit 109, an increase unit 110, a filter unit 111, and a memory 112.
  • each of the components shown in FIG. 1 is independently illustrated to represent different characteristic functions in the image encoding apparatus, and does not mean that each of the components is made of separate hardware or one software component unit.
  • each component is included in each component for convenience of description, and at least two of the components may be combined into one component, or one component may be divided into a plurality of components to perform a function.
  • Integrated and separate embodiments of the components are also included within the scope of the present invention without departing from the spirit of the invention.
  • the components may not be essential components for performing essential functions in the present invention, but may be optional components for improving performance.
  • the present invention can be implemented including only the components essential for implementing the essentials of the present invention except for the components used for improving performance, and the structure including only the essential components except for the optional components used for improving performance. Also included in the scope of the present invention.
  • the image divider 100 may divide the input image into at least one block.
  • the input image may have various shapes and sizes, such as a picture, a slice, a tile, and a segment.
  • a block may mean a coding unit (CU), a prediction unit (PU), or a transformation unit (TU).
  • the partitioning may be performed based on at least one of a quadtree or a binary tree.
  • Quad tree is a method of dividing an upper block into lower blocks having a width and a height of half of the upper block.
  • the binary tree divides the upper block into lower blocks, which are half of the upper block in either width or height.
  • a block may have a square as well as a non-square shape.
  • the predictors 102 and 103 may include an inter prediction unit 103 that performs inter prediction and an intra prediction unit 102 that performs intra prediction. Whether to use inter prediction or intra prediction on the prediction unit may be determined, and specific information (eg, an intra prediction mode, a motion vector, a reference picture, etc.) according to each prediction method may be determined. In this case, the processing unit in which the prediction is performed may differ from the processing unit in which the prediction method and the details are determined. For example, the method of prediction and the prediction mode may be determined in the prediction unit, and the prediction may be performed in the transform unit.
  • the residual value (residual block) between the generated prediction block and the original block may be input to the transformer 105.
  • prediction mode information and motion vector information used for prediction may be encoded by the entropy encoder 107 together with the residual value and transmitted to the decoder.
  • the original block may be encoded as it is and transmitted to the decoder without generating the prediction block through the prediction units 102 and 103.
  • the intra prediction unit 102 may generate a prediction block based on reference pixel information around the current block, which is pixel information in the current picture.
  • a reference pixel included in the neighboring block to which inter prediction is applied may be replaced with a reference pixel in another block around to which intra prediction is applied. That is, when the reference pixel is not available, the unavailable reference pixel information may be replaced with at least one reference pixel among the available reference pixels.
  • a prediction mode may have a directional prediction mode using reference pixel information according to a prediction direction, and a non-directional mode using no directional information when performing prediction.
  • the mode for predicting the luminance information and the mode for predicting the color difference information may be different, and the intra prediction mode information or the predicted luminance signal information used for predicting the luminance information may be utilized to predict the color difference information.
  • the intra prediction unit 102 may include an adaptive intra smoothing (AIS) filter, a reference pixel interpolator, and a DC filter.
  • AIS filter is a filter that filters the reference pixels of the current block and may adaptively determine whether to apply the filter according to the prediction mode of the current prediction unit. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
  • the reference pixel interpolation unit of the intra prediction unit 102 interpolates the reference pixel when the intra prediction mode of the prediction unit performs the intra prediction based on the pixel value interpolated with the reference pixel. Can be generated. If the prediction mode of the current prediction unit is a prediction mode for generating a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated.
  • the DC filter may generate the prediction block through filtering when the prediction mode of the current block is the DC mode.
  • the inter prediction unit 103 generates a prediction block by using the reconstructed reference image and motion information stored in the memory 112.
  • the motion information may include, for example, a motion vector, a reference picture index, a list 1 prediction flag, a list 0 prediction flag, and the like.
  • a residual block including residual information which is a difference between the prediction unit generated by the prediction units 102 and 103 and the original block of the prediction unit, may be generated.
  • the generated residual block may be input to the converter 130 and converted.
  • the inter prediction unit 103 may induce a prediction block based on information of at least one of a previous picture or a subsequent picture of the current picture.
  • a prediction block of the current block may be derived based on information of a partial region in which encoding in the current picture is completed.
  • the inter prediction unit 103 may include a reference picture interpolator, a motion predictor, and a motion compensator.
  • the reference picture interpolation unit may receive reference picture information from the memory 112 and generate pixel information of less than an integer pixel in the reference picture.
  • a DCT based 8-tap interpolation filter having different filter coefficients may be used to generate pixel information of integer pixels or less in units of 1/4 pixels.
  • a DCT-based interpolation filter having different filter coefficients may be used to generate pixel information of an integer pixel or less in units of 1/8 pixels.
  • the motion predictor may perform motion prediction based on the reference picture interpolated by the reference picture interpolator.
  • various methods such as full search-based block matching algorithm (FBMA), three step search (TSS), and new three-step search algorithm (NTS) may be used.
  • FBMA full search-based block matching algorithm
  • TSS three step search
  • NTS new three-step search algorithm
  • the motion vector may have a motion vector value of 1/2 or 1/4 pixel units based on the interpolated pixels.
  • the motion prediction unit may predict the prediction block of the current block by using a different motion prediction method.
  • various methods such as a skip method, a merge method, and an advanced motion vector prediction (AMVP) method may be used.
  • AMVP advanced motion vector prediction
  • the subtraction unit 104 generates a residual block of the current block by subtracting the block to be currently encoded from the prediction block generated by the intra prediction unit 102 or the inter prediction unit 103.
  • the transform unit 105 may transform the residual block including the residual data by using a transformation method such as DCT, DST, or Karhunen Loeve Transform (KLT).
  • the transformation method may be determined based on the intra prediction mode of the prediction unit used to generate the residual block. For example, depending on the intra prediction mode, DCT may be used in the horizontal direction and DST may be used in the vertical direction.
  • the quantization unit 106 may quantize the values converted in the frequency domain by the transformer 105.
  • the quantization coefficient may change depending on the block or the importance of the image.
  • the value calculated by the quantization unit 106 may be provided to the inverse quantization unit 108 and the entropy encoding unit 107.
  • the transform unit 105 and / or the quantization unit 106 may be selectively included in the image encoding apparatus 100. That is, the image encoding apparatus 100 may encode the residual block by performing at least one of transform or quantization on the residual data of the residual block, or skipping both transform and quantization. Even if neither the transformation nor the quantization is performed or neither the transformation nor the quantization is performed in the image encoding apparatus 100, a block entering the input of the entropy encoder 107 is generally referred to as a transform block.
  • the entropy encoder 107 entropy encodes the input data. Entropy encoding may use various encoding methods such as, for example, Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC).
  • the entropy encoder 107 may be configured to perform various operations such as coefficient information, block type information, prediction mode information, split unit information, prediction unit information, transmission unit information, motion vector information, reference frame information, interpolation information of a transform block, filtering information, and the like. Information can be encoded.
  • the coefficients of the transform block may be encoded in units of sub blocks within the transform block.
  • Last_sig a syntax element that indicates the position of the first non-zero coefficient in reverse scan order, for encoding the coefficients of the transform block, Coded_sub_blk_flag, which is a flag indicating whether there is at least one non-zero coefficient in the subblock, Sig_coeff_flag, a flag that indicates whether the coefficient is non-zero, Abs_greater1_flag, which indicates whether the absolute value of the coefficient is greater than 1, Abs_greater2_flag, which indicates whether the absolute value of the coefficient is greater than 2, Sign_flag, which indicates the sign of the coefficient, etc. Syntax elements may be encoded. Residual values of coefficients not encoded with only the syntax elements may be encoded through the syntax element remaining_coeff.
  • the inverse quantization unit 108 and the inverse transformer 109 inverse quantize the quantized values in the quantization unit 106 and inverse transform the transformed values in the transformer 105.
  • the residual values generated by the inverse quantizer 108 and the inverse transformer 109 are predicted by the motion estimator, the motion compensator, and the intra prediction unit 102 included in the predictors 102 and 103. It may be combined with the prediction unit to generate a reconstructed block.
  • the transcriptor 110 generates a reconstructed block by multiplying the prediction blocks generated by the predictors 102 and 103 and the residual blocks generated by the inverse transform unit 109.
  • the filter unit 111 may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
  • ALF adaptive loop filter
  • the deblocking filter may remove block distortion caused by boundaries between blocks in the reconstructed picture.
  • it may be determined whether to apply a deblocking filter to the current block based on the pixels included in several columns or rows included in the block.
  • a strong filter or a weak filter may be applied according to the required deblocking filtering strength.
  • horizontal filtering and vertical filtering may be performed in parallel when vertical filtering and horizontal filtering are performed.
  • the offset correction unit may correct the offset with respect to the original image on a pixel-by-pixel basis for the deblocking image.
  • the pixels included in the image are divided into a predetermined number of areas, and then, an area to be offset is determined, an offset is applied to the corresponding area, or offset considering the edge information of each pixel. You can use this method.
  • Adaptive Loop Filtering may be performed based on a value obtained by comparing the filtered reconstructed image with the original image. After dividing the pixels included in the image into a predetermined group, one filter to be applied to the group may be determined and filtering may be performed for each group. For information related to whether to apply ALF, a luminance signal may be transmitted for each coding unit (CU), and the shape and filter coefficient of an ALF filter to be applied may vary according to each block. In addition, regardless of the characteristics of the block to be applied, the same type (fixed form) of the ALF filter may be applied.
  • ALF Adaptive Loop Filtering
  • the memory 112 may store a reconstructed block or picture calculated by the filter unit 111, and the stored reconstructed block or picture may be provided to the predictors 102 and 103 when performing inter prediction.
  • FIG. 2 is a block diagram illustrating an image decoding apparatus 200 according to an embodiment of the present invention.
  • the image decoding apparatus 200 may include an entropy decoder 201, an inverse quantizer 202, an inverse transform unit 203, an increase unit 204, a filter unit 205, a memory 206, and the like.
  • the prediction unit 207 and 208 may be included.
  • the input bitstream may be decoded according to a process opposite to that performed by the image encoding apparatus 100.
  • the entropy decoding unit 201 may perform entropy decoding in a procedure opposite to that of the entropy encoding unit 107 of the image encoding apparatus 100. For example, various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be applied to the method performed by the image encoder.
  • the entropy decoding unit 201 may decode the syntax elements described above, that is, Last_sig, Coded_sub_blk_flag, Sig_coeff_flag, Abs_greater1_flag, Abs_greater2_flag, Sign_flag, and remaining_coeff. Also, the entropy decoder 201 may decode information related to intra prediction and inter prediction performed by the image encoding apparatus 100.
  • the inverse quantizer 202 generates a transform block by performing inverse quantization on the quantized transform block. It operates substantially the same as the inverse quantizer 108 of FIG.
  • the inverse transform unit 203 performs an inverse transform on the transform block to generate a residual block.
  • the transformation method may be determined based on information on a prediction method (inter or intra prediction), a size and / or shape of a block, an intra prediction mode, and the like. It operates substantially the same as the inverse transform unit 109 of FIG.
  • the increaser 204 generates a reconstructed block by multiplying the prediction block generated by the intra prediction unit 207 or the inter prediction unit 208 and the residual block generated by the inverse transform unit 203. It operates substantially the same as the transpiration section 110 of FIG.
  • the filter unit 205 reduces various kinds of noise generated in the restored blocks.
  • the filter unit 205 may include a deblocking filter, an offset corrector, and an ALF.
  • the image encoding apparatus 100 may receive information about whether a strong filter or a weak filter is applied.
  • the deblocking filter of the image decoding apparatus 200 the deblocking filter related information provided by the image encoding apparatus 100 may be provided, and the image decoding apparatus 200 may perform deblocking filtering on the corresponding block.
  • the offset correction unit may perform offset correction on the reconstructed image based on the type of offset correction and offset value information applied to the image during encoding.
  • the ALF may be applied to a coding unit based on ALF application information, ALF coefficient information, and the like provided from the image encoding apparatus 100. Such ALF information may be provided included in a specific parameter set.
  • the filter unit 205 operates substantially the same as the filter unit 111 of FIG. 1.
  • the memory 206 stores the reconstruction block generated by the multiplier 204. It operates substantially the same as the memory 112 of FIG.
  • the prediction units 207 and 208 may generate the prediction blocks based on the prediction block generation related information provided by the entropy decoding unit 201 and previously decoded blocks or picture information provided by the memory 206.
  • the prediction units 207 and 208 may include an intra prediction unit 207 and an inter prediction unit 208. Although not separately illustrated, the prediction units 207 and 208 may further include a prediction unit determination unit.
  • the prediction unit determination unit receives various information such as prediction unit information input from the entropy decoder 201, prediction mode information of the intra prediction method, and motion prediction related information of the inter prediction method, and distinguishes the prediction unit from the current coding unit, and predicts It may be determined whether the unit performs inter prediction or intra prediction.
  • the inter prediction unit 208 may include information included in at least one of a previous picture or a subsequent picture of the current picture including the current prediction unit by using information necessary for inter prediction of the current prediction unit provided by the image encoding apparatus 100. Based on the prediction, the inter prediction may be performed on the current prediction unit. Alternatively, inter-screen prediction may be performed based on information of a pre-restored partial region in the current picture including the current prediction unit.
  • Whether the motion prediction method of the prediction unit included in the coding unit based on the coding unit to perform inter prediction is skip mode, merge mode, or AMVP mode. Can be determined.
  • the intra prediction unit 207 generates a prediction block using pixels that are located around the block to be currently encoded and are reconstructed.
  • the intra prediction unit 207 may include an adaptive intra smoothing (AIS) filter, a reference pixel interpolator, and a DC filter.
  • the AIS filter is a filter that filters the reference pixels of the current block and may adaptively determine whether to apply the filter according to the prediction mode of the current prediction unit.
  • the AIS filtering may be performed on the reference pixel of the current block by using the prediction mode of the prediction unit and the AIS filter information provided by the image encoding apparatus 100. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
  • the reference pixel interpolation unit of the intra prediction unit 207 interpolates a reference pixel at a fractional position by interpolating the reference pixel when the prediction mode of the prediction unit is a prediction unit that performs intra prediction based on a pixel value interpolating the reference pixel. Can be generated.
  • the generated reference pixel at the fractional unit location may be used as the prediction pixel of the pixel in the current block. If the prediction mode of the current prediction unit is a prediction mode for generating a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated.
  • the DC filter may generate the prediction block through filtering when the prediction mode of the current block is the DC mode.
  • the intra prediction unit 207 operates substantially the same as the intra prediction unit 102 of FIG. 1.
  • the inter prediction unit 208 generates an inter prediction block using the reference picture and the motion information stored in the memory 206.
  • the inter prediction unit 208 operates substantially the same as the inter prediction unit 103 of FIG. 1.
  • FIG. 3 is a flowchart illustrating a method of encoding a transform block, according to an embodiment of the present invention.
  • the encoding method of the transform block of FIG. 3 may be performed by the entropy encoder 107 of the image encoding apparatus 100.
  • one transform block may be encoded in sub-block units.
  • the current transform block 400 to be encoded or decoded is an 8 ⁇ 8 block
  • the current transform block 400 may be divided into four subblocks 1 401 to 4 block 404 having a size of 4 ⁇ 4.
  • an inverse scan method in a vertical, horizontal, or diagonal direction may be used according to a prediction mode of the current block or the current transform block.
  • the prediction mode may be inter prediction or intra prediction.
  • 4B, 4C and 4D show a diagonal reverse scan, a vertical reverse scan and a horizontal reverse scan, respectively.
  • a diagonal reverse scan is described as an example, but both a vertical reverse scan or a horizontal reverse scan may be applied.
  • non-zero coefficients are determined as reference coefficients when scanning transform coefficients according to an inverse scan order, and the position information Last_sig is encoded (S301).
  • the sub block including the reference coefficient is selected (S302) and the corresponding sub block information is encoded (S303).
  • Coded_sub_blk_flag which is sub block information, is a flag indicating whether there is at least one non-zero coefficient in the current sub block. Thereafter, non-zero coefficient information is encoded (S304).
  • Sig_coeff_flag which is nonzero coefficient information, indicates whether or not the value of each coefficient existing in the subblock is zero.
  • N excess coefficient information indicates whether the absolute value of each coefficient exceeds a value from 1 to N for all coefficients existing in the subblock.
  • N uses arbitrary preset values for encoding and decoding, but may encode the value of N to use the same value for encoding and decoding.
  • the number of N excess coefficient information may use any predetermined value or may be used differently according to the position of the reference coefficient. For example, when N is set to 3, for all coefficients determined to be non-zero in the subblock, whether or not the absolute value of each coefficient is greater than 1 is encoded. To this end, Abs_greater1_flag, a flag indicating whether the absolute value of the coefficient is greater than one, is used.
  • Abs_greater2_flag which is a flag indicating whether the absolute value of the coefficient is greater than 2
  • Abs_greater3_flag a flag indicating whether the absolute value of the coefficient is greater than 3
  • code information indicating whether the coefficient is negative or positive is encoded for each coefficient judged not to be zero (S306).
  • Sign_flag may be used as the sign information. Only remaining coefficients obtained by subtracting N are defined as residual coefficient information only for coefficients determined to be larger than N, and residual value information remaining_coeff of the coefficients is encoded (S307).
  • next subblock exists (S309), and if so, it moves to the next subblock (S310) and the subblock information is encoded (S303).
  • the subblock information Coded_sub_blk_flag is checked (S308). If it is determined that the value of Coded_sub_blk_flag is true, Sig_coeff_flag, which is non-zero coefficient information, is encoded. If the value of the corresponding subblock information Coded_sub_blk_flag is false, it means that there is no coefficient to be encoded in the corresponding subblock. Therefore, the existence of the next subblock is checked.
  • the subblock is a subblock located at the lowest frequency side, it is set to the same value at the time of encoding and decoding as true without encoding and decoding subblock information under the assumption that there is a non-zero coefficient. It is also possible.
  • the decoding method of the transform block of FIG. 5 corresponds to the encoding method of the transform block of FIG. 3.
  • the decoding method of the transform block of FIG. 5 may be performed by the entropy decoding unit 201 of the image decoding apparatus 200.
  • the positional information Last_sig of the reference coefficient which is a non-zero transform coefficient, is first decoded according to the inverse scan order (S501).
  • the sub block including the reference coefficient is selected (S502) and the sub block information Coded_sub_blk_flag is decoded (S503). Thereafter, non-zero coefficient information Sig_coeff_flag is decoded (S504). The N excess coefficient information is then decoded (S505).
  • the N excess coefficient information may include Abs_greater1_flag, Abs_greater2_flag, Abs_greater3_flag, and the like as described above.
  • the sign information Sign_flag of the coefficient is decoded for each coefficient determined to be non-zero (S506). Residual coefficient information remaing_coeff corresponding to the remaining value after subtracting N is only decoded for the coefficient determined to be greater than N (S507). After that, it is checked whether the next subblock exists (S509), and if so, it moves to the next subblock (S510), and the subblock information Coded_sub_blk_flag is decoded (S503). If the subblock information Coded_sub_blk_flag is checked (S508), and it is determined to be true, the non-zero coefficient information Sig_coeff_flag is decoded. do.
  • FIG. 6 is a flowchart illustrating a video encoding method using a skip region according to an embodiment of the present invention.
  • the image encoding method of FIG. 6 may be performed by the entropy encoding unit 107 of the image encoding apparatus 100.
  • the entropy encoder 107 encodes a position of a reference coefficient in a current transform block to be encoded (S601).
  • the reference coefficient refers to the first non-zero coefficient when scanning the coefficients in reverse scan order.
  • skip region information on the selected skip region is encoded based on the position of the reference coefficient (S602).
  • the skip region is an area in the current transform block, which can be determined based on the position of the reference coefficient.
  • the skip region information indicates whether all coefficients in the skip region have the same value.
  • the same value of the coefficients in the skipped region may be zero. If the same value of the coefficients in the skipped region is not 0, information indicating which value is not 0 may be further encoded. It is also possible to use any non-zero predetermined value as the same value of the coefficients in the skip region. In this case, it is possible to encode information of a predetermined value through an upper header rather than a transform block unit.
  • the skip region may be determined in the encoding / decoding process according to a predetermined rule, and the encoding apparatus 100 or the decoding apparatus 200 may further encode a coordinate indicating the range of the skip region in the transform block. The same location may be used.
  • FIG. 7 is a diagram illustrating a skip region according to an embodiment of the present invention. Assume that a diagonal inverse scan is used for coefficient coding of the current transform block 700.
  • the coefficients positioned on the reference line 702 and the reference line 702 are present below the reference line 702.
  • An area containing the coefficients to be specified is designated as a skip area.
  • the skipped region is shaded, and all coefficients in the skipped region have the same value of zero.
  • all the coefficients in the skipped region are located later in the coding order than the reference coefficients.
  • the reverse scan order is not determined based on the reference coefficient.
  • the skip region may be set using one of non-zero coefficients after the phase reference coefficient or a coefficient adjacent to the reference coefficient.
  • the arbitrary area in the transform block in which the reference coefficient is located can be set by comparing the number of sub-blocks calculated in the reverse scan order with a preset threshold.
  • the reference coefficient may be set to determine how far from any arbitrary position of the transform block to compare with a preset threshold. For example, this arbitrary position may be a center point that is halfway between the transverse and vertical sides of the transform block.
  • m and n may be encoded through block units or higher headers, and the same preset values may be used for encoding and decoding.
  • FIG. 8 is a diagram illustrating a skip region according to another embodiment of the present invention.
  • a coefficient including the coefficients existing at the bottom of the reference line 803 are designated as a skip region.
  • the coefficients belonging to the skipped region are located later in the coding order than the reference coefficients.
  • the skip region is indicated by the shade.
  • a skip region may be additionally set in addition to the skip region set by steps S601 and S603.
  • the skip region additionally set may be encoded using additional skip region information.
  • FIG. 9 is a diagram illustrating an additional skip area according to an embodiment of the present invention.
  • An additional skip region is set in FIG. 9 in addition to the skip region illustrated in FIG. 7.
  • An area above the skip area of FIG. 7 is set as an additional skip area, and additional skip area information indicating whether coefficients in the additional skip area are all the same value may be encoded.
  • the same value of the coefficients in the skipped region may be zero. If the same value of the coefficients in the skipped region is not 0, information indicating which value is not 0 may be further encoded. It is also possible to use any preset value other than zero as the same value of the coefficients in the skip region. In this case, it is possible to encode information of a predetermined value through an upper header rather than a transform block unit.
  • the location of the additional skip region may be determined in the encoding and decoding process according to a predetermined rule, or the same position may be used in the encoding apparatus 100 and the decoding apparatus 200 by further encoding the coordinates in the transform block. have.
  • the newly generated additional skip region may be separated by a distance p from the previous skip region.
  • a skip region is set by generating a reference line 702 based on the reference coefficient 701, and an example in which an upper portion of the reference line 702 is additionally set as a skip region.
  • an area including coefficients on the reference line 703 may be an additional skip area. If the distance p is 1, the additional skip region includes an area that includes the coefficients on the baseline 703 and an area that includes the coefficients on the baseline 704.
  • the distance p between the additional skip region and the skip region is 0 or 1, but other values may be used.
  • p may use the same preset value in the encoding / decoding process.
  • the value of p may be encoded in a block unit or may be encoded through an upper header.
  • the additional skip region may be added by a preset method. For example, it is also possible to continue adding additional skip regions or to encode a predetermined number q until the additional skip region information is false. Here, it is possible to set a different p for each additional skip region added.
  • FIG. 10 is a flowchart illustrating a method of encoding a transform block including a skip region or an additional skip region according to an embodiment of the present invention.
  • the method shown in FIG. 10 may be performed after the method shown in FIG. 6.
  • the encoding method of FIG. 10 may be performed by the entropy encoding unit 107 of the image encoding apparatus 100.
  • a reference coefficient is included in a subblock in a current transform block to be encoded, it means that a coefficient to be encoded is included and thus coded_sub_blk_flag, which is subblock information, is not encoded. It is checked whether the skip region information or the additional skip region information is true, and at the same time, whether the subblock to be currently encoded includes the skip region or the additional skip region (S1001). If the above two conditions are true, coefficients located in the current subblock and located outside the skip region in the encoding order are selected (S1002). If not, all coefficients to be coded are selected regardless of the skip region (S1003). Thereafter, the coefficients are encoded in the order of nonzero coefficient information encoding (S1004), N excess coefficient information encoding (S1005), code information encoding (S1006), and residual coefficient information encoding (S1007).
  • next subblock exists (S1008)
  • the control moves to the next subblock (S1009). It is checked whether the skip region information or the additional skip region information is true, and at the same time, whether the subblock to be currently encoded includes the skip region or the additional skip region (S1010). Go to. However, this case can be used only when the values of the coefficients in the skipped region are zero. If the values of the coefficients in the skipped region are not 0, the corresponding subblock information should be encoded.
  • step S1011 If the subblock does not include the skip region or the additional skip region, or if the skip region information is false (S1011), if the sub block information is true (S1012), the process moves to step S1001, and if it is false, Move to S1008. If it is determined after the move to step S1008 that the next subblock does not exist, the algorithm of FIG. 10 ends.
  • the scan method assumes a diagonal reverse scan order, and sets the first nonzero coefficient as a reference coefficient. After setting the coefficients in the lower left direction and the coefficients below the reference region to the skip region based on the reference coefficients, the values of the skip regions are all checked. Since the coefficients of the skipped region all have the same value as 0, the skipped region information is encoded as true. After dividing by the sub-block unit, the sub block including the reference coefficient is encoded.
  • the current transform block is 8x8 and the subblock is 4x4.
  • skip region information of a subblock to be encoded is true, and there are coefficients to be encoded in the subblock. Since only coefficients outside the skipped region are encoded, in the example shown in FIG. 7, only the reference coefficient and 1, 0, 0, -2 existing thereon need to be encoded. In this case, the nonzero coefficient information becomes true, false, false, and true, respectively. Assuming that N is 2, only one information is encoded in only coefficients determined to be non-zero. More than one information of the coefficient values 1 and -2 is set to false and true, respectively.
  • More than 2 information is encoded only if the more than 1 information is true, and more than 2 information of the coefficient value -2 is encoded as false. Thereafter, + and-which are signs of coefficient values 1 and -2 are encoded, respectively. Thereafter, since the next subblock exists, it moves to the next subblock.
  • the skip region information is true, and since the coefficient to be encoded exists in the corresponding subblock, the subblock information is true. Therefore, only coefficients 0, 0, and 1 outside the skipped region are encoded.
  • the non-zero coefficient information of the coefficients 0, 0, and 1 is false, false, and true, respectively, and then only one piece of information of coefficient 1 is falsely encoded.
  • the sign information of the coefficient 1 is encoded by + and moves to the next subblock.
  • the subblock information is true because the skip region information is true and there are coefficients to be encoded in the corresponding subblock. Sorting the coefficients outside the skip region by reverse scan results in 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, -2, -2, 1, -3, 3, 10. These coefficients are encoded using steps S1004 to S1007.
  • FIG. 11 is a flowchart illustrating a method of decoding an image using a skip region according to an embodiment of the present invention.
  • the decoding method of FIG. 11 may be performed by the entropy encoder 201 of the image decoding apparatus 100.
  • the entropy decoding unit 201 decodes a position of a reference coefficient in a current transform block to be decoded (S1101). Thereafter, the skip region information for the selected skip region is decoded based on the position of the reference coefficient (S1103). As described above, the position of the reference coefficient can be derived by decoding Last_sig. Since the skip region and the skip region information are the same as described above, a detailed description thereof will be omitted. In addition, although not separately illustrated in FIG. 11, if there is an additional skip region additionally set in addition to the skip region, the additional skip region may be decoded using additional skip region information.
  • FIG. 12 is a flowchart illustrating a method of decoding a transform block including a skip region or an additional skip region according to an embodiment of the present invention.
  • the method shown in FIG. 12 may be performed after the method shown in FIG.
  • the decoding method of FIG. 12 may be performed by the entropy decoding unit 201 of the image decoding apparatus 200.
  • FIGS. 11 and 12 are further described using the example of FIG. 7.
  • the reference coefficient is set.
  • the skip area is set based on the position of the reference coefficient, and the skip area information is decoded. In this example, the skip region information is true.
  • the first block is decoded from the subblock including the reference coefficient.
  • the current transform block is 8x8 and the subblock is 4x4.
  • the skip region information is true, and there are coefficients to be decoded in the corresponding subblock. Since only coefficients outside the skipped region are decoded, only the reference coefficient and 1, 0, 0, and -2 present in the case illustrated in FIG. 7 need to be decoded. In this case, the decoded values of the nonzero coefficient information become true, false, false, and true, respectively. Assuming that N is 2, only one piece of information is decoded only in coefficients determined to be non-zero. More than one information of the coefficient values 1 and -2 is decoded as false and true, respectively.
  • More than 2 information is decoded only if the more than 1 information is true, and more than 2 information of the coefficient value -2 is decoded false. Thereafter, + and-which are the signs of the coefficient values 1 and -2 are respectively decoded. Thereafter, since the next subblock exists, it moves to the next subblock.
  • the skip region information is true, and since the coefficient to be decoded exists in the corresponding subblock, the subblock information is true. Therefore, only 0, 0, and 1 coefficients outside the skip region are decoded.
  • the non-zero coefficient information of the coefficients 0, 0, and 1 is decoded false, false, and true, respectively, and then only one time information of coefficient 1 is decoded false.
  • the sign information of the coefficient 1 is decoded to + and moved to the next subblock.
  • Context-adaptive binarization arithmetic refers to a process of symbolizing encoded information in a block and applying and encoding the occurrence probability of symbols differently using probability information according to a situation.
  • N symbols N is a natural number of 2 or more may be used.
  • Probability information refers to the probability of occurrence of 0 and 1 in the binarized information.
  • the occurrence probability of the two pieces of information may be the same or different depending on the previously restored information. It may have N probability information according to the information.
  • Probability initialization is a process of dividing the probability section by the probability set in the probability information.
  • the same condition may be used by a predetermined rule in the encoding apparatus or the decoding apparatus, or the probability information may be separately encoded.
  • the initial probability interval may be determined in the same manner in the encoding / decoding process according to a preset rule. Alternatively, the initial probability interval may be newly encoded.
  • the binarized information of the current coding parameter is encoded using the probability interval state up to the step before the step S1302 and the previous probability information of the same coding parameter (S1303).
  • the probability information and the probability interval are updated (S1304) for the binary information to be encoded later (S1305), if the coding parameter information to be encoded next (S1305) moves to the next coding parameter information (S1306), the above-described process is performed. Repeat. If there is no coding parameter information to be encoded next, the flowchart ends.
  • the decoding apparatus decodes binary information of a coding parameter using probability information and an interval (S1402), and then determines binary information of a current coding parameter (S1403).
  • S1402 probability information and an interval
  • S1403 binary information of a current coding parameter
  • encoding or decoding may be performed by selectively using optimal probability information among N pieces of probability information preset by using information reconstructed around each coding parameter.
  • the probability information of the information belonging to the quantized transform block may use probability information having a high probability of generating information according to the size of the transform block.
  • the probability information may be differently applied according to the information of the neighboring coefficients of the coefficient to be currently encoded or decoded, and the probability information of the information currently encoded or decoded may be selected using the probability information of the previously encoded or decoded information.
  • 15A to 15C are diagrams illustrating an example in which probability information is differently applied according to information of neighboring coefficients.
  • 15B is an example of a probability information table used for encoding or decoding a Sig_coeff_flag information value of a current coefficient.
  • the probability of symbol 1 which is the Sig_coeff_flag binary information of the current coefficient 1501
  • the probability of symbol 0 is 39%.
  • the index is assigned to the current coefficient 1501, and the symbol that is the Sig_coeff_flag binary information of the current coefficient 1501 at this time.
  • the probability of 1 is 71% and the probability of symbol 0 is 29%.
  • the index is assigned to the current coefficient 1501 and the probability of symbol 1, which is the Sig_coeff_flag binary information of the current coefficient 1501, is 87.
  • the probability of% and symbol 0 is 13%.
  • probability information having a higher probability of generating non-zero coefficient information may be used closer to the low frequency region.
  • the probability information of the N excess coefficient information is set by using the probability information of the N excess coefficient information previously encoded / decoded, or the N excess coefficient information first encoded / decoded in units of sub blocks. Can be used as is.
  • the subblock information may use neighboring coded / decoded M subblock probability information or use probability information of the immediately encoded / decoded subblock.
  • FIGS. 16A to 16C illustrate various embodiments of dividing a transform block of a frequency domain into a plurality of regions.
  • a transform block may be divided into three regions, a frequency A region 1601, 1604, and 1607, a frequency B region 1602, 1605, and 1608, and a frequency C region 1603, 1606, and 1609. have.
  • Each region may be adaptively determined according to the scan direction of the transform block.
  • FIG. 16A illustrates a diagonal direction
  • FIG. 16B illustrates a scan direction in a horizontal direction
  • FIG. 16C illustrates a scan direction in a vertical direction. This is an example of a frequency domain classification method when.
  • the frequency A regions 1601, 1604, and 1607 are low frequency regions with the highest probability of generating coefficient coefficient information other than zero, and the frequency B regions 1602, 1605, and 1608 have zero values than the A regions 1601, 1604, and 1607. Less non-coefficient information occurs, and the frequency C regions 1603, 1606, and 1609 are high frequency regions, and the non-zero coefficient information is less than that of the A regions 1601, 1604, and 1607, and the B regions 1602, 1605, and 1608. Probability information may be set differently for each region by using the generated region.
  • the frequency A regions 1601, 1604, 1607, the frequency B regions 1602, 1605, and 1608 and the frequency C regions 1603, 1606, and 1609 are divided according to the distance from the DC coefficient located in the upper left corner of the transform block. You can see.
  • the current coefficient to be encoded or decoded belongs to the area A (1601, 1604, 1607)
  • the current coefficient is assigned an index 8
  • the probability of symbol 1 is 61%
  • the symbol 0 is The probability is 39%.
  • an index 5 is assigned to the current coefficient
  • the probability of symbol 1 is 71%
  • the probability of symbol 0 is 29%.
  • index 2 is assigned to the current coefficient
  • the probability of symbol 1 is 87%
  • the probability of symbol 0 is 13%.
  • Probability information of non-zero coefficient information, N excess coefficient information, and sub-block information may use probability information having a higher probability of occurrence as the region A (1601, 1604, 1607) becomes closer. Probability information can be selected by referring to non-zero coefficient information.
  • the frequency domain segmentation may be split under the same condition in the encoding / decoding apparatus, or may be transmitted by encoding separate segmentation information to the decoding apparatus.
  • binarized information is derived by binarizing a value of a transform coefficient to be encoded (S1701).
  • Probability information to be applied to the encoding of the binarized information is determined according to the position of the transform coefficient in the transform block (S1703). Referring to the example illustrated in FIG. 16A, probability information to be applied is determined according to which region of the frequency A region 1601, the frequency B region 1602, or the frequency C region 1603 is included.
  • the frequency A region 1601, the frequency B region 1602, and the frequency C region 1603 may be classified according to distances from the DC coefficients located at the upper left corner of the transform block.
  • FIG. 18 is a flowchart illustrating an arithmetic decoding method according to an embodiment of the present invention.
  • arithmetic encoded transform coefficient values are extracted from the bitstream (S1801).
  • Probability information to be applied to decoding the arithmetic-coded transform coefficient is determined according to the position of the transform coefficient in the transform block (S1803). As described above, referring to the example illustrated in FIG. 16A, the probability information to be applied depends on which of the frequency A region 1601, the frequency B region 1602, or the frequency C region 1603 is included in the decoding. Can be determined.
  • the frequency A region 1601, the frequency B region 1602, and the frequency C region 1603 may be classified according to distances from the DC coefficients located at the upper left corner of the transform block.
  • Arithmetic encoding and arithmetic decoding according to another embodiment of the present invention will be described with reference to FIGS. 19A to 19C and 20.
  • the current information is encoded or decoded according to whether the skip region is used or not.
  • different probability information is used.
  • the probability information table shown in FIG. 19B or 19C is used for encoding or decoding the coefficient current coefficient 1901 shown in FIG. 19A.
  • the probability information table shown in FIG. 19B is a probability information table to be applied when a skip region is not used
  • the probability information table shown in FIG. 19C is a probability information table applied when a skip region is used.
  • the probability information table illustrated in FIG. 19C is applied to encode or decode the current coefficient 1901.
  • index 5 is assigned to the current coefficient 1901.
  • the probability of symbol 1 is 71% and the probability of symbol 0 is 29%.
  • probability information may be applied differently according to the number of N excess coefficients in the peripheral coefficients.
  • Non-zero coefficient information and N excess coefficient information may use probability information having a high probability of occurrence according to the number of encoded / decoded information and the position of the frequency domain, and the coefficients located in the frequency C region and the skip region.
  • Probability information having a low probability of generating non-zero coefficient information, N excess coefficient information, and subblock information may be applied.
  • FIGS. 19A to 19C are flowchart illustrating an arithmetic encoding or decoding method according to another embodiment of the present invention. As described above with reference to FIGS. 19A to 19C, different probability information is used when encoding or decoding current information according to a case where a skip region is used and a case where the skip region is not used.
  • a position of a reference coefficient in a current transform block to be encoded or decoded is encoded or decoded (S2001).
  • skip region information for the skip region selected based on the position of the reference coefficient is encoded or decoded (S2003).
  • a probability information table to be applied to encoding the binarized information is selected from a plurality of probability information tables (S2005).
  • the plurality of probability information tables includes at least two tables for a case where a skip region is used and a table for a case where the skip region is not used.
  • Context-adaptive binarization arithmetic refers to a process of symbolizing encoded information in a block and applying and encoding the occurrence probability of symbols differently using probability information according to a situation.
  • Context-adaptive binarization arithmetic refers to a process of symbolizing encoded information in a block and applying and encoding the occurrence probability of symbols differently using probability information according to a situation.
  • N symbols N is a natural number of 2 or more
  • Probability information refers to the probability of occurrence of 0 and 1 in the binarized information.
  • the occurrence probability of the two pieces of information may be the same or different depending on the previously restored information. It may have N probability information according to the information.
  • probability initialization is a process of dividing the probability section by the probability set in the probability information.
  • Probability initialization is a process of dividing the probability section by the probability set in the probability information.
  • the same condition may be used by a predetermined rule in the encoding apparatus or the decoding apparatus, or the probability information may be separately encoded.
  • the initial probability interval may be determined in the same manner in the encoding / decoding process according to a preset rule. Alternatively, the initial probability interval may be newly encoded.
  • the binarized information of the current coding parameter is encoded using the probability interval state up to the previous step of step S2102 of FIG. 21 and previous probability information of the same coding parameter. (S2103). Probability information and a probability section may be updated (S2104) for binary information to be encoded later.
  • the coding parameter information to be encoded next exists (S2105), the process moves to the next coding parameter information (S2106), and the above-described process is repeated. If there is no coding parameter information to be encoded next, the flowchart ends.
  • FIG. 22 is a flowchart illustrating a context-adaptive binarization arithmetic decoding method. Unlike the encoding apparatus, the decoding apparatus decodes binary information of a coding parameter using probability information and an interval (S2202), and then determines binary information of the current coding parameter (S2203). In addition, since the decoding method of FIG. 22 corresponds to the encoding method of FIG. 21, detailed description thereof will be omitted.
  • steps S2103 and S2202 of FIGS. 21 and 22 described above among the N pieces of probability information preset by using information (or coding parameters) already reconstructed around each coding parameter, encoding or using optimal probability information is selectively used. Decoding may proceed.
  • the probability information of the information (or coding parameter) belonging to the quantized transform block may use probability information having a high probability of generating information according to the size of the transform block.
  • the probability information may be differently applied according to the information of the neighboring coefficients of the coefficient to be currently encoded or decoded, and the probability information of the information currently encoded or decoded may be selected using the probability information of the previously encoded or decoded information.
  • 23A and 23B illustrate an example in which probability information is differently applied according to information of neighboring coefficients.
  • 23A is an example of a probability information table used for encoding or decoding a Sig_coeff_flag information value of a current coefficient. If the number of coefficients having the same information value as the Sig_coeff_flag information value of the current coefficient among the coefficients adjacent to the coefficient to be encoded or decoded is one, the index 8 is assigned to the current coefficient. In this case, the probability of symbol 1, which is Sig_coeff_flag binary information of the current coefficient, is 61%, and the probability of symbol 0 is 39%.
  • index 5 is assigned to the current coefficient, and the probability of symbol 1, which is Sig_coeff_flag binary information of the current coefficient, is 71% and symbol 0 The probability of is 29%. If there are three neighboring coefficients with the same information value as the Sig_coeff_flag information value of the current coefficient, index 2 is assigned to the current coefficient, and the probability of symbol 1, which is Sig_coeff_flag binary information of the current coefficient, is 87%, and symbol 0 is 13%. Becomes
  • the probability information may be updated as shown in FIG. 23B.
  • non-zero coefficient information Sig_coeff_flag probability information having a higher probability of generating non-zero coefficient information Sig_coeff_flag may be used as it is closer to the low frequency region.
  • the probability information of the current N excess coefficient information is set using the probability information of the N excess coefficient information encoded / decoded immediately before, or the N excess that is first encoded / decoded in units of subblocks. Probability information of coefficient information may be used as it is.
  • the N excess coefficient information may include Abs_greater1_flag, Abs_greater2_flag, Abs_greater3_flag, and the like.
  • the sub block information Coded_sub_blk_flag may use probability information of neighboring coded / decoded M subblocks or use probability information of a previously encoded / decoded subblock.
  • FIG. 24 is a flowchart illustrating a method of determining probability information of each coding parameter according to a reference coefficient position and encoding the information of each coding parameter using the same according to an embodiment of the present invention.
  • the flowchart of FIG. 24 may be performed by the entropy encoder 107 of the image encoding apparatus 100.
  • the entropy encoder 107 encodes a position of a reference coefficient in a current transform block to be encoded (S2401).
  • the reference coefficient position may be encoded by reference coefficient position information Last_sig.
  • the reference coefficient may mean the first non-zero coefficient when scanning coefficients in an inverse scan order, but the reference coefficient may be applied to other conditions that are equally set in the image encoding apparatus 100 and the image decoding apparatus 200. It can also be determined by.
  • probability information of each coding parameter is derived based on the position of the reference coefficient, and the corresponding coding parameter is encoded (S2402).
  • the method of setting the probability table according to the position of the reference coefficient refers to the drawing example of FIG. 25.
  • the A region 2500 refers to an arbitrary region close to the DC coefficient in the transform block
  • the B region 2501 refers to a region other than the A region 2500 in the transform block. It is also possible to divide the transform block into N or more regions.
  • arbitrary region information indicating the region A may be transmitted from an upper header, or may be determined under the same condition according to the transform block type in the image encoding apparatus 100 and the image decoding apparatus 200.
  • the probability information of the coding parameters may be differently derived and the probability information of the coding parameters may be updated in a single probability table according to whether the location of the reference coefficient exists in the A region 2500 or the B region 2501. have.
  • the probability information of the coding parameters may be updated by using two or more different initial probability tables or the same initial probability table independently according to whether the position of the reference coefficient exists in the A region or the B region.
  • the reference coefficient of the transform block exists in the region A 2500.
  • the probability information of the Sig_coeff_flag information may be independently updated using the (2601) table of FIG. 26A.
  • the probability table 2260 of FIG. 26B is a result of updating the probability information by determining probability table index information according to the reference coefficient position as 5 in the initial probability table 2260 of FIG. 26A, and the probability table of 2260 of FIG. 26B.
  • the probability table index information according to the reference coefficient position is determined as 8 in the initial probability table (2601) of FIG. 26A, and the probability information is updated.
  • the probability information of the Abs_greater1_flag information indicating whether the absolute value of the coefficient in the transform block is greater than 1 is selected as the probability information having the high probability that the Abs_greater1_flag information is 1 when the reference coefficient is in the A region.
  • the probability information having a high probability that Abs_greater1_flag information is 0 may be selected and encoded.
  • the index information may be determined according to the detailed coordinates of the reference coefficient.
  • index information of the probability table according to the reference coefficient position in the initial probability table of 2600 of FIG. 26A. May be determined as 5.
  • the probability information of the index information 5 may be updated.
  • the index information of the probability table according to the reference coefficient position is 8 in the initial probability table of 2601 of FIG. 26A. Can be determined.
  • the probability information of the index information 8 may be updated as in the probability table of FIG. 26B.
  • 27 is a flowchart illustrating a method of determining probability information of each coding parameter according to a reference coefficient position and decoding the information of each coding parameter using the same according to an embodiment of the present invention.
  • the decoding method of FIG. 27 may be performed by the entropy decoding unit 201 of the image decoding apparatus 200.
  • the entropy decoding unit 201 decodes the position of the reference coefficient in the current transform block to be decoded (S2701).
  • the reference coefficient refers to the first non-zero coefficient when scanning the coefficients in reverse scan order.
  • probability information of each coding parameter is derived based on the position of the reference coefficient and the corresponding parameter information is decoded (S2702).
  • FIG. 28 is a flowchart illustrating a method of deriving and encoding probability information of each coding parameter according to partial information of a DC coefficient according to an embodiment of the present invention.
  • the encoding method of FIG. 28 may be performed by the entropy encoder 107 of the image encoding apparatus 100.
  • partial information of a DC coefficient may be encoded (S2801), and probability information of each coding parameter may be derived based on the partial information of DC, and corresponding parameter information may be encoded (S2802).
  • the DC coefficient may be a coefficient located at the top left of the transform block or may be a non-zero coefficient (non-zero coefficient) that comes last in an inverse scan order.
  • the partial information of the DC coefficient means some partial information necessary for encoding and decoding the DC coefficient.
  • the partial information of the DC coefficient may mean at least one of Sig_coeff_flag information and Abs_greater1_flag information of the DC coefficient.
  • the probability information of the coding parameters except for the partial information of the DC coefficients may be differently derived in the single probability table, and the probability information of the coding parameters may be updated.
  • the probability information of the coding parameters may be updated using two or more different initial probability tables or the same initial probability table independently based on the partial information of the DC coefficients.
  • Sig_coeff_flag information indicating whether each coefficient in the transform block is 0
  • two independent initial probability tables are independently encoded and only partial information of DC coefficients may use Sig_coeff_flag information.
  • the partial information of the DC coefficient is 0, the (2600) table of FIG. 26A is used, and when the DC information is 1, the probability information of the Sig_coeff_flag information is independently updated by using the (2601) table of FIG. 26A. Can be.
  • the probability information of the Abs_greater1_flag information indicating whether the absolute value of the coefficient in the transform block is greater than 1 is the probability information that the Abs_greater1_flag information has a high probability of 1 when Sig_coeff_flag, which is a partial information of the DC coefficient, is 1;
  • Sig_coeff_flag which is partial information of the DC coefficient is 0, probability information having a high probability that Abs_greater1_flag information is 0 may be selected and encoded.
  • the index information may be determined according to the partial information of the DC coefficient.
  • index information of the initial probability table of 2600 of FIG. 26A may be determined as 5.
  • Probability information of index information 5 may be updated as in the probability table 2260 of FIG. 26B.
  • index information of the initial probability table of 2601 of FIG. 26A may be determined as 8.
  • Probability information of index information 8 may be updated as in the probability table of FIG. 26B.
  • 29 is a flowchart illustrating a method of encoding transform block coefficients using partial information of DC coefficients.
  • partial information of the DC coefficient is encoded (S2902).
  • the position encoding process of the DC coefficient may be omitted. If not, the position of the DC coefficient is encoded (S2903). If reference coefficients are included in the subblocks in the transform block, it means that the coefficients to be encoded are included, so coded_sub_blk_flag, which is subblock information, is not encoded.
  • the coefficients are encoded in the order of nonzero coefficient information encoding (S2906), N excess coefficient information encoding (S2907), code information encoding (S2908), and residual coefficient information encoding (S2909).
  • the steps used for the DC coefficient partial information during the DC coefficient encoding in steps S2906 to S2909 may be omitted.
  • FIG. 30 is a flowchart illustrating a method of deriving and decoding probability information of each coding parameter according to partial information of a DC coefficient according to an embodiment of the present invention.
  • the decoding method of FIG. 30 may be performed by the entropy decoding unit 201 of the image decoding apparatus 200.
  • the entropy decoding unit 201 decodes partial information of a DC coefficient (S3001), and then derives probability information of each coding parameter based on the partial information of the DC coefficient and decodes corresponding parameter information. (S3002).
  • 31 is a flowchart illustrating a method of decoding transform block coefficients using partial information of DC coefficients.
  • the partial information of the DC coefficient is decoded (S3102).
  • the position decoding process of the DC coefficient may be omitted. If not, the position of the DC coefficient is decoded (S3103). If the reference coefficient is included in the subblock in the transform block, it means that the coefficient to be decoded is included. Therefore, Coded_sub_blk_flag, which is subblock information, is not decoded. Thereafter, non-zero coefficient information decoding (S3106), N excess coefficient information decoding (S3107), code information decoding (S3108), and residual coefficient information decoding (S3109) are performed in this order. However, since the partial information of the DC coefficient has already been decoded, the steps used for the DC coefficient partial information during the DC coefficient decoding in steps S3106 to S3109 may be omitted.
  • next subblock exists (S3111)
  • the process moves to the next subblock (S3112), and the information is decoded in order from (S3106) to (S3109), and when the next subblock does not exist, the algorithm ends. do.
  • FIG. 32 is a flowchart illustrating a method of deriving and encoding probability information of each coding parameter according to a distance between a DC coefficient and a reference coefficient and partial information of the DC coefficient according to an embodiment of the present invention.
  • the encoding method of FIG. 32 may be performed by the entropy encoder 107 of the image encoding apparatus 100.
  • the entropy encoder 107 encodes the position of the reference coefficient of the current transform block (S3201).
  • the reference coefficient may mean the first non-zero coefficient when scanning coefficients in an inverse scan order, but the reference coefficient may be applied to other conditions that are equally set in the image encoding apparatus 100 and the image decoding apparatus 200. It can also be determined by.
  • the probability information of the coding parameters is derived based on the distance between the DC coefficient and the reference coefficient and the partial information of the DC coefficient, and the corresponding parameter information is encoded (S3202).
  • the DC coefficient may be a coefficient coefficient located at the top left of the transform block or may be a non-zero coefficient (non-zero coefficient) that comes last in an inverse scan order.
  • the partial information of the DC coefficient means some partial information necessary for encoding and decoding the DC coefficient.
  • the partial information of the DC coefficient may mean at least one of Sig_coeff_flag information and Abs_greater1_flag information of the DC coefficient.
  • the probability information of the coding parameters except the partial information of the DC coefficient may be differently derived in the single probability table, and the probability information of the coding parameters may be updated.
  • two or more different initial probability tables or the same initial probability table may be independently used to update probability information of the coding parameters.
  • the distance information may be determined or the distance information may be encoded in the same manner according to a predetermined rule in the encoding / decoding apparatus.
  • Sig_coeff_flag information indicating whether each coefficient in the transform block is 0 or not
  • three independent initial probability tables are independently encoded and only partial information of DC coefficients may use Sig_coeff_flag information. If the distance information of the DC coefficient and the reference coefficient is greater than a predetermined threshold value, the table 3300 of FIG. 33 is used. If the distance between the DC coefficient and the reference coefficient is smaller than the predetermined threshold value, FIG. 33. Use the (3301) or (3302) table of.
  • the predetermined threshold may be a value preset in the encoding / decoding apparatus or a value based on information determined by the encoding apparatus and transmitted to the decoding apparatus.
  • which probability table to use (3301) or (3302) may be determined based on the partial information of the DC coefficient. For example, if Sig_coeff_flag information, which is partial information of the DC coefficient, is 1, the probability information may be determined using the table 3301 of FIG. 33 and using the table 3302 of FIG.
  • the index information is determined based on the distance information between the DC coefficient and the reference coefficient, and then the index information determined based on the partial information of the DC coefficient is corrected. Can be.
  • FIG. 34 is a flowchart illustrating a method of deriving and decoding probability information of each coding parameter according to a distance between a DC coefficient and a reference coefficient and partial information of the DC coefficient according to an embodiment of the present invention.
  • the decoding method of FIG. 34 may be performed by the entropy decoding unit 201 of the image decoding apparatus 200.
  • the entropy decoding unit 201 decodes the position of the reference coefficient of the current transform block and the partial information of the DC coefficient (S3401).
  • the reference coefficient may mean the first non-zero coefficient when scanning the coefficients in the reverse scanning order, but the reference coefficient may be applied to other conditions that are identically set in the image encoding apparatus 100 and the image decoding apparatus 200. It can also be determined by.
  • the probability information of the coding parameters is derived based on the distance between the DC coefficient and the reference coefficient and the partial information of the DC coefficient, and the corresponding parameter information is decoded (S3402).
  • the encoding / decoding algorithms of the image encoding apparatus 100 and the image decoding apparatus 200 may be the same as those of FIGS. 29 and 31.
  • Exemplary methods of the present disclosure are represented as a series of operations for clarity of description, but are not intended to limit the order in which the steps are performed, and each step may be performed simultaneously or in a different order as necessary.
  • the illustrated step may further include other steps, may include other steps except some, or may include additional other steps except some.
  • various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof.
  • one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), General Purpose It may be implemented by a general processor, a controller, a microcontroller, a microprocessor, and the like.
  • scope of the disclosure include software or machine-executable instructions (eg, an operating system, an application, firmware, a program, etc.) to cause an operation in accordance with various embodiments of the method to be executed on an apparatus or a computer, and such software or Instructions, and the like, including non-transitory computer-readable media that are stored and executable on a device or computer.
  • software or machine-executable instructions eg, an operating system, an application, firmware, a program, etc.
  • the present invention can be used in an apparatus for encoding / decoding an image.

Landscapes

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

Abstract

The present invention relates to a method and device for encoding/decoding an image, and a method or device for encoding an image according to an embodiment of the present invention can encode the position of a reference coefficient in a current conversion block to be encoded, and encode skip region information about a skip region selected on the basis of the position of the reference coefficient. The skip region information can indicate whether coefficients in the skip region have the same coefficient value.

Description

영상의 부호화/복호화 방법 및 장치Method and apparatus for encoding / decoding video
본 발명은 영상 신호 부호화/복호화 방법 및 장치에 관한 것으로서, 보다 구체적으로는 엔트로피 부호화 및 복호화에 관한 것이다.The present invention relates to a method and apparatus for encoding / decoding video signals, and more particularly, to entropy encoding and decoding.
최근, 인터넷에서는 동영상과 같은 멀티미디어 데이터의 수요가 급격히 증가하고 있다. 하지만 채널(Channel)의 대역폭(Bandwidth)이 발전하는 속도는, 급격히 증가하고 있는 멀티미디어 데이터의 양을 따라가기 힘든 상황이다. 이러한 상황을 고려하여, 국제 표준화 기구인 ITU-T의 VCEG(Video Coding Expert Group)과 ISO/IEC의 MPEG(Moving Picture Expert Group)은 2014년 2월, 동영상 압축 표준인 HEVC(High Efficiency Video Coding) 버전 1을 제정하였다.Recently, the demand for multimedia data such as moving pictures is rapidly increasing on the Internet. However, the speed at which the bandwidth of a channel develops is difficult to keep up with the rapidly increasing amount of multimedia data. Given this situation, the International Standardization Organization's Video Coding Expert Group (VCEG) and ISO / IEC's Moving Picture Expert Group (MPEG) launched the video compression standard HEVC (High Efficiency Video Coding) in February 2014. Version 1 was enacted.
HEVC에서는 화면 내 예측, 화면 간 예측, 변환, 양자화, 엔트로피 부호화 및 인-루프 필터와 같은 다양한 기술을 가지고 있다. 엔트로피 부호화의 입력이 되는 정보들은 다양한 방법을 이용하여 생성된다. 부호화 또는 복호화할 입력 영상 또는 단위 블록의 크기가 커지면서, 엔트로피 부호화할 데이터가 급격하게 증가할 수 있다.HEVC has a variety of technologies such as intra picture prediction, inter picture prediction, transform, quantization, entropy coding, and in-loop filters. Information that is input of entropy encoding is generated using various methods. As the size of an input image or a unit block to be encoded or decoded is increased, data to be entropy-encoded may rapidly increase.
전술한 문제점을 해결하기 위하여, 본 발명은 보다 효율적인 엔트로피 부호화 및 복호화 기술을 제공하는 것에 주된 목적이 있다.In order to solve the above problems, the present invention has a main object to provide a more efficient entropy encoding and decoding technique.
또한, 본 발명은, 스킵 영역을 이용하여 엔트로피 부호화 또는 복호화함으로써 부호화할 데이터의 양을 감소시키는 것에 주된 목적이 있다.In addition, the present invention has a main object to reduce the amount of data to be encoded by entropy encoding or decoding using a skip region.
또한, 본 발명은, 문맥 적응적 산술 부호화 및 복호화 시 각 심볼의 부호화 또는 복호화에 적용되는 확률 정보를 효과적으로 선택함으로써 산술 부호화 및 산술 복호화 성능을 향상시키는 것에 주된 목적이 있다.In addition, the present invention has a main object to improve arithmetic coding and arithmetic decoding performance by effectively selecting probability information applied to encoding or decoding each symbol during context-adaptive arithmetic coding and decoding.
본 발명의 일 실시예에 따른 영상의 부호화 방법 또는 부호화 장치는, 부호화할 현재 변환 블록 내의 기준 계수의 위치를 부호화하고, 상기 기준 계수의 위치에 기초하여 선택된 스킵 영역에 대한 스킵 영역 정보를 부호화할 수 있다. An image encoding method or encoding apparatus according to an embodiment of the present invention encodes a position of a reference coefficient in a current transform block to be encoded and encodes skip region information on a skipped region selected based on the position of the reference coefficient. Can be.
상기 스킵 영역 정보는 상기 스킵 영역 내의 계수들이 동일한 계수 값을 가지는지 여부를 나타낼 수 있다.The skip region information may indicate whether the coefficients in the skip region have the same coefficient value.
본 발명의 다른 실시예에 따른 영상의 부호화 방법 또는 부호화 장치는, 변환 계수의 값을 이진화하여 이진화된 정보를 얻고, 변환 블록 내에서의 상기 변환 계수의 위치에 따라, 상기 이진화된 정보의 부호화에 적용될 확률 정보를 결정할 수 있다.A video encoding method or encoding apparatus according to another embodiment of the present invention obtains binarized information by binarizing a value of a transform coefficient, and encodes the binarized information according to a position of the transform coefficient in a transform block. Probability information to be applied can be determined.
상기 이진화된 정보의 부호화에 적용될 확률 정보는, 복수의 영역으로 구분되는 변환 블록 내에서 상기 변환 계수가 어느 영역에 위치하는지에 따라 결정될 수 있다.The probability information to be applied to the encoding of the binarized information may be determined according to which region the transform coefficient is located in a transform block divided into a plurality of regions.
본 발명의 또 다른 실시예에 따른 영상의 부호화 방법 또는 부호화 장치는, 부호화할 현재 변환 블록 내의 기준 계수의 위치를 부호화하고, 상기 기준 계수의 위치에 기초하여 선택된 스킵 영역에 대한 스킵 영역 정보를 부호화하고, 상기 스킵 영역에 포함되지 않은 변환 계수의 값을 이진화하여 이진화된 정보를 얻고, 복수의 확률 정보 테이블들 중에서, 상기 이진화된 정보의 부호화에 적용할 확률 정보 테이블을 선택할 수 있다.An image encoding method or encoding apparatus according to another embodiment of the present invention encodes a position of a reference coefficient in a current transform block to be encoded and encodes skip region information on a skipped region selected based on the position of the reference coefficient. In addition, binarized information may be obtained by binarizing a value of a transform coefficient not included in the skip region, and a probability information table to be applied to encoding the binarized information may be selected from a plurality of probability information tables.
상기 이진화된 정보의 부호화에 적용할 확률 정보 테이블은, 상기 현재 변환 블록의 부호화에 상기 스킵 영역이 사용되는지 여부에 따라 선택될 수 있다.The probability information table to be applied to the encoding of the binarized information may be selected according to whether the skip region is used to encode the current transform block.
본 발명의 일 실시예에 따른 영상의 복호화 방법 또는 복호화 장치는, 복호화할 현재 변환 블록 내의 기준 계수의 위치를 복호화하고, 상기 기준 계수의 위치에 기초하여 선택된 스킵 영역에 대한 스킵 영역 정보를 복호화할 수 있다.An image decoding method or apparatus according to an embodiment of the present invention may decode positions of reference coefficients in a current transform block to be decoded, and decode skip region information on skip regions selected based on the positions of the reference coefficients. Can be.
상기 스킵 영역 정보는 상기 스킵 영역 내의 계수들이 동일한 계수 값을 가지는지 여부를 나타낼 수 있다. The skip region information may indicate whether the coefficients in the skip region have the same coefficient value.
본 발명의 다른 실시예에 따른 영상의 복호화 방법 또는 복호화 장치는, 비트스트림으로부터 산술부호화된 변환 계수의 값을 얻고, 변환 블록 내에서의 상기 변환 계수의 위치에 따라, 상기 산술부호화된 변환 계수의 복호화에 적용할 확률 정보를 결정할 수 있다. An image decoding method or decoding apparatus according to another embodiment of the present invention obtains a value of an arithmetic-coded transform coefficient from a bitstream, and according to a position of the transform coefficient in a transform block, Probability information to be applied to the decoding can be determined.
상기 산술부호화된 변환 계수의 복호화에 적용할 확률 정보는, 복수의 영역으로 구분되는 변환 블록 내에서 상기 변환 계수가 어느 영역에 위치하는지에 따라 결정될 수 있다.Probability information to be applied to the decoding of the arithmetic coded transform coefficients may be determined according to which region the transform coefficient is located in a transform block divided into a plurality of regions.
본 발명의 또 다른 실시예에 따른 영상의 복호화 방법 또는 복호화 장치는, 복호화할 현재 변환 블록 내의 기준 계수의 위치를 복호화하고, 상기 기준 계수의 위치에 기초하여 선택된 스킵 영역에 대한 스킵 영역 정보를 복호화하고, 상기 스킵 영역에 포함되지 않은 변환 계수의 산술부호화된 값을 얻으며, 복수의 확률 정보 테이블들 중에서, 상기 변환 계수의 산술부호화된 값의 복호화에 적용할 확률 정보 테이블을 선택할 수 있다.An image decoding method or decoding apparatus according to another embodiment of the present invention decodes a position of a reference coefficient in a current transform block to be decoded, and decodes skip region information on a skipped region selected based on the position of the reference coefficient. In addition, an arithmetic encoded value of a transform coefficient not included in the skip region may be obtained, and a probability information table may be selected from among a plurality of probability information tables to be applied to decoding an arithmetic encoded value of the transform coefficient.
상기 변환 계수의 산술부호화된 값의 복호화에 적용할 확률 정보 테이블은, 상기 현재 변환 블록의 복호화에 상기 스킵 영역이 사용되는지 여부에 따라 상기 복수의 확률 정보 테이블들 중 하나가 선택될 수 있다.As the probability information table to be applied to the decoding of the arithmetic coded value of the transform coefficient, one of the plurality of probability information tables may be selected depending on whether the skip region is used to decode the current transform block.
본 발명의 일 양상에 따른 영상의 복호화 방법은, 현재 변환 블록 내의 기준 계수의 위치를 복호화하는 단계, 상기 기준 계수의 위치에 기초하여 코딩 파라미터의 확률 정보를 유도하는 단계 및 상기 유도된 확률 정보를 이용하여 상기 코딩 파라미터를 복호화하는 단계를 포함할 수 있다.According to an aspect of the present invention, a method of decoding an image includes decoding a position of a reference coefficient in a current transform block, deriving probability information of a coding parameter based on the position of the reference coefficient, and determining the derived probability information. And decoding the coding parameter by using the same.
상기 영상의 복호화 방법에 있어서, 상기 기준 계수는 상기 현재 변환 블록 내의 계수들의 역 스캔 순서 상 최초의 0이 아닌 계수일 수 있다.In the decoding method of the image, the reference coefficient may be a first non-zero coefficient in an inverse scan order of coefficients in the current transform block.
상기 영상의 복호화 방법에 있어서, 상기 현재 변환 블록은 제1 영역 및 제2 영역으로 분할되고, 상기 코딩 파라미터의 확률 정보는 상기 기준 계수가 어느 영역에 존재하는지에 기초하여 결정될 수 있다. In the decoding method of the image, the current transform block is divided into a first region and a second region, and the probability information of the coding parameter may be determined based on which region the reference coefficient exists.
본 발명의 일 양상에 따른 영상의 복호화 방법은, 현재 변환 블록의 DC 계수의 부분 정보를 복호화하는 단계, 상기 DC 계수의 부분 정보에 기초하여 코딩 파라미터의 확률 정보를 유도하는 단계 및 상기 유도된 확률 정보를 이용하여 상기 코딩 파라미터를 복호화하는 단계를 포함할 수 있다.According to an aspect of the present invention, there is provided a method of decoding an image, the method comprising: decoding partial information of a DC coefficient of a current transform block, deriving probability information of a coding parameter based on the partial information of the DC coefficient, and the derived probability And decoding the coding parameter using the information.
상기 영상의 복호화 방법에 있어서, 상기 DC 계수는 상기 현재 변환 블록의 좌상단에 위치한 계수일 수 있다.In the decoding method of the image, the DC coefficient may be a coefficient located at the upper left of the current transform block.
상기 영상의 복호화 방법에 있어서, 상기 DC 계수의 부분 정보는 상기 DC 계수를 복호화하기 위한 정보 중 적어도 하나의 정보일 수 있다.In the decoding method of the image, the partial information of the DC coefficient may be at least one piece of information for decoding the DC coefficient.
상기 영상의 복호화 방법에 있어서, 상기 현재 변환 블록 내의 기준 계수의 위치를 복호화하는 단계를 더 포함하고, 상기 코딩 파라미터의 확률 정보는 상기 DC 계수와 상기 기준 계수간의 거리 정보 및 상기 DC 계수의 부분 정보에 기초하여 유도될 수 있다.The decoding method of the image, the method further comprising: decoding a position of a reference coefficient in the current transform block, wherein the probability information of the coding parameter includes distance information between the DC coefficient and the reference coefficient and partial information of the DC coefficient. Can be derived based on.
본 발명의 일 양상에 따른 영상의 부호화 방법은, 현재 변환 블록 내의 기준 계수의 위치를 부호화하는 단계 상기 기준 계수의 위치에 기초하여 코딩 파라미터의 확률 정보를 유도하는 단계 및 상기 유도된 확률 정보를 이용하여 상기 코딩 파라미터를 부호화하는 단계를 포함하는 영상의 부호화 방법.According to an aspect of the present invention, there is provided a method of encoding an image, the method comprising: encoding positions of reference coefficients in a current transform block, deriving probability information of coding parameters based on positions of the reference coefficients, and using the derived probability information And encoding the coding parameter.
상기 영상의 부호화 방법에 있어서, 상기 기준 계수는 상기 현재 변환 블록 내의 계수들의 역 스캔 순서 상 최초의 0이 아닌 계수일 수 있다.In the encoding method of the image, the reference coefficient may be a first non-zero coefficient in an inverse scan order of coefficients in the current transform block.
상기 영상의 부호화 방법에 있어서, 상기 현재 변환 블록은 제1 영역 및 제2 영역으로 분할되고, 상기 코딩 파라미터의 확률 정보는 상기 기준 계수가 어느 영역에 존재하는지에 기초하여 결정될 수 있다.In the encoding method of the image, the current transform block is divided into a first region and a second region, and the probability information of the coding parameter may be determined based on which region the reference coefficient exists.
상기 영상의 부호화 방법에 있어서, 현재 변환 블록의 DC 계수의 부분 정보를 부호화하는 단계, 상기 DC 계수의 부분 정보에 기초하여 코딩 파라미터의 확률 정보를 유도하는 단계 및 상기 유도된 확률 정보를 이용하여 상기 코딩 파라미터를 부호화하는 단계를 포함할 수 있다.In the encoding method of the image, Encoding partial information of the DC coefficient of the current transform block, Deriving the probability information of the coding parameter based on the partial information of the DC coefficient and Using the derived probability information Encoding the coding parameter.
상기 영상의 부호화 방법에 있어서, 상기 DC 계수는 상기 현재 변환 블록의 좌상단에 위치한 계수일 수 있다.In the encoding method of the image, the DC coefficient may be a coefficient located at the upper left of the current transform block.
상기 영상의 부호화 방법에 있어서, 상기 DC 계수의 부분 정보는 상기 DC 계수를 부호화하기 위한 정보 중 적어도 하나의 정보일 수 있다.In the encoding method of the image, the partial information of the DC coefficient may be at least one piece of information for encoding the DC coefficient.
상기 영상의 부호화 방법에 있어서, 상기 현재 변환 블록 내의 기준 계수의 위치를 부호화하는 단계를 더 포함하고, 상기 코딩 파라미터의 확률 정보는 상기 DC 계수와 상기 기준 계수간의 거리 정보 및 상기 DC 계수의 부분 정보에 기초하여 유도될 수 있다.The coding method of the image, the method further comprising: encoding a position of a reference coefficient in the current transform block, wherein the probability information of the coding parameter includes distance information between the DC coefficient and the reference coefficient and partial information of the DC coefficient. Can be derived based on.
본 발명에 따르면, 동영상을 부호화한 결과 생성되는 부호화 정보의 양을 줄일 수 있어 부호화 효율을 향상시킬 수 있다. According to the present invention, the amount of encoded information generated as a result of encoding a video can be reduced, thereby improving the encoding efficiency.
또한, 문맥 적응적 산술 부호화 및 복호화 시 각 심볼의 부호화 또는 복호화에 적용되는 확률 정보를 효과적으로 선택함으로써 산술 부호화 및 산술 복호화 성능을 향상시킬 수 있다.In addition, arithmetic coding and arithmetic decoding performance can be improved by effectively selecting probability information applied to encoding or decoding each symbol during context-adaptive arithmetic coding and decoding.
본 개시에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.The effects obtainable in the present disclosure are not limited to the above-mentioned effects, and other effects not mentioned above may be clearly understood by those skilled in the art from the following description. will be.
도 1은 본 발명의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다.1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
도 2는 본 발명의 일 실시예에 따른 영상 복호화 장치를 나타낸 블록도이다. 2 is a block diagram illustrating an image decoding apparatus according to an embodiment of the present invention.
도 3은 본 발명의 일 실시예에 따른, 변환 블록의 부호화 방법을 나타낸 흐름도이다. 3 is a flowchart illustrating a method of encoding a transform block, according to an embodiment of the present invention.
도 4a 내지 4d는 서브 블록 단위로 대각선 방향 역스캔, 수직 방향 역스캔 및 수평 방향 역스캔을 나타내는 도면이다. 4A to 4D are diagrams illustrating a diagonal reverse scan, a vertical reverse scan, and a horizontal reverse scan in sub-block units.
도 5는 본 발명의 일 실시예에 따른, 변환 블록의 복호화 방법을 나타낸 흐름도이다. 5 is a flowchart illustrating a method of decoding a transform block according to an embodiment of the present invention.
도 6은 본 발명의 일 실시 예에 따라, 스킵 영역을 이용한 영상 부호화 방법을 나타내는 순서도이다. 6 is a flowchart illustrating a video encoding method using a skip region according to an embodiment of the present invention.
도 7은 본 발명의 일 실시예에 따른 스킵 영역을 나타내는 도면이다. 7 is a diagram illustrating a skip region according to an embodiment of the present invention.
도 8은 본 발명의 다른 실시예에 따른 스킵 영역을 나타내는 도면이다. 8 is a diagram illustrating a skip region according to another embodiment of the present invention.
도 9는 본 발명의 일 실시예에 따른 추가 스킵 영역을 나타내는 도면이다. 9 is a diagram illustrating an additional skip area according to an embodiment of the present invention.
도 10은 본 발명의 일 실시예에 따라, 스킵 영역 또는 추가 스킵 영역을 포함하는 변환 블록을 부호화하는 방법을 나타내는 순서도이다. 10 is a flowchart illustrating a method of encoding a transform block including a skip region or an additional skip region according to an embodiment of the present invention.
도 11은 본 발명의 일 실시 예에 따라, 스킵 영역을 이용한 영상 복호화 방법을 나타내는 순서도이다. 11 is a flowchart illustrating a method of decoding an image using a skip region according to an embodiment of the present invention.
도 12는 본 발명의 일 실시예에 따라, 스킵 영역 또는 추가 스킵 영역을 포함하는 변환 블록을 복호화하는 방법을 나타내는 순서도이다. 12 is a flowchart illustrating a method of decoding a transform block including a skip region or an additional skip region according to an embodiment of the present invention.
도 13은 본 발명의 일 실시예에 따른 문맥 적응적 이진화 산술 부호화 방법을 나타내는 흐름도이다. 13 is a flowchart illustrating a context-adaptive binarization arithmetic coding method according to an embodiment of the present invention.
도 14는 본 발명의 일 실시예에 따른 문맥 적응적 이진화 산술 복호화 방법을 나타내는 흐름도이다. 14 is a flowchart illustrating a context-adaptive binarization arithmetic decoding method according to an embodiment of the present invention.
도 15a 내지 15c는 주변 계수들의 정보에 따라 확률 정보를 다르게 적용한 일 예를 나타내는 도면이다. 15A to 15C are diagrams illustrating an example in which probability information is differently applied according to information of neighboring coefficients.
도 16a 내지 16c는 주파수 영역의 변환 블록을 복수의 영역으로 분할하는 다양한 실시예들을 나타내는 도면이다. 16A to 16C illustrate various embodiments of dividing a transform block of a frequency domain into a plurality of regions.
도 17은 본 발명의 일 실시예에 따른 산술 부호화 방법을 나타내는 순서도이다. 17 is a flowchart illustrating an arithmetic coding method according to an embodiment of the present invention.
도 18은 본 발명의 일 실시예에 따른 산술 복호화 방법을 나타내는 순서도이다. 18 is a flowchart illustrating an arithmetic decoding method according to an embodiment of the present invention.
도 19a 내지 19c는 본 발명의 다른 실시예에 따른, 산술부호화 및 산술복호화를 설명하기 위한 도면이다. 19A to 19C are diagrams for describing arithmetic encoding and arithmetic decoding according to another embodiment of the present invention.
도 20은 본 발명의 다른 실시예에 따른 산술 부호화 방법 또는 복호화 방법을 나타내는 순서도이다.20 is a flowchart illustrating an arithmetic coding method or a decoding method according to another embodiment of the present invention.
도 21은 본 발명의 일 실시예에 따른 문맥 적응적 이진화 산술 부호화 방법을 나타내는 흐름도이다.21 is a flowchart illustrating a context-adaptive binarization arithmetic coding method according to an embodiment of the present invention.
도 22는 본 발명의 일 실시예에 따른 문맥 적응적 이진화 산술 복호화 방법을 나타내는 흐름도이다.22 is a flowchart illustrating a context-adaptive binarization arithmetic decoding method according to an embodiment of the present invention.
도 23a, 24b는 주변 계수들의 정보에 따라 확률 정보를 다르게 적용한 일 예를 나타내는 도면이다. 23A and 24B illustrate an example in which probability information is differently applied according to information of neighboring coefficients.
도 24는 본 발명의 일 실시예에 따른 기준 계수에 기초하여 확률 정보를 유도하는 방법을 나타내는 부호화 흐름도이다. 24 is a flowchart illustrating a method of deriving probability information based on a reference coefficient according to an embodiment of the present invention.
도 25는 본 발명의 일 실시예에 따른 기준 계수 위치를 나타내는 도면이다. 25 is a diagram illustrating a reference counting position according to an embodiment of the present invention.
도 26a, 26b는 주변 계수들의 정보에 따라 확률 정보를 다르게 적용한 일 예를 나타내는 도면이다. 26A and 26B illustrate an example in which probability information is differently applied according to information of neighboring coefficients.
도 27은 본 발명의 일 실시예에 따른 기준 계수에 기초하여 확률 정보를 유도하는 방법을 나타내는 복호화 흐름도이다.27 is a decoding flowchart illustrating a method of deriving probability information based on a reference coefficient according to an embodiment of the present invention.
도 28은 본 발명의 일 실시예에 따른 DC의 부분정보에 기초하여 확률 정보를 유도하는 방법을 나타내는 부호화 흐름도이다.28 is a flowchart illustrating a method of deriving probability information based on partial information of DC according to an embodiment of the present invention.
도 29는 DC 계수의 부분 정보를 이용하여 변환 블록 계수들을 부호화 하는 방법을 나타낸 흐름도이다. 29 is a flowchart illustrating a method of encoding transform block coefficients using partial information of DC coefficients.
도 30은 본 발명의 일 실시예에 따른 DC의 부분정보에 기초하여 확률 정보를 유도하는 방법을 나타내는 복호화 흐름도이다.30 is a decoding flowchart illustrating a method of deriving probability information based on partial information of a DC according to an embodiment of the present invention.
도 31은 DC 계수의 부분 정보를 이용하여 변환 블록 계수들을 복호화 하는 방법을 나타낸 흐름도이다. 31 is a flowchart illustrating a method of decoding transform block coefficients using partial information of DC coefficients.
도 32는 DC 계수와 기준 계수 간의 거리 및 DC 계수의 부분 정보에 기초하여 확률 정보를 유도하는 방법을 나타내는 부호화 흐름도이다. 32 is a flowchart illustrating a method of deriving probability information based on a distance between a DC coefficient and a reference coefficient and partial information of the DC coefficient.
도 33은 주변 계수들의 정보에 따라 확률 정보를 다르게 적용한 일 예를 나타내는 도면이다. 33 is a diagram illustrating an example in which probability information is differently applied according to information of peripheral coefficients.
도 34는 DC 계수와 기준 계수 간의 거리 및 DC 계수의 부분 정보에 기초하여 확률 정보를 유도하는 방법을 나타내는 복호화 흐름도이다.34 is a decoding flowchart illustrating a method of deriving probability information based on a distance between a DC coefficient and a reference coefficient and partial information of the DC coefficient.
본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.As the invention allows for various changes and numerous embodiments, particular embodiments will be illustrated in the drawings and described in detail in the written description. However, this is not intended to limit the present invention to specific embodiments, it should be understood to include all modifications, equivalents, and substitutes included in the spirit and scope of the present invention. In describing the drawings, similar reference numerals are used for similar elements.
제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.Terms such as first and second may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component. The term and / or includes a combination of a plurality of related items or any item of a plurality of related items.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어"있다거나 "직접 접속되어"있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.When a component is referred to as being "connected" or "connected" to another component, it may be directly connected to or connected to that other component, but it may be understood that other components may be present in between. Should be. On the other hand, when a component is referred to as being "directly connected" or "directly connected" to another component, it should be understood that there is no other component in between.
본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting of the present invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In this application, the terms "comprise" or "have" are intended to indicate that there is a feature, number, step, operation, component, part, or combination thereof described in the specification, and one or more other features. It is to be understood that the present invention does not exclude the possibility of the presence or the addition of numbers, steps, operations, components, components, or a combination thereof.
이하, 첨부한 도면들을 참조하여, 본 발명의 실시예들을 상세하게 설명한다. 이하, 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. Hereinafter, the same reference numerals are used for the same components in the drawings, and duplicate descriptions of the same components are omitted.
도 1은 본 발명의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다.1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
도 1을 참조하면, 영상 부호화 장치(100)는 영상 분할부(101), 화면 내 예측부(102), 화면 간 예측부(103), 감산부(104), 변환부(105), 양자화부(106), 엔트로피 부호화부(107), 역양자화부(108), 역변환부(109), 증산부(110), 필터부(111) 및 메모리(112)를 포함할 수 있다.Referring to FIG. 1, the image encoding apparatus 100 may include an image splitter 101, an intra picture predictor 102, an inter picture predictor 103, a subtractor 104, a transformer 105, and a quantizer. 106, an entropy encoding unit 107, an inverse quantization unit 108, an inverse transform unit 109, an increase unit 110, a filter unit 111, and a memory 112.
도 1에 나타난 각 구성부들은 영상 부호화 장치에서 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시한 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 포함한 것으로 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수개의 구성부로 나뉘어져 기능을 수행할 수 있고 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.Each of the components shown in FIG. 1 is independently illustrated to represent different characteristic functions in the image encoding apparatus, and does not mean that each of the components is made of separate hardware or one software component unit. In other words, each component is included in each component for convenience of description, and at least two of the components may be combined into one component, or one component may be divided into a plurality of components to perform a function. Integrated and separate embodiments of the components are also included within the scope of the present invention without departing from the spirit of the invention.
또한, 일부의 구성 요소는 본 발명에서 본질적인 기능을 수행하는 필수적인 구성 요소는 아니고 단지 성능을 향상시키기 위한 선택적 구성 요소일 수 있다. 본 발명은 단지 성능 향상을 위해 사용되는 구성 요소를 제외한 본 발명의 본질을 구현하는데 필수적인 구성부만을 포함하여 구현될 수 있고, 단지 성능 향상을 위해 사용되는 선택적 구성 요소를 제외한 필수 구성 요소만을 포함한 구조도 본 발명의 권리범위에 포함된다.In addition, some of the components may not be essential components for performing essential functions in the present invention, but may be optional components for improving performance. The present invention can be implemented including only the components essential for implementing the essentials of the present invention except for the components used for improving performance, and the structure including only the essential components except for the optional components used for improving performance. Also included in the scope of the present invention.
영상 분할부(100)는 입력된 영상을 적어도 하나의 블록으로 분할할 수 있다. 이 때, 입력된 영상은 픽처, 슬라이스, 타일, 세그먼트 등 다양한 형태와 크기를 가질 수 있다. 블록은 부호화 단위(CU), 예측 단위(PU) 또는 변환 단위(TU)를 의미할 수 있다. 상기 분할은 쿼드 트리(Quadtree) 또는 바이너리 트리(Biniary tree) 중 적어도 하나에 기반하여 수행될 수 있다. 쿼드 트리는 상위 블록을 너비와 높이가 상위 블록의 절반인 하위 블록으로 사분할하는 방식이다. 바이너리 트리는 상위 블록을 너비 또는 높이 중 어느 하나가 상위 블록의 절반인 하위 블록으로 이분할하는 방식이다. 전술한 바이너리 트리 기반의 분할을 통해, 블록은 정방형뿐만 아니라 비정방형의 형태를 가질 수 있다.The image divider 100 may divide the input image into at least one block. In this case, the input image may have various shapes and sizes, such as a picture, a slice, a tile, and a segment. A block may mean a coding unit (CU), a prediction unit (PU), or a transformation unit (TU). The partitioning may be performed based on at least one of a quadtree or a binary tree. Quad tree is a method of dividing an upper block into lower blocks having a width and a height of half of the upper block. The binary tree divides the upper block into lower blocks, which are half of the upper block in either width or height. Through the above-described binary tree-based partitioning, a block may have a square as well as a non-square shape.
예측부(102, 103)는 인터 예측을 수행하는 화면 간 예측부(103)와 인트라 예측을 수행하는 화면 내 예측부(102)를 포함할 수 있다. 예측 단위에 대해 인터 예측을 사용할 것인지 또는 인트라 예측을 수행할 것인지를 결정하고, 각 예측 방법에 따른 구체적인 정보(예컨대, 인트라 예측 모드, 모션 벡터, 참조 픽쳐 등)를 결정할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 다를 수 있다. 예컨대, 예측의 방법과 예측 모드 등은 예측 단위로 결정되고, 예측의 수행은 변환 단위로 수행될 수도 있다.The predictors 102 and 103 may include an inter prediction unit 103 that performs inter prediction and an intra prediction unit 102 that performs intra prediction. Whether to use inter prediction or intra prediction on the prediction unit may be determined, and specific information (eg, an intra prediction mode, a motion vector, a reference picture, etc.) according to each prediction method may be determined. In this case, the processing unit in which the prediction is performed may differ from the processing unit in which the prediction method and the details are determined. For example, the method of prediction and the prediction mode may be determined in the prediction unit, and the prediction may be performed in the transform unit.
생성된 예측 블록과 원본 블록 사이의 잔차값(잔차 블록)은 변환부(105)로 입력될 수 있다. 또한, 예측을 위해 사용한 예측 모드 정보, 모션 벡터 정보 등은 잔차값과 함께 엔트로피 부호화부(107)에서 부호화되어 복호화기에 전달될 수 있다. 특정한 부호화 모드를 사용할 경우, 예측부(102, 103)를 통해 예측 블록을 생성하지 않고, 원본 블록을 그대로 부호화하여 복호화부에 전송하는 것도 가능하다.The residual value (residual block) between the generated prediction block and the original block may be input to the transformer 105. In addition, prediction mode information and motion vector information used for prediction may be encoded by the entropy encoder 107 together with the residual value and transmitted to the decoder. When a specific encoding mode is used, the original block may be encoded as it is and transmitted to the decoder without generating the prediction block through the prediction units 102 and 103.
화면 내 예측부(102)는 현재 픽쳐 내의 화소 정보인 현재 블록 주변의 참조 픽셀 정보를 기초로 예측 블록을 생성할 수 있다. 인트라 예측이 수행될 현재 블록의 주변 블록의 예측 모드가 인터 예측인 경우, 인터 예측이 적용된 주변 블록에 포함되는 참조 픽셀을, 인트라 예측이 적용된 주변의 다른 블록 내의 참조 픽셀로 대체될 수 있다. 즉, 참조 픽셀이 가용하지 않는 경우, 가용하지 않은 참조 픽셀 정보를, 가용한 참조 픽셀 중 적어도 하나의 참조 픽셀로 대체하여 사용할 수 있다.The intra prediction unit 102 may generate a prediction block based on reference pixel information around the current block, which is pixel information in the current picture. When the prediction mode of the neighboring block of the current block on which intra prediction is to be performed is inter prediction, a reference pixel included in the neighboring block to which inter prediction is applied may be replaced with a reference pixel in another block around to which intra prediction is applied. That is, when the reference pixel is not available, the unavailable reference pixel information may be replaced with at least one reference pixel among the available reference pixels.
인트라 예측에서 예측 모드는 참조 픽셀 정보를 예측 방향에 따라 사용하는 방향성 예측 모드와 예측을 수행시 방향성 정보를 사용하지 않는 비방향성 모드를 가질 수 있다. 휘도 정보를 예측하기 위한 모드와 색차 정보를 예측하기 위한 모드가 상이할 수 있고, 색차 정보를 예측하기 위해 휘도 정보를 예측하기 위해 사용된 인트라 예측 모드 정보 또는 예측된 휘도 신호 정보를 활용할 수 있다.In intra prediction, a prediction mode may have a directional prediction mode using reference pixel information according to a prediction direction, and a non-directional mode using no directional information when performing prediction. The mode for predicting the luminance information and the mode for predicting the color difference information may be different, and the intra prediction mode information or the predicted luminance signal information used for predicting the luminance information may be utilized to predict the color difference information.
화면 내 예측부(102)는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 필터로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 적응적으로 결정할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.The intra prediction unit 102 may include an adaptive intra smoothing (AIS) filter, a reference pixel interpolator, and a DC filter. The AIS filter is a filter that filters the reference pixels of the current block and may adaptively determine whether to apply the filter according to the prediction mode of the current prediction unit. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
화면 내 예측부(102)의 참조 화소 보간부는 예측 단위의 인트라 예측 모드가 참조 화소를 보간한 화소값을 기초로 인트라 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 분수 단위 위치의 참조 화소를 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.The reference pixel interpolation unit of the intra prediction unit 102 interpolates the reference pixel when the intra prediction mode of the prediction unit performs the intra prediction based on the pixel value interpolated with the reference pixel. Can be generated. If the prediction mode of the current prediction unit is a prediction mode for generating a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter may generate the prediction block through filtering when the prediction mode of the current block is the DC mode.
화면 간 예측부(103)은, 메모리(112)에 저장된 기 복원된 참조영상과 움직임 정보를 이용하여 예측 블록을 생성한다. 움직임 정보는 예컨대 움직임 벡터, 참조픽처 인덱스, 리스트 1 예측 플래그, 리스트 0 예측 플래그 등을 포함할 수 있다. The inter prediction unit 103 generates a prediction block by using the reconstructed reference image and motion information stored in the memory 112. The motion information may include, for example, a motion vector, a reference picture index, a list 1 prediction flag, a list 0 prediction flag, and the like.
예측부(102, 103)에서 생성된 예측 단위와 예측 단위의 원본 블록 간의 차이값인 잔차값(Residual) 정보를 포함하는 잔차 블록이 생성될 수 있다. 생성된 잔차 블록은 변환부(130)로 입력되어 변환될 수 있다. A residual block including residual information, which is a difference between the prediction unit generated by the prediction units 102 and 103 and the original block of the prediction unit, may be generated. The generated residual block may be input to the converter 130 and converted.
화면 간 예측부(103)는 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐의 정보를 기초로 예측 블록을 유도할 수 있다. 또한, 현재 픽쳐 내의 부호화가 완료된 일부 영역의 정보를 기초로, 현재 블록의 예측 블록을 유도할 수도 있다. 본 발명의 일 실시예에 따른 화면 간 예측부(103)는 참조 픽쳐 보간부, 움직임 예측부, 움직임 보상부를 포함할 수 있다. The inter prediction unit 103 may induce a prediction block based on information of at least one of a previous picture or a subsequent picture of the current picture. In addition, a prediction block of the current block may be derived based on information of a partial region in which encoding in the current picture is completed. The inter prediction unit 103 according to an embodiment of the present invention may include a reference picture interpolator, a motion predictor, and a motion compensator.
참조 픽쳐 보간부에서는 메모리(112)로부터 참조 픽쳐 정보를 제공받고 참조 픽쳐에서 정수 화소 이하의 화소 정보를 생성할 수 있다. 휘도 화소의 경우, 1/4 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 8탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다. 색차 신호의 경우 1/8 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 4탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다. The reference picture interpolation unit may receive reference picture information from the memory 112 and generate pixel information of less than an integer pixel in the reference picture. In the case of luminance pixels, a DCT based 8-tap interpolation filter having different filter coefficients may be used to generate pixel information of integer pixels or less in units of 1/4 pixels. In the case of a chrominance signal, a DCT-based interpolation filter having different filter coefficients may be used to generate pixel information of an integer pixel or less in units of 1/8 pixels.
움직임 예측부는 참조 픽쳐 보간부에 의해 보간된 참조 픽쳐를 기초로 모션 예측을 수행할 수 있다. 모션 벡터를 산출하기 위한 방법으로 FBMA(Full search-based Block Matching Algorithm), TSS(Three Step Search), NTS(New Three-Step Search Algorithm) 등 다양한 방법이 사용될 수 있다. 모션 벡터는 보간된 화소를 기초로 1/2 또는 1/4 화소 단위의 모션 벡터값을 가질 수 있다. 움직임 예측부에서는 움직임 예측 방법을 다르게 하여 현재 블록의 예측 블록을 예측할 수 있다. 모션 예측 방법으로 스킵(Skip) 방법, 머지(Merge) 방법, AMVP(Advanced Motion Vector Prediction) 방법 등 다양한 방법이 사용될 수 있다.The motion predictor may perform motion prediction based on the reference picture interpolated by the reference picture interpolator. As a method for calculating a motion vector, various methods such as full search-based block matching algorithm (FBMA), three step search (TSS), and new three-step search algorithm (NTS) may be used. The motion vector may have a motion vector value of 1/2 or 1/4 pixel units based on the interpolated pixels. The motion prediction unit may predict the prediction block of the current block by using a different motion prediction method. As the motion prediction method, various methods such as a skip method, a merge method, and an advanced motion vector prediction (AMVP) method may be used.
감산부(104)는, 현재 부호화하려는 블록과 화면 내 예측부(102) 혹은 화면 간 예측부(103)에서 생성된 예측 블록을 감산하여 현재 블록의 잔차 블록을 생성한다.The subtraction unit 104 generates a residual block of the current block by subtracting the block to be currently encoded from the prediction block generated by the intra prediction unit 102 or the inter prediction unit 103.
변환부(105)에서는 잔차 데이터를 포함한 잔차 블록을 DCT, DST, KLT(Karhunen Loeve Transform) 등과 같은 변환 방법을 사용하여 변환시킬 수 있다. 이때 변환 방법은 잔차 블록을 생성하기 위해 사용된 예측 단위의 인트라 예측 모드에 기반하여 결정될 수 있다. 예를 들어, 인트라 예측 모드에 따라, 가로 방향으로는 DCT를 사용하고, 세로 방향으로는 DST를 사용할 수도 있다.The transform unit 105 may transform the residual block including the residual data by using a transformation method such as DCT, DST, or Karhunen Loeve Transform (KLT). In this case, the transformation method may be determined based on the intra prediction mode of the prediction unit used to generate the residual block. For example, depending on the intra prediction mode, DCT may be used in the horizontal direction and DST may be used in the vertical direction.
양자화부(106)는 변환부(105)에서 주파수 영역으로 변환된 값들을 양자화할 수 있다. 블록에 따라 또는 영상의 중요도에 따라 양자화 계수는 변할 수 있다. 양자화부(106)에서 산출된 값은 역양자화부(108)와 엔트로피 부호화부(107)에 제공될 수 있다.The quantization unit 106 may quantize the values converted in the frequency domain by the transformer 105. The quantization coefficient may change depending on the block or the importance of the image. The value calculated by the quantization unit 106 may be provided to the inverse quantization unit 108 and the entropy encoding unit 107.
상기 변환부(105) 및/또는 양자화부(106)는, 영상 부호화 장치(100)에 선택적으로 포함될 수 있다. 즉, 영상 부호화 장치(100)는, 잔차 블록의 잔차 데이터에 대해 변환 또는 양자화 중 적어도 하나를 수행하거나, 변환 및 양자화를 모두 스킵하여 잔차 블록을 부호화할 수 있다. 영상 부호화 장치(100)에서 변환 또는 양자화 중 어느 하나가 수행되지 않거나, 변환 및 양자화 모두 수행되지 않더라도, 엔트로피 부호화부(107)의 입력으로 들어가는 블록을 통상적으로 변환 블록이라 일컫는다. 엔트로피 부호화부(107)는 입력 데이터를 엔트로피 부호화한다. 엔트로피 부호화는 예를 들어, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 부호화 방법을 사용할 수 있다.The transform unit 105 and / or the quantization unit 106 may be selectively included in the image encoding apparatus 100. That is, the image encoding apparatus 100 may encode the residual block by performing at least one of transform or quantization on the residual data of the residual block, or skipping both transform and quantization. Even if neither the transformation nor the quantization is performed or neither the transformation nor the quantization is performed in the image encoding apparatus 100, a block entering the input of the entropy encoder 107 is generally referred to as a transform block. The entropy encoder 107 entropy encodes the input data. Entropy encoding may use various encoding methods such as, for example, Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC).
엔트로피 부호화부(107)는 변환 블록의 계수 정보, 블록 타입 정보, 예측 모드 정보, 분할 단위 정보, 예측 단위 정보, 전송 단위 정보, 모션 벡터 정보, 참조 프레임 정보, 블록의 보간 정보, 필터링 정보 등 다양한 정보를 부호화할 수 있다. 변환 블록의 계수들은, 변환 블록 내 서브 블록 단위로, 부호화될 수 있다. The entropy encoder 107 may be configured to perform various operations such as coefficient information, block type information, prediction mode information, split unit information, prediction unit information, transmission unit information, motion vector information, reference frame information, interpolation information of a transform block, filtering information, and the like. Information can be encoded. The coefficients of the transform block may be encoded in units of sub blocks within the transform block.
변환 블록의 계수의 부호화를 위하여, 역스캔 순서로 최초의 0이 아닌 계수의 위치를 알리는 신택스 요소(syntax element)인 Last_sig, 서브블록 내에 0이 아닌 계수가 적어도 하나 이상 있는지를 알리는 플래그인 Coded_sub_blk_flag, 0이 아닌 계수인지를 알리는 플래그인 Sig_coeff_flag, 계수의 절대값이 1 보다 큰지를 알리는 플래그인 Abs_greater1_flag, 계수의 절대값이 2 보다 큰지를 알리는 플래그인 Abs_greater2_flag, 계수의 부호를 나타내는 플래그인 Sign_flag 등의 다양한 신택스 요소들이 부호화될 수 있다. 상기 신택스 요소들만으로 부호화되지 않는 계수의 잔여값은 신택스 요소 remaining_coeff를 통해 부호화될 수 있다. Last_sig, a syntax element that indicates the position of the first non-zero coefficient in reverse scan order, for encoding the coefficients of the transform block, Coded_sub_blk_flag, which is a flag indicating whether there is at least one non-zero coefficient in the subblock, Sig_coeff_flag, a flag that indicates whether the coefficient is non-zero, Abs_greater1_flag, which indicates whether the absolute value of the coefficient is greater than 1, Abs_greater2_flag, which indicates whether the absolute value of the coefficient is greater than 2, Sign_flag, which indicates the sign of the coefficient, etc. Syntax elements may be encoded. Residual values of coefficients not encoded with only the syntax elements may be encoded through the syntax element remaining_coeff.
역양자화부(108) 및 역변환부(109)에서는 양자화부(106)에서 양자화된 값들을 역양자화하고 변환부(105)에서 변환된 값들을 역변환한다. 역양자화부(108) 및 역변환부(109)에서 생성된 잔차값(Residual)은 예측부(102, 103)에 포함된 움직임 추정부, 움직임 보상부 및 화면 내 예측부(102)를 통해서 예측된 예측 단위와 합쳐져 복원 블록(Reconstructed Block)을 생성할 수 있다. 증산기(110)는, 예측부(102, 103)에서 생성된 예측 블록과, 역 변환부(109)를 통해 생성된 잔차 블록을 증산하여 복원 블록을 생성한다.The inverse quantization unit 108 and the inverse transformer 109 inverse quantize the quantized values in the quantization unit 106 and inverse transform the transformed values in the transformer 105. The residual values generated by the inverse quantizer 108 and the inverse transformer 109 are predicted by the motion estimator, the motion compensator, and the intra prediction unit 102 included in the predictors 102 and 103. It may be combined with the prediction unit to generate a reconstructed block. The transcriptor 110 generates a reconstructed block by multiplying the prediction blocks generated by the predictors 102 and 103 and the residual blocks generated by the inverse transform unit 109.
필터부(111)는 디블록킹 필터, 오프셋 보정부, ALF(Adaptive Loop Filter)중 적어도 하나를 포함할 수 있다.The filter unit 111 may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
디블록킹 필터는 복원된 픽쳐에서 블록간의 경계로 인해 생긴 블록 왜곡을 제거할 수 있다. 디블록킹을 수행할지 여부를 판단하기 위해 블록에 포함된 몇 개의 열 또는 행에 포함된 픽셀을 기초로 현재 블록에 디블록킹 필터 적용할지 여부를 판단할 수 있다. 블록에 디블록킹 필터를 적용하는 경우 필요한 디블록킹 필터링 강도에 따라 강한 필터(Strong Filter) 또는 약한 필터(Weak Filter)를 적용할 수 있다. 또한 디블록킹 필터를 적용함에 있어 수직 필터링 및 수평 필터링 수행시 수평 방향 필터링 및 수직 방향 필터링이 병행 처리되도록 할 수 있다.The deblocking filter may remove block distortion caused by boundaries between blocks in the reconstructed picture. In order to determine whether to perform deblocking, it may be determined whether to apply a deblocking filter to the current block based on the pixels included in several columns or rows included in the block. When the deblocking filter is applied to the block, a strong filter or a weak filter may be applied according to the required deblocking filtering strength. In addition, in applying the deblocking filter, horizontal filtering and vertical filtering may be performed in parallel when vertical filtering and horizontal filtering are performed.
오프셋 보정부는 디블록킹을 수행한 영상에 대해 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽쳐에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다.The offset correction unit may correct the offset with respect to the original image on a pixel-by-pixel basis for the deblocking image. In order to perform offset correction for a specific picture, the pixels included in the image are divided into a predetermined number of areas, and then, an area to be offset is determined, an offset is applied to the corresponding area, or offset considering the edge information of each pixel. You can use this method.
ALF(Adaptive Loop Filtering)는 필터링한 복원 영상과 원래의 영상을 비교한 값을 기초로 수행될 수 있다. 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. ALF를 적용할지 여부에 관련된 정보는 휘도 신호는 부호화 단위(Coding Unit, CU) 별로 전송될 수 있고, 각각의 블록에 따라 적용될 ALF 필터의 모양 및 필터 계수는 달라질 수 있다. 또한, 적용 대상 블록의 특성에 상관없이 동일한 형태(고정된 형태)의 ALF 필터가 적용될 수도 있다. Adaptive Loop Filtering (ALF) may be performed based on a value obtained by comparing the filtered reconstructed image with the original image. After dividing the pixels included in the image into a predetermined group, one filter to be applied to the group may be determined and filtering may be performed for each group. For information related to whether to apply ALF, a luminance signal may be transmitted for each coding unit (CU), and the shape and filter coefficient of an ALF filter to be applied may vary according to each block. In addition, regardless of the characteristics of the block to be applied, the same type (fixed form) of the ALF filter may be applied.
메모리(112)는 필터부(111)를 통해 산출된 복원 블록 또는 픽쳐를 저장할 수 있고, 저장된 복원 블록 또는 픽쳐는 화면 간 예측을 수행할 때 예측부(102, 103)에 제공될 수 있다.The memory 112 may store a reconstructed block or picture calculated by the filter unit 111, and the stored reconstructed block or picture may be provided to the predictors 102 and 103 when performing inter prediction.
다음으로, 본 발명의 일 실시예에 따른 영상 복호화 장치를 도면을 참조하여 설명한다. 도 2는 본 발명의 일 실시예에 따른 영상 복호화 장치(200)를 나타낸 블록도이다. Next, an image decoding apparatus according to an embodiment of the present invention will be described with reference to the drawings. 2 is a block diagram illustrating an image decoding apparatus 200 according to an embodiment of the present invention.
도 2를 참조하면, 영상 복호화 장치(200)는 엔트로피 복호화부(201), 역양자화부(202), 역변환부(203), 증산부(204), 필터부(205), 메모리(206) 및 예측부(207, 208)를 포함할 수 있다.Referring to FIG. 2, the image decoding apparatus 200 may include an entropy decoder 201, an inverse quantizer 202, an inverse transform unit 203, an increase unit 204, a filter unit 205, a memory 206, and the like. The prediction unit 207 and 208 may be included.
영상 부호화 장치(100)에 의해 생성된 영상 비트스트림이 영상 복호화 장치(200)로 입력되는 경우, 입력된 비트스트림은 영상 부호화 장치(100)에서 수행된 과정과 반대의 과정에 따라 복호될 수 있다.When the image bitstream generated by the image encoding apparatus 100 is input to the image decoding apparatus 200, the input bitstream may be decoded according to a process opposite to that performed by the image encoding apparatus 100. .
엔트로피 복호화부(201)는 영상 부호화 장치(100)의 엔트로피 부호화부(107)에서 엔트로피 부호화를 수행한 것과 반대의 절차로 엔트로피 복호화를 수행할 수 있다. 예를 들어, 영상 부호화기에서 수행된 방법에 대응하여 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 방법이 적용될 수 있다. 엔트로피 복호화부(201)는, 전술한 바와 같은 신택스 요소들, 즉 Last_sig, Coded_sub_blk_flag, Sig_coeff_flag, Abs_greater1_flag, Abs_greater2_flag, Sign_flag 및 remaining_coeff를 복호화할 수 있다. 또한, 엔트로피 복호화부(201)는 영상 부호화 장치(100)에서 수행된 인트라 예측 및 인터 예측에 관련된 정보를 복호화할 수 있다. The entropy decoding unit 201 may perform entropy decoding in a procedure opposite to that of the entropy encoding unit 107 of the image encoding apparatus 100. For example, various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be applied to the method performed by the image encoder. The entropy decoding unit 201 may decode the syntax elements described above, that is, Last_sig, Coded_sub_blk_flag, Sig_coeff_flag, Abs_greater1_flag, Abs_greater2_flag, Sign_flag, and remaining_coeff. Also, the entropy decoder 201 may decode information related to intra prediction and inter prediction performed by the image encoding apparatus 100.
역 양자화부(202)는 양자화된 변환 블록에 역 양자화를 수행하여 변환 블록을 생성한다. 도 1의 역 양자화부(108)와 실질적으로 동일하게 동작한다.The inverse quantizer 202 generates a transform block by performing inverse quantization on the quantized transform block. It operates substantially the same as the inverse quantizer 108 of FIG.
역 변환부(203)은 변환 블록에 역 변환을 수행하여 잔차 블록을 생성한다. 이때, 변환 방법은 예측 방법(인터 또는 인트라 예측), 블록의 크기 및/또는 형태, 인트라 예측 모드 등에 관한 정보를 기반으로 결정될 수 있다. 도 1의 역 변환부(109)와 실질적으로 동일하게 동작한다. The inverse transform unit 203 performs an inverse transform on the transform block to generate a residual block. In this case, the transformation method may be determined based on information on a prediction method (inter or intra prediction), a size and / or shape of a block, an intra prediction mode, and the like. It operates substantially the same as the inverse transform unit 109 of FIG.
증산부(204)는, 화면 내 예측부(207) 혹은 화면 간 예측부(208)에서 생성된 예측 블록과 역 변환부(203)를 통해 생성된 잔차 블록를 증산하여 복원 블록을 생성한다. 도 1의 증산부(110)과 실질적으로 동일하게 동작한다.The increaser 204 generates a reconstructed block by multiplying the prediction block generated by the intra prediction unit 207 or the inter prediction unit 208 and the residual block generated by the inverse transform unit 203. It operates substantially the same as the transpiration section 110 of FIG.
필터부(205)는, 복원된 블록들에 발생하는 여러 종류의 노이즈를 감소시킨다.The filter unit 205 reduces various kinds of noise generated in the restored blocks.
필터부(205)는 디블록킹 필터, 오프셋 보정부, ALF를 포함할 수 있다.The filter unit 205 may include a deblocking filter, an offset corrector, and an ALF.
영상 부호화 장치(100)로부터 해당 블록 또는 픽쳐에 디블록킹 필터를 적용하였는지 여부에 대한 정보 및 디블록킹 필터를 적용하였을 경우, 강한 필터를 적용하였는지 또는 약한 필터를 적용하였는지에 대한 정보를 제공받을 수 있다. 영상 복호화 장치(200)의 디블록킹 필터에서는 영상 부호화 장치(100)에서 제공된 디블록킹 필터 관련 정보를 제공받고 영상 복호화 장치(200)에서 해당 블록에 대한 디블록킹 필터링을 수행할 수 있다. When the deblocking filter is applied and information about whether the deblocking filter is applied to the corresponding block or picture, the image encoding apparatus 100 may receive information about whether a strong filter or a weak filter is applied. In the deblocking filter of the image decoding apparatus 200, the deblocking filter related information provided by the image encoding apparatus 100 may be provided, and the image decoding apparatus 200 may perform deblocking filtering on the corresponding block.
오프셋 보정부는 부호화시 영상에 적용된 오프셋 보정의 종류 및 오프셋 값 정보 등을 기초로 복원된 영상에 오프셋 보정을 수행할 수 있다.The offset correction unit may perform offset correction on the reconstructed image based on the type of offset correction and offset value information applied to the image during encoding.
ALF는 영상 부호화 장치(100)로부터 제공된 ALF 적용 여부 정보, ALF 계수 정보 등을 기초로 부호화 단위에 적용될 수 있다. 이러한 ALF 정보는 특정한 파라미터 셋에 포함되어 제공될 수 있다. 필터부(205)는 도 1의 필터부(111)와 실질적으로 동일하게 동작한다.The ALF may be applied to a coding unit based on ALF application information, ALF coefficient information, and the like provided from the image encoding apparatus 100. Such ALF information may be provided included in a specific parameter set. The filter unit 205 operates substantially the same as the filter unit 111 of FIG. 1.
메모리(206)는 증산부(204)에 의해 생성된 복원 블록을 저장한다. 도 1의 메모리(112)와 실질적으로 동일하게 동작한다.The memory 206 stores the reconstruction block generated by the multiplier 204. It operates substantially the same as the memory 112 of FIG.
예측부(207, 208)는 엔트로피 복호화부(201)에서 제공된 예측 블록 생성 관련 정보와 메모리(206)에서 제공된 이전에 복호화된 블록 또는 픽쳐 정보를 기초로 예측 블록을 생성할 수 있다. The prediction units 207 and 208 may generate the prediction blocks based on the prediction block generation related information provided by the entropy decoding unit 201 and previously decoded blocks or picture information provided by the memory 206.
예측부(207, 208)는 화면 내 예측부(207) 및 화면 간 예측부(208)를 포함할 수 있다. 별도로 도시되지는 아니하였으나, 예측부(207, 208)는 예측 단위 판별부를 더 포함할 수 있다. 예측 단위 판별부는 엔트로피 복호화부(201)에서 입력되는 예측 단위 정보, 인트라 예측 방법의 예측 모드 정보, 인터 예측 방법의 모션 예측 관련 정보 등 다양한 정보를 입력 받고 현재 부호화 단위에서 예측 단위를 구분하고, 예측 단위가 인터 예측을 수행하는지 아니면 인트라 예측을 수행하는지 여부를 판별할 수 있다. 화면 간 예측부(208)는 영상 부호화 장치(100)에서 제공된 현재 예측 단위의 인터 예측에 필요한 정보를 이용해 현재 예측 단위가 포함된 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐에 포함된 정보를 기초로 현재 예측 단위에 대한 화면 간 예측을 수행할 수 있다. 또는, 현재 예측 단위가 포함된 현재 픽쳐 내에서 기-복원된 일부 영역의 정보를 기초로 화면 간 예측을 수행할 수도 있다.The prediction units 207 and 208 may include an intra prediction unit 207 and an inter prediction unit 208. Although not separately illustrated, the prediction units 207 and 208 may further include a prediction unit determination unit. The prediction unit determination unit receives various information such as prediction unit information input from the entropy decoder 201, prediction mode information of the intra prediction method, and motion prediction related information of the inter prediction method, and distinguishes the prediction unit from the current coding unit, and predicts It may be determined whether the unit performs inter prediction or intra prediction. The inter prediction unit 208 may include information included in at least one of a previous picture or a subsequent picture of the current picture including the current prediction unit by using information necessary for inter prediction of the current prediction unit provided by the image encoding apparatus 100. Based on the prediction, the inter prediction may be performed on the current prediction unit. Alternatively, inter-screen prediction may be performed based on information of a pre-restored partial region in the current picture including the current prediction unit.
화면 간 예측을 수행하기 위해 부호화 단위를 기준으로 해당 부호화 단위에 포함된 예측 단위의 모션 예측 방법이 스킵 모드(Skip Mode), 머지 모드(Merge 모드), AMVP 모드(AMVP Mode) 중 어떠한 방법인지 여부를 판단할 수 있다.Whether the motion prediction method of the prediction unit included in the coding unit based on the coding unit to perform inter prediction is skip mode, merge mode, or AMVP mode. Can be determined.
화면 내 예측부(207)는, 현재 부호화하려는 블록 주변에 위치한, 그리고 기 복원된 화소들을 이용하여 예측 블록을 생성한다. The intra prediction unit 207 generates a prediction block using pixels that are located around the block to be currently encoded and are reconstructed.
화면 내 예측부(207)는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 필터로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 적응적으로 결정할 수 있다. 영상 부호화 장치(100)에서 제공된 예측 단위의 예측 모드 및 AIS 필터 정보를 이용하여 현재 블록의 참조 화소에 AIS 필터링을 수행할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.The intra prediction unit 207 may include an adaptive intra smoothing (AIS) filter, a reference pixel interpolator, and a DC filter. The AIS filter is a filter that filters the reference pixels of the current block and may adaptively determine whether to apply the filter according to the prediction mode of the current prediction unit. The AIS filtering may be performed on the reference pixel of the current block by using the prediction mode of the prediction unit and the AIS filter information provided by the image encoding apparatus 100. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
화면 내 예측부(207)의 참조 화소 보간부는 예측 단위의 예측 모드가 참조 화소를 보간한 화소값을 기초로 인트라 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 분수 단위 위치의 참조 화소를 생성할 수 있다. 생성된 분수 단위 위치의 참조 화소가 현재 블록 내의 화소의 예측 화소로 이용될 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.The reference pixel interpolation unit of the intra prediction unit 207 interpolates a reference pixel at a fractional position by interpolating the reference pixel when the prediction mode of the prediction unit is a prediction unit that performs intra prediction based on a pixel value interpolating the reference pixel. Can be generated. The generated reference pixel at the fractional unit location may be used as the prediction pixel of the pixel in the current block. If the prediction mode of the current prediction unit is a prediction mode for generating a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter may generate the prediction block through filtering when the prediction mode of the current block is the DC mode.
화면 내 예측부(207)는 도 1의 화면 내 예측부(102)와 실질적으로 동일하게 동작한다.The intra prediction unit 207 operates substantially the same as the intra prediction unit 102 of FIG. 1.
화면 간 예측부(208)는, 메모리(206)에 저장된 참조 픽처, 움직임 정보를 이용하여 화면간 예측 블록을 생성한다. 화면 간 예측부(208)는 도 1의 화면 간 예측부(103)와 실질적으로 동일하게 동작한다.The inter prediction unit 208 generates an inter prediction block using the reference picture and the motion information stored in the memory 206. The inter prediction unit 208 operates substantially the same as the inter prediction unit 103 of FIG. 1.
이하, 본 발명의 다양한 실시예들을 도면들을 참조하면서 보다 상세하게 설명한다.Hereinafter, various embodiments of the present invention will be described in more detail with reference to the drawings.
(제1 실시예)(First embodiment)
도 3은 본 발명의 일 실시예에 따른, 변환 블록의 부호화 방법을 나타낸 흐름도이다. 도 3의 변환 블록의 부호화 방법은, 영상 부호화 장치(100)의 엔트로피 부호화부(107)에 의해 수행될 수 있다.3 is a flowchart illustrating a method of encoding a transform block, according to an embodiment of the present invention. The encoding method of the transform block of FIG. 3 may be performed by the entropy encoder 107 of the image encoding apparatus 100.
도 4a에 도시한 바와 같이, 하나의 변환 블록은 서브 블록 단위로 부호화될 수 있다. 도 4a를 참조하면, 부호화 또는 복호화 할 현재 변환 블록(400)이 8 x 8 블록인 경우, 4 x 4 크기의 네 개의 서브 블록 1 (401) 내지 서브 블록 4 (404)로 분할될 수 있다. 변환 블록 내의 변환 계수들의 부호화 순서를 결정하기 위한 스캔 방법에는, 현재 블록 또는 현재 변환 블록의 예측 모드에 따라 수직, 수평 또는 대각선 방향의 역 스캔 방법 등이 이용될 수 있다. 여기서, 예측 모드는 화면 간 예측 또는 화면 내 예측일 수 있다.As shown in FIG. 4A, one transform block may be encoded in sub-block units. Referring to FIG. 4A, when the current transform block 400 to be encoded or decoded is an 8 × 8 block, the current transform block 400 may be divided into four subblocks 1 401 to 4 block 404 having a size of 4 × 4. As a scan method for determining an encoding order of transform coefficients in a transform block, an inverse scan method in a vertical, horizontal, or diagonal direction may be used according to a prediction mode of the current block or the current transform block. Here, the prediction mode may be inter prediction or intra prediction.
도 4b, 4c 및 4d는 각각 대각선 방향 역스캔, 수직 방향 역스캔 및 수평 방향 역스캔을 나타낸다. 여기서는, 설명의 편의를 위해 대각선 방향 역 스캔을 예로 들어 설명하지만, 수직 방향 역스캔 또는 수평 방향 역 스캔도 모두 적용 가능하다. 4B, 4C and 4D show a diagonal reverse scan, a vertical reverse scan and a horizontal reverse scan, respectively. Here, for convenience of explanation, a diagonal reverse scan is described as an example, but both a vertical reverse scan or a horizontal reverse scan may be applied.
도 3을 참조하면, 먼저 역 스캔 순서에 따라서 변환 계수들을 스캔할 때 최초의 0이 아닌 계수를 기준 계수로 정하고, 그 위치 정보 Last_sig 를 부호화 한다(S301). Referring to FIG. 3, first, non-zero coefficients are determined as reference coefficients when scanning transform coefficients according to an inverse scan order, and the position information Last_sig is encoded (S301).
기준 계수가 포함된 서브 블록을 선택하고(S302) 해당 서브 블록 정보를 부호화한다(S303). 서브 블록 정보인 Coded_sub_blk_flag 는 현재 서브 블록 내에 0이 아닌 계수가 적어도 하나 이상 있는지를 알리는 플래그이다. 그 후, 0이 아닌 계수 정보를 부호화 한다(S304). 여기서 0이 아닌 계수 정보인 Sig_coeff_flag 는 서브 블록안에 존재하는 각 계수의 값이 0인지 아닌지를 나타낸다. The sub block including the reference coefficient is selected (S302) and the corresponding sub block information is encoded (S303). Coded_sub_blk_flag, which is sub block information, is a flag indicating whether there is at least one non-zero coefficient in the current sub block. Thereafter, non-zero coefficient information is encoded (S304). Here, Sig_coeff_flag, which is nonzero coefficient information, indicates whether or not the value of each coefficient existing in the subblock is zero.
그리고, N 초과 계수 정보를 부호화 한다(S305). 여기서, N 초과 계수 정보는 서브 블록안에 존재하는 모든 계수에 대해 각 계수의 절대값이 1부터 N까지 값을 각각 초과하는지를 나타낸다. N은 부호화 및 복호화 시 임의의 기 설정된 값을 사용하지만 N의 값을 부호화 하여 부호화 및 복호화 시에 동일한 값을 사용하게 할 수 있다. N초과 계수 정보의 개수는 임의의 기 설정된 값을 사용할 수도 있고, 기준 계수의 위치에 따라 다르게 사용할 수도 있다. 예를 들어 N이 3으로 설정된 경우, 서브 블록안의 모든 0이 아니라고 판단된 계수에 대해 각 계수의 절대값이 1보다 큰 값인지 여부를 부호화 한다. 이를 위해 계수의 절대값이 1 보다 큰지를 알리는 플래그인 Abs_greater1_flag 가 이용된다. 그 후, 1보다 큰 값으로 판단이 된 계수에 대해서만 2보다 큰 값인지 여부를 부호화 한다. 이를 위해 계수의 절대값이 2 보다 큰지를 알리는 플래그인 Abs_greater2_flag가 사용된다. 마지막으로 2 보다 큰 값으로 판단이 된 계수에 대해서만 3보다 큰 값인지 여부를 부호화 한다. 이를 위해서는 계수의 절대값이 3 보다 큰지를 알리는 플래그인 Abs_greater3_flag가 사용될 수 있다. Then, N excess coefficient information is encoded (S305). Here, the N excess coefficient information indicates whether the absolute value of each coefficient exceeds a value from 1 to N for all coefficients existing in the subblock. N uses arbitrary preset values for encoding and decoding, but may encode the value of N to use the same value for encoding and decoding. The number of N excess coefficient information may use any predetermined value or may be used differently according to the position of the reference coefficient. For example, when N is set to 3, for all coefficients determined to be non-zero in the subblock, whether or not the absolute value of each coefficient is greater than 1 is encoded. To this end, Abs_greater1_flag, a flag indicating whether the absolute value of the coefficient is greater than one, is used. Thereafter, only the coefficients judged to be larger than 1 are encoded. For this purpose, Abs_greater2_flag, which is a flag indicating whether the absolute value of the coefficient is greater than 2, is used. Finally, only the coefficients judged to be greater than 2 are encoded. To this end, Abs_greater3_flag, a flag indicating whether the absolute value of the coefficient is greater than 3, may be used.
그 후, 0이 아니라고 판단된 각 계수에 대해 음수인지 양수인지 나타내는 부호 정보가 부호화 된다(S306). 부호 정보는 Sign_flag가 사용될 수 있다. 그리고 N보다 크다고 판단된 계수에 대해서만 N을 뺀 나머지 값을 잔차 계수 정보로 정의하고 이 계수의 잔여값 정보 remaining_coeff가 부호화 된다(S307). Thereafter, code information indicating whether the coefficient is negative or positive is encoded for each coefficient judged not to be zero (S306). Sign_flag may be used as the sign information. Only remaining coefficients obtained by subtracting N are defined as residual coefficient information only for coefficients determined to be larger than N, and residual value information remaining_coeff of the coefficients is encoded (S307).
그 후 다음 서브 블록이 존재하는지 확인한 후(S309) 존재한다면 다음 서브 블록으로 이동하고(S310) 서브 블록 정보를 부호화 한다(S303). 해당 서브 블록 정보 Coded_sub_blk_flag를 확인하고(S308) Coded_sub_blk_flag의 값이 참인 것으로 확인되면 0이 아닌 계수 정보인 Sig_coeff_flag 를 부호화 한다. 만약 해당 서브 블록 정보 Coded_sub_blk_flag의 값이 거짓이라면 해당 서브 블록에 부호화 할 계수가 존재하지 않는다는 뜻이기 때문에 다음 서브블록의 존재 여부를 확인한다. 혹은, 다음 서브블록으로 이동한 후, 해당 서브 블록이 가장 저주파 쪽에 위치한 서브 블록일 경우, 0이 아닌 계수가 존재할 것이라는 가정하에 서브 블록 정보의 부호화 및 복호화 없이 참인 것으로 부호화 및 복호화 시에 동일하게 설정하는 것 또한 가능하다.After that, it is checked whether the next subblock exists (S309), and if so, it moves to the next subblock (S310) and the subblock information is encoded (S303). The subblock information Coded_sub_blk_flag is checked (S308). If it is determined that the value of Coded_sub_blk_flag is true, Sig_coeff_flag, which is non-zero coefficient information, is encoded. If the value of the corresponding subblock information Coded_sub_blk_flag is false, it means that there is no coefficient to be encoded in the corresponding subblock. Therefore, the existence of the next subblock is checked. Alternatively, after moving to the next subblock, if the subblock is a subblock located at the lowest frequency side, it is set to the same value at the time of encoding and decoding as true without encoding and decoding subblock information under the assumption that there is a non-zero coefficient. It is also possible.
도 5는 본 발명의 일 실시예에 따른, 변환 블록의 복호화 방법을 나타낸 흐름도이다. 도 5의 변환 블록의 복호화 방법은 도 3의 변환 블록의 부호화 방법에 대응된다. 도 5의 변환 블록의 복호화 방법은, 영상 복호화 장치(200)의 엔트로피 복호화부(201)에 의해 수행될 수 있다.5 is a flowchart illustrating a method of decoding a transform block according to an embodiment of the present invention. The decoding method of the transform block of FIG. 5 corresponds to the encoding method of the transform block of FIG. 3. The decoding method of the transform block of FIG. 5 may be performed by the entropy decoding unit 201 of the image decoding apparatus 200.
역 스캔 순서에 따라서 처음으로 나오는 0이 아닌 변환 계수인 기준 계수의 위치 정보 Last_sig를 복호화 한다(S501). The positional information Last_sig of the reference coefficient, which is a non-zero transform coefficient, is first decoded according to the inverse scan order (S501).
기준 계수가 포함된 서브 블록을 선택하고(S502) 서브 블록 정보 Coded_sub_blk_flag를 복호화한다(S503). 그 후, 0이 아닌 계수 정보 Sig_coeff_flag 를 복호화 한다(S504). 그리고, N 초과 계수 정보가 복호화 된다(S505). 여기서, N 초과 계수 정보에는 전술한 바와 같은, Abs_greater1_flag, Abs_greater2_flag 및 Abs_greater3_flag 등이 포함될 수 있다.The sub block including the reference coefficient is selected (S502) and the sub block information Coded_sub_blk_flag is decoded (S503). Thereafter, non-zero coefficient information Sig_coeff_flag is decoded (S504). The N excess coefficient information is then decoded (S505). Here, the N excess coefficient information may include Abs_greater1_flag, Abs_greater2_flag, Abs_greater3_flag, and the like as described above.
그 후, 0이 아니라고 판단된 각 계수에 대해 계수의 부호 정보 Sign_flag가 복호화 된다(S506). 그리고 N보다 크다고 판단된 계수에 대해서만 N을 뺀 나머지 값에 해당하는 잔차 계수 정보 remaing_coeff가 복호화 된다(S507). 그 후 다음 서브 블록이 존재하는지 확인한 후(S509) 존재한다면 다음 서브 블록으로 이동하고(S510) 서브 블록 정보 Coded_sub_blk_flag를 복호화 한다(S503). 해당 서브 블록 정보 Coded_sub_blk_flag를 확인하고(S508) 참인 것으로 확인되면 0이 아닌 계수 정보 Sig_coeff_flag 를 복호화 하며, 만약 거짓이라면 해당 서브 블록에 복호화 할 계수가 존재하지 않는다는 뜻이기 때문에 다음 서브블록의 존재 여부를 확인한다. Thereafter, the sign information Sign_flag of the coefficient is decoded for each coefficient determined to be non-zero (S506). Residual coefficient information remaing_coeff corresponding to the remaining value after subtracting N is only decoded for the coefficient determined to be greater than N (S507). After that, it is checked whether the next subblock exists (S509), and if so, it moves to the next subblock (S510), and the subblock information Coded_sub_blk_flag is decoded (S503). If the subblock information Coded_sub_blk_flag is checked (S508), and it is determined to be true, the non-zero coefficient information Sig_coeff_flag is decoded. do.
도 6은 본 발명의 일 실시 예에 따라, 스킵 영역을 이용한 영상 부호화 방법을 나타내는 순서도이다. 도 6의 영상 부호화 방법은, 영상 부호화 장치(100)의 엔트로피 부호화부(107)에 의해 수행될 수 있다.6 is a flowchart illustrating a video encoding method using a skip region according to an embodiment of the present invention. The image encoding method of FIG. 6 may be performed by the entropy encoding unit 107 of the image encoding apparatus 100.
도 6을 참조하면, 먼저 엔트로피 부호화부(107)는 부호화할 현재 변환 블록 내의 기준 계수의 위치를 부호화 한다(S601). 전술한 바와 같이, 기준 계수는 역스캔 순서로 계수들을 스캔할 때 최초의 0이 아닌 계수를 말한다. 그 후, 기준 계수의 위치에 기초하여 선택된 스킵 영역에 대한 스킵 영역 정보를 부호화한다 (S602). Referring to FIG. 6, first, the entropy encoder 107 encodes a position of a reference coefficient in a current transform block to be encoded (S601). As mentioned above, the reference coefficient refers to the first non-zero coefficient when scanning the coefficients in reverse scan order. Thereafter, skip region information on the selected skip region is encoded based on the position of the reference coefficient (S602).
여기서, 스킵 영역이란 기준 계수의 위치에 기초하여 정해질 수 있는, 현재 변환 블록 내의 영역이다. 스킵 영역 정보는 스킵 영역 내의 계수들이 모두 동일한 값을 가지는지 아닌지를 나타낸다. 여기서, 스킵 영역 내의 계수들이 가지는 동일한 값은 0일 수 있다. 만약, 스킵 영역 내의 계수들이 가지는 동일한 값이 0이 아닌 경우, 0이 아닌 어떤 값인지를 나타내는 정보가 추가로 부호화될 수 있다. 스킵 영역 내의 계수들이 가지는 동일한 값으로써 0이 아닌 임의의 기 설정된 값을 사용하는 것도 가능하다. 이 경우, 기 설정된 값의 정보를 변환 블록 단위가 아닌 상위 헤더를 통해 부호화 하는 것이 가능하다. Here, the skip region is an area in the current transform block, which can be determined based on the position of the reference coefficient. The skip region information indicates whether all coefficients in the skip region have the same value. Here, the same value of the coefficients in the skipped region may be zero. If the same value of the coefficients in the skipped region is not 0, information indicating which value is not 0 may be further encoded. It is also possible to use any non-zero predetermined value as the same value of the coefficients in the skip region. In this case, it is possible to encode information of a predetermined value through an upper header rather than a transform block unit.
한편, 스킵 영역은 기 설정된 규칙에 의해 부호화/복호화 과정에서 동일하게 결정 할 수도 있고, 변환 블록 내의 스킵 영역의 범위를 알려주는 좌표를 추가로 부호화 하여 부호화 장치(100) 또는 복호화 장치(200)에서 동일한 위치를 이용할 수도 있다. In the meantime, the skip region may be determined in the encoding / decoding process according to a predetermined rule, and the encoding apparatus 100 or the decoding apparatus 200 may further encode a coordinate indicating the range of the skip region in the transform block. The same location may be used.
도 7은 본 발명의 일 실시예에 따른 스킵 영역을 나타내는 도면이다. 대각선 방향 역스캔이 현재 변환 블록 (700)의 계수 부호화에 사용되는 경우를 가정한다. 7 is a diagram illustrating a skip region according to an embodiment of the present invention. Assume that a diagonal inverse scan is used for coefficient coding of the current transform block 700.
도 7을 참조하면, 기준 계수(701)의 위치를 기준으로 왼쪽 아래 45도 방향으로 기준선(702)을 생성한 후, 기준선(702) 상에 위치하는 계수들과 기준선(702)의 아래쪽에 존재하는 계수들을 포함하는 영역이 스킵 영역으로 지정되어있다. 도 7에서 스킵 영역은 음영으로 표시되어 있고, 스킵 영역 내의 모든 계수들은 0의 동일한 값을 가진다. 또한, 스킵 영역 내의 모든 계수들은 기준 계수보다 부호화 순서상 뒤에 위치한다. Referring to FIG. 7, after generating the reference line 702 in the lower left 45 degree direction based on the position of the reference coefficient 701, the coefficients positioned on the reference line 702 and the reference line 702 are present below the reference line 702. An area containing the coefficients to be specified is designated as a skip area. In FIG. 7, the skipped region is shaded, and all coefficients in the skipped region have the same value of zero. In addition, all the coefficients in the skipped region are located later in the coding order than the reference coefficients.
스킵 영역을 설정하는 다른 실시예로서, 기준 계수가 변환 블록 내의 어떤 임의의 영역에 위치함으로 인해 스킵 영역 안에 존재하는 계수들의 수가 적으면, 기준 계수를 기준으로 스킵 영역을 정하는 것이 아니라, 역 스캔 순서상 기준 계수 이후에 나오는 0이 아닌 계수 중 하나 또는 기준 계수와 인접한 계수를 이용하여 스킵 영역을 설정할 수 있다. 여기서, 기준 계수가 위치하는, 변환 블록 내의 임의의 영역은, 역 스캔 순서로 계산한 서브 블록의 개수를 기 설정된 임계값과 비교하여 설정하는 것이 가능하다. 또는, 기준 계수가 변환 블록의 어떤 임의의 위치로부터 얼마나 멀리 떨어져있는지를 파악하여 기 설정된 임계값과 비교하여 설정할 수도 있다. 예를 들어 이 임의의 위치는 변환 블록의 가로와 세로의 중간 지점인 중심점일 수 있다. 또는, 변환 블록의 가로와 세로를 각각 m 및 n등분한 후 이 나눠진 영역들 중의 하나를 임의의 영역으로 결정하는 것 또한 가능하다. 여기서 m과 n의 값은 블록 단위 혹은 상위 헤더를 통해 부호화 하는 것 또한 가능하며, 부호화 및 복호화 시에 동일하게 기 설정된 값을 사용하는 것 또한 가능하다. As another embodiment of setting the skip region, if the number of coefficients present in the skip region is small because the reference coefficient is located in any arbitrary region in the transform block, the reverse scan order is not determined based on the reference coefficient. The skip region may be set using one of non-zero coefficients after the phase reference coefficient or a coefficient adjacent to the reference coefficient. Here, the arbitrary area in the transform block in which the reference coefficient is located can be set by comparing the number of sub-blocks calculated in the reverse scan order with a preset threshold. Alternatively, the reference coefficient may be set to determine how far from any arbitrary position of the transform block to compare with a preset threshold. For example, this arbitrary position may be a center point that is halfway between the transverse and vertical sides of the transform block. Alternatively, it is also possible to divide the width and length of the transform block by m and n, respectively, and determine one of these divided regions as an arbitrary region. In this case, the values of m and n may be encoded through block units or higher headers, and the same preset values may be used for encoding and decoding.
도 8은 본 발명의 다른 실시예에 따른 스킵 영역을 나타내는 도면이다. 변환 블록(800) 내의 기준 계수(801) 위치에서 변환 블록(800)내의 좌하측 코너에 존재하는 계수(802)의 위치로 기준선(803)을 생성한 후, 기준선(803) 상에 위치하는 계수들과 기준선(803)의 하단에 존재하는 계수들을 포함하는 영역을 스킵 영역으로 지정한다. 여기서 스킵 영역에 속하는 계수들은 기준 계수보다 부호화 순서상 뒤에 위치한다. 도 8 에서 스킵 영역은 음영으로 표시되어 있다.8 is a diagram illustrating a skip region according to another embodiment of the present invention. The coefficient located on the reference line 803 after generating the reference line 803 from the position of the reference coefficient 801 in the transform block 800 to the position of the coefficient 802 present in the lower left corner in the transform block 800. And a coefficient including the coefficients existing at the bottom of the reference line 803 are designated as a skip region. Here, the coefficients belonging to the skipped region are located later in the coding order than the reference coefficients. In FIG. 8, the skip region is indicated by the shade.
한편, 도 6에 도시되지는 아니하였으나, 단계 S601 및 S603에 의해 설정된 스킵 영역 이외에 추가적으로 스킵 영역을 설정할 수도 있다. 추가로 설정되는 스킵 영역은 추가 스킵 영역 정보를 이용하여 부호화될 수 있다. Although not shown in FIG. 6, a skip region may be additionally set in addition to the skip region set by steps S601 and S603. The skip region additionally set may be encoded using additional skip region information.
도 9는 본 발명의 일 실시예에 따른 추가 스킵 영역을 나타내는 도면이다. 도 7에 도시된 스킵 영역에 추가적으로 추가 스킵 영역이 도 9에 설정되어있다. 도 7의 스킵 영역 상측의 영역이 추가 스킵 영역으로 설정되고, 추가 스킵 영역 내의 계수들이 모두 같은 값인지 여부를 나타내는 추가 스킵 영역 정보가 부호화될 수 있다. 여기서, 스킵 영역 내의 계수들이 가지는 동일한 값은 0일 수 있다. 만약, 스킵 영역 내의 계수들이 가지는 동일한 값이 0이 아닌 경우, 0이 아닌 어떤 값인지를 나타내는 정보가 추가로 부호화될 수 있다. 스킵 영역 내의 계수들이 가지는 동일한 값으로서 0이 아닌 임의의 기 설정된 값을 사용하는 것도 가능하다. 이 경우, 기 설정된 값의 정보를 변환 블록 단위가 아닌 상위 헤더를 통해 부호화 하는 것이 가능하다. 9 is a diagram illustrating an additional skip area according to an embodiment of the present invention. An additional skip region is set in FIG. 9 in addition to the skip region illustrated in FIG. 7. An area above the skip area of FIG. 7 is set as an additional skip area, and additional skip area information indicating whether coefficients in the additional skip area are all the same value may be encoded. Here, the same value of the coefficients in the skipped region may be zero. If the same value of the coefficients in the skipped region is not 0, information indicating which value is not 0 may be further encoded. It is also possible to use any preset value other than zero as the same value of the coefficients in the skip region. In this case, it is possible to encode information of a predetermined value through an upper header rather than a transform block unit.
한편, 추가 스킵 영역의 위치는 기 설정된 규칙에 의해 부호화 및 복호화 과정에서 동일하게 결정될 수도 있고, 변환 블록 내의 좌표를 추가로 부호화 하여 부호화 장치(100) 및 복호화 장치(200)에서 동일한 위치를 이용할 수도 있다. 여기서 새롭게 생성된 추가 스킵 영역은 이전 스킵 영역부터 거리 p만큼 떨어질 수 있다. Meanwhile, the location of the additional skip region may be determined in the encoding and decoding process according to a predetermined rule, or the same position may be used in the encoding apparatus 100 and the decoding apparatus 200 by further encoding the coordinates in the transform block. have. In this case, the newly generated additional skip region may be separated by a distance p from the previous skip region.
도 9를 참조하면, 기준계수(701)를 기준으로 기준선(702)을 생성함으로써 스킵 영역이 설정되고, 추가적으로 기준선(702) 상단을 추가 스킵 영역으로 설정한 예시를 나타낸다. 추가 스킵 영역과 스킵 영역 간의 거리 p가 0인 경우, 기준선(703) 상의 계수들을 포함하는 영역이 추가 스킵 영역이 될 수 있다. 만약 거리 p가 1인 경우, 추가 스킵 영역은 기준선(703) 상의 계수들을 포함하는 영역과 기준선(704) 상의 계수들을 포함하는 영역을 포함한다. Referring to FIG. 9, a skip region is set by generating a reference line 702 based on the reference coefficient 701, and an example in which an upper portion of the reference line 702 is additionally set as a skip region. When the distance p between the additional skip area and the skip area is 0, an area including coefficients on the reference line 703 may be an additional skip area. If the distance p is 1, the additional skip region includes an area that includes the coefficients on the baseline 703 and an area that includes the coefficients on the baseline 704.
본 실시예에서 추가 스킵 영역과 스킵 영역 간의 거리 p는 0 또는 1인 경우를 예로 들었으나 그 외의 값이 이용될 수도 있다. 여기서 p는 부호화/복호화 과정에서 기 설정된 동일한 값이 사용될 수 있다. 혹은 p의 값을 블록단위로 부호화 하거나 상위 헤더를 통해 부호화 하는 것 또한 가능하다. In this embodiment, the distance p between the additional skip region and the skip region is 0 or 1, but other values may be used. Here, p may use the same preset value in the encoding / decoding process. Alternatively, the value of p may be encoded in a block unit or may be encoded through an upper header.
또한, 추가 스킵 영역은 기 설정된 방식에 의해 추가되는 것이 가능하다. 예를 들면, 추가 스킵 영역 정보가 거짓이 나올 때까지 계속해서 추가 스킵 영역을 추가하거나 혹은, 기 설정된 횟수 q만큼 부호화 하는 것 또한 가능하다. 여기서 추가되는 각 추가 스킵 영역마다 서로 다른 p를 설정하는 것이 가능하다. In addition, the additional skip region may be added by a preset method. For example, it is also possible to continue adding additional skip regions or to encode a predetermined number q until the additional skip region information is false. Here, it is possible to set a different p for each additional skip region added.
도 10은 본 발명의 일 실시예에 따라, 스킵 영역 또는 추가 스킵 영역을 포함하는 변환 블록을 부호화하는 방법을 나타내는 순서도이다. 도 10에 도시된 방법은 도 6에 도시된 방법 이후에 수행될 수 있다. 도 10의 부호화 방법은, 영상 부호화 장치(100)의 엔트로피 부호화부(107)에 의해 수행될 수 있다.10 is a flowchart illustrating a method of encoding a transform block including a skip region or an additional skip region according to an embodiment of the present invention. The method shown in FIG. 10 may be performed after the method shown in FIG. 6. The encoding method of FIG. 10 may be performed by the entropy encoding unit 107 of the image encoding apparatus 100.
현재 부호화 하려는 변환 블록 내의 서브 블록에 기준 계수가 포함이 되었다면 부호화 할 계수가 포함되었다는 뜻이기 때문에 서브 블록 정보인 Coded_sub_blk_flag가 부호화되지 않는다. 스킵 영역 정보 또는 추가 스킵 영역 정보가 참이고, 동시에 현재 부호화 하려는 서브 블록이 스킵 영역 또는 추가 스킵 영역을 포함하는지를 확인한다(S1001). 만약 위의 두 조건이 참이라면 현재 서브 블록 안에 위치하면서 부호화 순서상 스킵 영역 밖에 위치한 계수들을 선택한다(S1002). 만약 그게 아니라면, 스킵 영역과 상관 없이 부호화 해야 되는 계수들을 모두 선택한다(S1003). 이후 계수들의 0이 아닌 계수 정보 부호화(S1004), N 초과 계수 정보 부호화 (S1005), 부호 정보 부호화 (S1006), 잔차 계수 정보 부호화 (S1007)의 순서로 부호화된다. If a reference coefficient is included in a subblock in a current transform block to be encoded, it means that a coefficient to be encoded is included and thus coded_sub_blk_flag, which is subblock information, is not encoded. It is checked whether the skip region information or the additional skip region information is true, and at the same time, whether the subblock to be currently encoded includes the skip region or the additional skip region (S1001). If the above two conditions are true, coefficients located in the current subblock and located outside the skip region in the encoding order are selected (S1002). If not, all coefficients to be coded are selected regardless of the skip region (S1003). Thereafter, the coefficients are encoded in the order of nonzero coefficient information encoding (S1004), N excess coefficient information encoding (S1005), code information encoding (S1006), and residual coefficient information encoding (S1007).
그 후, 다음 서브 블록이 존재하는 경우(S1008), 다음 서브 블록으로 이동한다(S1009). 스킵 영역 정보 또는 추가 스킵 영역 정보가 참이고, 동시에 현재 부호화 하려는 서브 블록이 스킵 영역 또는 추가 스킵 영역을 포함하는지를 확인한다(S1010), 이미 스킵 영역 정보로 해당 서브 블록의 정보를 부호화 하였으므로 다음 서브 블록으로 이동한다. 단, 이 경우는 스킵 영역 내의 계수들의 값이 0인 경우에만 사용 가능하다. 만약 스킵 영역 내의 계수들의 값이 0이 아닌 경우에는, 해당 서브 블록 정보를 부호화 해야 한다. Thereafter, when the next subblock exists (S1008), the control moves to the next subblock (S1009). It is checked whether the skip region information or the additional skip region information is true, and at the same time, whether the subblock to be currently encoded includes the skip region or the additional skip region (S1010). Go to. However, this case can be used only when the values of the coefficients in the skipped region are zero. If the values of the coefficients in the skipped region are not 0, the corresponding subblock information should be encoded.
서브 블록이 스킵 영역 또는 추가 스킵 영역을 포함하지 않거나 혹은 스킵 영역 정보가 거짓이라면 서브 블록 정보를 부호화하고(S1011), 서브 블록 정보가 참인 경우(S1012), 단계 S1001로 이동하고, 거짓인 경우 단계 S1008로 이동한다. 단계 S1008로 이동 후 다음 서브 블록이 존재하지 않는다고 결정되면, 도 10의 알고리즘이 종료된다. If the subblock does not include the skip region or the additional skip region, or if the skip region information is false (S1011), if the sub block information is true (S1012), the process moves to step S1001, and if it is false, Move to S1008. If it is determined after the move to step S1008 that the next subblock does not exist, the algorithm of FIG. 10 ends.
이하, 도 6 및 도 10에 도시된 알고리즘을 도 7의 예시를 이용하여 추가적으로 설명한다. 현재 변환 블록에서 스캔 방법은 대각선 방향 역 스캔 순으로 가정하고, 처음으로 나온 0이 아닌 계수를 기준 계수로 설정한다. 기준 계수를 기준으로 왼쪽 아래 방향의 계수들과 그 아래의 계수들을 스킵 영역으로 설정한 후, 스킵 영역의 값을 모두 확인한다. 스킵 영역의 계수들이 모두 0으로 같은 값을 가지므로, 스킵 영역 정보는 참으로 부호화 한다. 서브 블록 단위로 나눈 후, 기준 계수가 포함된 서브 블록부터 부호화 한다.Hereinafter, the algorithm shown in FIGS. 6 and 10 will be further described using the example of FIG. 7. In the current transform block, the scan method assumes a diagonal reverse scan order, and sets the first nonzero coefficient as a reference coefficient. After setting the coefficients in the lower left direction and the coefficients below the reference region to the skip region based on the reference coefficients, the values of the skip regions are all checked. Since the coefficients of the skipped region all have the same value as 0, the skipped region information is encoded as true. After dividing by the sub-block unit, the sub block including the reference coefficient is encoded.
현재 변환 블록은 8x8 그리고 서브 블록은 4x4 크기를 예를 들어 설명한다. 첫 번째로 부호화 할 서브 블록의 스킵 영역 정보가 참이고 해당 서브 블록 안에 부호화 할 계수가 존재한다. 스킵 영역 밖의 계수들만 부호화 하기 때문에, 도 7에 도시된 예의 경우 기준 계수와 그 위에 존재하는 1, 0, 0, -2만 부호화 해주면 된다. 이 경우, 0이 아닌 계수 정보는 각각 참, 거짓, 거짓, 참이 된다. N이 2라고 가정하면, 0이 아니라고 판단된 계수에서만 1초과 정보를 부호화 한다. 계수 값 1 과 -2의 1초과 정보는 각각 거짓과 참이 설정된다. 2초과 정보는 1초과 정보가 참인 경우에만 부호화 되고 계수 값 -2의 2초과 정보는 거짓으로 부호화된다. 그 후, 계수 값 1 과 -2의 부호인 +와 -가 각각 부호화된다. 그 후, 다음 서브 블록이 존재하므로 다음 서브 블록으로 이동한다. For example, the current transform block is 8x8 and the subblock is 4x4. Firstly, skip region information of a subblock to be encoded is true, and there are coefficients to be encoded in the subblock. Since only coefficients outside the skipped region are encoded, in the example shown in FIG. 7, only the reference coefficient and 1, 0, 0, -2 existing thereon need to be encoded. In this case, the nonzero coefficient information becomes true, false, false, and true, respectively. Assuming that N is 2, only one information is encoded in only coefficients determined to be non-zero. More than one information of the coefficient values 1 and -2 is set to false and true, respectively. More than 2 information is encoded only if the more than 1 information is true, and more than 2 information of the coefficient value -2 is encoded as false. Thereafter, + and-which are signs of coefficient values 1 and -2 are encoded, respectively. Thereafter, since the next subblock exists, it moves to the next subblock.
두 번째로 부호화 할 서브 블록의 경우 스킵 영역 정보가 참이고, 해당 서브 블록 안에 부호화 할 계수가 존재하기 때문에 서브블록 정보는 참이 된다. 따라서 스킵 영역 밖의 계수들인 0, 0 및 1 만 부호화 한다. 계수들 0, 0 및 1의 0이 아닌 계수 정보는 각각 거짓, 거짓, 참이 부호화된 후, 계수 1의 1초과 정보만이 거짓으로 부호화 된다. 계수 1의 부호 정보는 +로 부호화되고, 다음 서브 블록으로 이동한다. For the second subblock to be encoded, the skip region information is true, and since the coefficient to be encoded exists in the corresponding subblock, the subblock information is true. Therefore, only coefficients 0, 0, and 1 outside the skipped region are encoded. The non-zero coefficient information of the coefficients 0, 0, and 1 is false, false, and true, respectively, and then only one piece of information of coefficient 1 is falsely encoded. The sign information of the coefficient 1 is encoded by + and moves to the next subblock.
세 번째로 부호화 할 서브 블록의 경우 스킵 영역 정보가 참이고 해당 서브 블록 안에 부호화 할 계수가 존재하기 때문에 서브블록 정보는 참이 된다. 스킵 영역 밖의 계수들을 역 스캔으로 정렬하면 0, 0, 0, 0, 0, 1, 1, 1, 1, -2, -2, 1, -3, 3, 10 이 된다. 이 계수들은 단계 S1004 ~ S1007을 이용하여 부호화된다.In the third subblock to be encoded, the subblock information is true because the skip region information is true and there are coefficients to be encoded in the corresponding subblock. Sorting the coefficients outside the skip region by reverse scan results in 0, 0, 0, 0, 0, 1, 1, 1, 1, -2, -2, 1, -3, 3, 10. These coefficients are encoded using steps S1004 to S1007.
도 11은 본 발명의 일 실시 예에 따라, 스킵 영역을 이용한 영상 복호화 방법을 나타내는 순서도이다. 도 11의 복호화 방법은, 영상 복호화 장치(100)의 엔트로피 부호화부(201)에 의해 수행될 수 있다.11 is a flowchart illustrating a method of decoding an image using a skip region according to an embodiment of the present invention. The decoding method of FIG. 11 may be performed by the entropy encoder 201 of the image decoding apparatus 100.
도 11을 참조하면, 먼저 엔트로피 복호화부(201)는 복호화할 현재 변환 블록 내의 기준 계수의 위치를 복호화 한다(S1101). 그 후, 기준 계수의 위치에 기초하여 선택된 스킵 영역에 대한 스킵 영역 정보를 복호화한다 (S1103). 전술한 바와 같이 기준 계수의 위치는 Last_sig를 복호함으로써 유도될 수 있다. 스킵 영역 및 스킵 영역 정보는 앞에서 설명한 바와 동일하기 때문에 자세한 설명은 생략한다. 또한, 도 11에 별도로 도시되지는 아니하였으나, 스킵 영역 이외에 추가적으로 설정된 추가 스킵 영역이 있다면, 추가 스킵 영역은 추가 스킵 영역 정보를 이용하여 복호화될 수 있다. Referring to FIG. 11, first, the entropy decoding unit 201 decodes a position of a reference coefficient in a current transform block to be decoded (S1101). Thereafter, the skip region information for the selected skip region is decoded based on the position of the reference coefficient (S1103). As described above, the position of the reference coefficient can be derived by decoding Last_sig. Since the skip region and the skip region information are the same as described above, a detailed description thereof will be omitted. In addition, although not separately illustrated in FIG. 11, if there is an additional skip region additionally set in addition to the skip region, the additional skip region may be decoded using additional skip region information.
도 12는 본 발명의 일 실시예에 따라, 스킵 영역 또는 추가 스킵 영역을 포함하는 변환 블록을 복호화하는 방법을 나타내는 순서도이다. 도 12에 도시된 방법은 도 11에 도시된 방법 이후에 수행될 수 있다. 도 12의 복호화 방법은, 영상 복호화 장치(200)의 엔트로피 복호화부(201)에 의해 수행될 수 있다.12 is a flowchart illustrating a method of decoding a transform block including a skip region or an additional skip region according to an embodiment of the present invention. The method shown in FIG. 12 may be performed after the method shown in FIG. The decoding method of FIG. 12 may be performed by the entropy decoding unit 201 of the image decoding apparatus 200.
도 12에 도시된 방법은 도 10에 도시된 방법과 실질적으로 동일하므로 상세한 설명은 생략한다. 다만, 도 10에서는, 스킵 영역 정보, 추가 스킵 영역 정보, 서브 블록 정보 Coded_sub_blk_flag, 0이 아닌 계수 정보, N 초과 계수 정보, 부호 정보 및 잔차 계수 정보 등이 부호화되었지만, 도 12에서는 이들 정보들이 복호화된다는 점에 차이가 있다. Since the method shown in FIG. 12 is substantially the same as the method shown in FIG. 10, a detailed description thereof will be omitted. In FIG. 10, skip region information, additional skip region information, sub block information Coded_sub_blk_flag, nonzero coefficient information, N excess coefficient information, code information, residual coefficient information, and the like are encoded, but in FIG. 12, these information are decoded. There is a difference in points.
도 11및 도 12에 도시된 알고리즘을 도 7의 예시를 이용하여 추가적으로 설명한다. 현재 변환 블록에서의 기준 계수의 위치 정보 Last_sig를 복호화 한 후 기준 계수를 설정한다. 기준 계수의 위치에 기초하여 스킵 영역이 설정되고, 스킵 영역 정보가 복호화 된다. 이 예제에서는 스킵 영역 정보는 참이다. 변환 블록을 서브 블록 단위로 나눈 후, 기준 계수가 포함된 서브 블록부터 복호화 한다. The algorithms shown in FIGS. 11 and 12 are further described using the example of FIG. 7. After decoding the position information Last_sig of the reference coefficient in the current transform block, the reference coefficient is set. The skip area is set based on the position of the reference coefficient, and the skip area information is decoded. In this example, the skip region information is true. After dividing the transform block into subblock units, the first block is decoded from the subblock including the reference coefficient.
현재 변환 블록은 8x8 그리고 서브 블록은 4x4 크기를 예를 들어 설명한다. 첫 번째로 복호화 할 서브 블록의 경우 스킵 영역 정보가 참이고, 해당 서브 블록 안에 복호화 할 계수가 존재한다. 스킵 영역 밖의 계수들만 복호화 하기 때문에, 도 7에 도시된 예의 경우 기준 계수와 그 위에 존재하는 1, 0, 0, -2만 복호화하면 된다. 이 경우, 0이 아닌 계수 정보의 복호된 값은 각각 참, 거짓, 거짓, 참이 된다. N이 2라고 가정하면, 0이 아니라고 판단된 계수에서만 1초과 정보를 복호화 한다. 계수 값 1 과 -2의 1초과 정보는 각각 거짓과 참으로 복호 된다. 2초과 정보는 1초과 정보가 참인 경우에만 복호화 되고 계수 값 -2의 2초과 정보는 거짓으로 복호화된다. 그 후, 계수 값 1 과 -2의 부호인 +와 -가 각각 복호된다. 그 후, 다음 서브 블록이 존재하므로 다음 서브 블록으로 이동한다. For example, the current transform block is 8x8 and the subblock is 4x4. For the first subblock to be decoded, the skip region information is true, and there are coefficients to be decoded in the corresponding subblock. Since only coefficients outside the skipped region are decoded, only the reference coefficient and 1, 0, 0, and -2 present in the case illustrated in FIG. 7 need to be decoded. In this case, the decoded values of the nonzero coefficient information become true, false, false, and true, respectively. Assuming that N is 2, only one piece of information is decoded only in coefficients determined to be non-zero. More than one information of the coefficient values 1 and -2 is decoded as false and true, respectively. More than 2 information is decoded only if the more than 1 information is true, and more than 2 information of the coefficient value -2 is decoded false. Thereafter, + and-which are the signs of the coefficient values 1 and -2 are respectively decoded. Thereafter, since the next subblock exists, it moves to the next subblock.
두 번째로 복호화 할 서브 블록의 경우 스킵 영역 정보가 참이고, 해당 서브 블록 안에 복호화 할 계수가 존재하기 때문에 서브블록 정보는 참이 된다. 따라서 스킵 영역 밖의 계수들인 0, 0 및 1 만 복호화 한다. 계수들 0, 0 및 1의 0이 아닌 계수 정보는 각각 거짓, 거짓, 참이 복호화된 후, 계수 1의 1초과 정보만이 거짓으로 복호화 된다. 계수 1의 부호 정보는 +로 복호화되고, 다음 서브 블록으로 이동한다. In the second subblock to be decoded, the skip region information is true, and since the coefficient to be decoded exists in the corresponding subblock, the subblock information is true. Therefore, only 0, 0, and 1 coefficients outside the skip region are decoded. The non-zero coefficient information of the coefficients 0, 0, and 1 is decoded false, false, and true, respectively, and then only one time information of coefficient 1 is decoded false. The sign information of the coefficient 1 is decoded to + and moved to the next subblock.
세 번째로 복호화 할 서브 블록의 경우 스킵 영역 정보가 참이고 해당 서브 블록 안에 복호화 할 계수가 존재하기 때문에 서브블록 정보는 참이 된다. 스킵 영역 밖의 계수들을 역 스캔으로 정렬하면 0, 0, 0, 0, 0, 1, 1, 1, 1, -2, -2, 1, -3, 3, 10 이 된다. 이 계수들은 단계 S1204 ~ S1207을 이용하여 복호화된다.Thirdly, in case of a subblock to be decoded, since the skip area information is true and a coefficient to be decoded exists in the corresponding subblock, the subblock information is true. Sorting the coefficients outside the skip region by reverse scan results in 0, 0, 0, 0, 0, 1, 1, 1, 1, -2, -2, 1, -3, 3, 10. These coefficients are decoded using steps S1204 to S1207.
(제2 실시예)(2nd Example)
이하, 도면들을 참조하면서 본 발명의 제2 실시예를 설명한다. Hereinafter, a second embodiment of the present invention will be described with reference to the drawings.
부호화 된 정보들은 이진화 과정을 통해 문맥 적응적 이진화 산술 과정이 수행된다. 문맥 적응적 이진화 산술 과정이란 블록 내의 부호화 된 정보를 심볼화하고 상황에 따라 확률 정보를 이용하여 심볼의 발생 확률을 다르게 적용하고 부호화 하는 과정을 말한다. 본 실시예에서는 설명의 편의성을 위해 심볼을 0과 1만을 사용하였지만, 심볼의 개수는 N개(N은 2이상의 자연수)가 사용될 수 있다. The encoded information is subjected to context-adaptive binarization arithmetic through a binarization process. Context-adaptive binarization arithmetic refers to a process of symbolizing encoded information in a block and applying and encoding the occurrence probability of symbols differently using probability information according to a situation. In the present embodiment, only 0 and 1 symbols are used for convenience of description, but N symbols (N is a natural number of 2 or more) may be used.
확률 정보란 이진화 된 정보에서 0과 1의 발생 확률을 말한다. 두 정보의 발생 확률을 이전 복원된 정보에 따라서 동일하게 할 수도 있고, 다르게 할 수도 있다. 정보에 따라 N개의 확률 정보를 가질 수도 있다. Probability information refers to the probability of occurrence of 0 and 1 in the binarized information. The occurrence probability of the two pieces of information may be the same or different depending on the previously restored information. It may have N probability information according to the information.
도 13은 본 발명의 일 실시예에 따른 문맥 적응적 이진화 산술 부호화 방법을 나타내는 흐름도이다. 먼저, 확률 초기화가 수행된다(S1301). 확률 초기화란 이진화 된 정보들을 확률 정보에 설정되어 있는 확률로 확률 구간을 나누는 과정이다. 단, 어떤 확률 정보를 사용할 것인지는 부호화 장치 또는 복호화 장치에서 임의로 기 설정된 규칙에 의해 동일한 조건을 사용할 수도 있고, 별도로 확률 정보가 부호화 될 수도 있다. 초기 확률 구간은 기 설정된 규칙에 의해 부호화/복호화 과정에서 동일하게 결정될 수도 있다. 또는 초기 확률 구간을 새로 부호화하여 사용 할 수도 있다. 13 is a flowchart illustrating a context-adaptive binarization arithmetic coding method according to an embodiment of the present invention. First, probability initialization is performed (S1301). Probability initialization is a process of dividing the probability section by the probability set in the probability information. However, as to what kind of probability information is to be used, the same condition may be used by a predetermined rule in the encoding apparatus or the decoding apparatus, or the probability information may be separately encoded. The initial probability interval may be determined in the same manner in the encoding / decoding process according to a preset rule. Alternatively, the initial probability interval may be newly encoded.
부호화할 현재 코딩 파라미터의 이진 정보가 결정되면 (S1302), 현재 코딩 파라미터의 이진화 된 정보는 단계 S1302 이전 단계까지의 확률 구간 상태와, 동일 코딩 파라미터의 이전 확률 정보를 이용하여 부호화된다(S1303). 이후에 부호화될 이진 정보들을 위해 확률 정보와 확률 구간이 업데이트(S1304)된 후, 다음 부호화될 코딩 파라미터 정보가 존재하는 경우(S1305), 다음 코딩 파라미터 정보로 이동하여(S1306), 전술한 과정을 반복한다. 만약 다음 부호화될 코딩 파라미터 정보가 존재하지 않는다면 본 흐름도는 종료된다.When the binary information of the current coding parameter to be encoded is determined (S1302), the binarized information of the current coding parameter is encoded using the probability interval state up to the step before the step S1302 and the previous probability information of the same coding parameter (S1303). After the probability information and the probability interval are updated (S1304) for the binary information to be encoded later (S1305), if the coding parameter information to be encoded next (S1305) moves to the next coding parameter information (S1306), the above-described process is performed. Repeat. If there is no coding parameter information to be encoded next, the flowchart ends.
도 14는 본 발명의 일 실시예에 따른 문맥 적응적 이진화 산술 복호화 방법을 나타내는 흐름도이다. 부호화 장치와 달리, 복호화 장치에서는 확률 정보 및 구간을 이용하여 코딩 파라미터의 이진 정보를 복호화(S1402)한 후, 현재 코딩 파라미터의 이진 정보를 결정(S1403)한다. 이 외 도 14의 복호화 방법은 도 13의 부호화 방법에 대응되므로 상세한 설명은 생략한다.14 is a flowchart illustrating a context-adaptive binarization arithmetic decoding method according to an embodiment of the present invention. Unlike the encoding apparatus, the decoding apparatus decodes binary information of a coding parameter using probability information and an interval (S1402), and then determines binary information of a current coding parameter (S1403). In addition, since the decoding method of FIG. 14 corresponds to the encoding method of FIG. 13, detailed description thereof will be omitted.
상기 설명한 도 13 및 14의 단계 S1303과 S1402 에서, 각 코딩 파라미터 별로 주변에 이미 복원된 정보들을 이용하여 기 설정된 N개의 확률 정보들 중, 최적 확률 정보를 선택적으로 사용하여 부호화 또는 복호화가 진행될 수 있다. 예를 들어, 양자화된 변환 블록에 속한 정보의 확률 정보는 변환 블록의 크기에 따라 정보가 발생할 확률이 높은 확률 정보를 사용할 수도 있다. In steps S1303 and S1402 of FIGS. 13 and 14 described above, encoding or decoding may be performed by selectively using optimal probability information among N pieces of probability information preset by using information reconstructed around each coding parameter. . For example, the probability information of the information belonging to the quantized transform block may use probability information having a high probability of generating information according to the size of the transform block.
또는, 현재 부호화 또는 복호화 할 계수의 주변 계수들의 정보에 따라 확률 정보를 다르게 적용할 수 있고, 이전의 부호화 또는 복호화된 정보의 확률 정보를 이용하여 현재 부호화 또는 복호화 하는 정보의 확률 정보를 선택할 수도 있다. Alternatively, the probability information may be differently applied according to the information of the neighboring coefficients of the coefficient to be currently encoded or decoded, and the probability information of the information currently encoded or decoded may be selected using the probability information of the previously encoded or decoded information. .
도 15a 내지 15c는 주변 계수들의 정보에 따라 확률 정보를 다르게 적용한 일 예를 나타내는 도면이다. 도 15b는 현재 계수의 Sig_coeff_flag 정보값을 부호화 또는 복호화에 사용되는 확률 정보 테이블의 예시이다. 도 15b를 참조하면, 현재 부호화 또는 복호화 할 계수(1501)와 인접한 계수들 중 현재 계수(1501)의 Sig_coeff_flag 정보값1과 동일한 정보값을 갖는 계수의 수가 1개인 경우, 현재 계수(1501)에는 인덱스 8이 할당된다. 이 때 현재 계수(1501)의 Sig_coeff_flag 이진정보인 심볼 1의 확률은 61% 이고 심볼 0의 확률은 39%가 된다. 만약, 현재 계수(1501)의 Sig_coeff_flag 정보값과 동일한 정보값을 갖는 주변 계수의 수가 2개인 경우 현재 계수(1501)에는 인덱스 5가 할당되고, 이 때의 현재 계수(1501)의 Sig_coeff_flag 이진정보인 심볼 1의 확률은 71% 이고 심볼 0의 확률은 29%이다. 만약 현재 계수(1501)의 Sig_coeff_flag 정보값과 동일한 정보값을 갖는 주변 계수의 수가 3개인 경우 현재 계수(1501)에는 인덱스 2가 할당되고 현재 계수(1501)의 Sig_coeff_flag 이진정보인 심볼 1의 확률은 87%, 심볼 0의 확률은 13%이 된다. 도 15b에 도시된 확률 정보 테이블을 이용하여 현재 계수(1501)가 부호화 또는 복호화된 후 도 15c와 같이 확률 정보는 업데이트될 수 있다.15A to 15C are diagrams illustrating an example in which probability information is differently applied according to information of neighboring coefficients. 15B is an example of a probability information table used for encoding or decoding a Sig_coeff_flag information value of a current coefficient. Referring to FIG. 15B, when the number of coefficients having the same information value as the Sig_coeff_flag information value 1 of the current coefficient 1501 among the coefficients 1501 adjacent to the current encoding or decoding information is 1, an index is included in the current coefficient 1501. 8 is allocated. At this time, the probability of symbol 1, which is the Sig_coeff_flag binary information of the current coefficient 1501, is 61%, and the probability of symbol 0 is 39%. If the number of neighboring coefficients having the same information value as the Sig_coeff_flag information value of the current coefficient 1501 is two, the index is assigned to the current coefficient 1501, and the symbol that is the Sig_coeff_flag binary information of the current coefficient 1501 at this time. The probability of 1 is 71% and the probability of symbol 0 is 29%. If the number of neighboring coefficients having the same information value as the Sig_coeff_flag information value of the current coefficient 1501 is three, the index is assigned to the current coefficient 1501 and the probability of symbol 1, which is the Sig_coeff_flag binary information of the current coefficient 1501, is 87. The probability of% and symbol 0 is 13%. After the current coefficient 1501 is encoded or decoded using the probability information table illustrated in FIG. 15B, the probability information may be updated as shown in FIG. 15C.
한편, 0이 아닌 계수 정보 Sig_coeff_flag의 경우, 저주파 영역에 가까울수록, 0이 아닌 계수 정보의 발생 확률이 높은 확률 정보가 사용될 수 있다. N 초과 계수 정보의 확률 정보는 직전에 부호화/복호화한 N 초과 계수 정보의 확률 정보를 이용하여 현재의 N 초과 계수 정보의 확률 정보를 설정하거나, 서브 블록 단위로 처음 부호화/복호화 하는 N 초과 계수 정보의 확률 정보를 그대로 사용할 수도 있다. 서브 블록 정보는 주변의 부호화/복호화 된 M개의 서브 블록 확률 정보를 이용하거나 직전에 부호화/복호화 된 서브블록의 확률정보를 이용할 수도 있다. On the other hand, in the case of non-zero coefficient information Sig_coeff_flag, probability information having a higher probability of generating non-zero coefficient information may be used closer to the low frequency region. For the probability information of the N excess coefficient information, the probability information of the current N excess coefficient information is set by using the probability information of the N excess coefficient information previously encoded / decoded, or the N excess coefficient information first encoded / decoded in units of sub blocks. Can be used as is. The subblock information may use neighboring coded / decoded M subblock probability information or use probability information of the immediately encoded / decoded subblock.
도 16a 내지 16c는 주파수 영역의 변환 블록을 복수의 영역으로 분할하는 다양한 실시예들을 나타내는 도면이다. 도 16a 내지 16c를 참조하면, 변환 블록은 주파수 A 영역(1601, 1604, 1607), 주파수 B 영역 (1602, 1605, 1608) 및 주파수 C 영역 (1603, 1606, 1609)의 세 영역으로 구분될 수 있다. 각 영역은 변환 블록의 스캔 방향에 따라서 적응적으로 결정될 수 있는데, 도 16a는 변환 블록의 스캔 방향이 대각선 방향일 때, 도 16b는 스캔 방향이 가로 방향일 때, 도 16c는 스캔 방향이 세로 방향일 때의 주파수 영역 구분 방법에 대한 예시이다. 주파수 A 영역(1601, 1604, 1607)은 0이 아닌 계수 계수 정보가 발생할 확률이 가장 높은 저주파 영역이고, 주파수 B 영역(1602, 1605, 1608)은 A 영역(1601, 1604, 1607)보다는 0이 아닌 계수 정보가 덜 발생하고, 주파수 C 영역(1603, 1606, 1609)은 고주파 영역으로써 A영역(1601, 1604, 1607), B 영역(1602, 1605, 1608)보다는 0이 아닌 계수 정보가 가장 덜 발생하는 영역임을 이용하여 확률 정보를 각 영역 별로 달리 설정할 수 있다. 주파수 A 영역(1601, 1604, 1607), 주파수 B 영역 (1602, 1605, 1608) 및 주파수 C 영역 (1603, 1606, 1609)은 변환 블록의 좌상측 코너에 위치한 DC 계수로부터의 거리에 따라 구분되었다고 볼 수도 있다.16A to 16C illustrate various embodiments of dividing a transform block of a frequency domain into a plurality of regions. Referring to FIGS. 16A through 16C, a transform block may be divided into three regions, a frequency A region 1601, 1604, and 1607, a frequency B region 1602, 1605, and 1608, and a frequency C region 1603, 1606, and 1609. have. Each region may be adaptively determined according to the scan direction of the transform block. FIG. 16A illustrates a diagonal direction, FIG. 16B illustrates a scan direction in a horizontal direction, and FIG. 16C illustrates a scan direction in a vertical direction. This is an example of a frequency domain classification method when. The frequency A regions 1601, 1604, and 1607 are low frequency regions with the highest probability of generating coefficient coefficient information other than zero, and the frequency B regions 1602, 1605, and 1608 have zero values than the A regions 1601, 1604, and 1607. Less non-coefficient information occurs, and the frequency C regions 1603, 1606, and 1609 are high frequency regions, and the non-zero coefficient information is less than that of the A regions 1601, 1604, and 1607, and the B regions 1602, 1605, and 1608. Probability information may be set differently for each region by using the generated region. The frequency A regions 1601, 1604, 1607, the frequency B regions 1602, 1605, and 1608 and the frequency C regions 1603, 1606, and 1609 are divided according to the distance from the DC coefficient located in the upper left corner of the transform block. You can see.
도 15b의 확률 정보 테이블을 다시 참조하면, 현재 부호화 또는 복호화 할 계수가 A영역(1601, 1604, 1607)에 속하는 경우, 현재 계수에는 인덱스 8이 할당되고 심볼 1의 확률은 61% 이고 심볼 0의 확률은 39%가 된다. 만약, 현재 계수가 B 영역(1602, 1605, 1608)에 속하는 경우 현재 계수에는 인덱스 5가 할당되고 심볼 1의 확률은 71% 이고 심볼 0의 확률은 29%가 된다. 만약 현재 계수가 C영역(1603, 1606, 1609)에 속하는 경우 현재 계수에는 인덱스 2가 할당되고 심볼 1의 확률은 87% 이고 심볼 0의 확률은 13%이 된다. 도 15b에 도시된 확률 정보 테이블을 이용하여 현재 계수가 부호화 또는 복호화된 후 도 15c와 같이 확률 정보는 업데이트될 수 있다. Referring again to the probability information table of FIG. 15B, when the current coefficient to be encoded or decoded belongs to the area A (1601, 1604, 1607), the current coefficient is assigned an index 8, the probability of symbol 1 is 61%, and the symbol 0 is The probability is 39%. If the current coefficient belongs to the B regions 1602, 1605, and 1608, an index 5 is assigned to the current coefficient, the probability of symbol 1 is 71%, and the probability of symbol 0 is 29%. If the current coefficient belongs to the C regions 1603, 1606, and 1609, index 2 is assigned to the current coefficient, the probability of symbol 1 is 87%, and the probability of symbol 0 is 13%. After the current coefficient is encoded or decoded using the probability information table illustrated in FIG. 15B, the probability information may be updated as shown in FIG. 15C.
0이 아닌 계수 정보, N 초과 계수 정보, 서브 블록 정보의 확률 정보는 A영역(1601, 1604, 1607)에 가까워질수록 발생 확률이 높은 확률 정보를 이용할 수 있고, N 초과 계수 정보의 확률 정보는 0이 아닌 계수 정보를 참고하여 확률 정보를 선택할 수 있다. 주파수 영역 분할은 부호화/복호화 장치에서 동일한 조건으로 분할할 수도 있고, 별도의 분할 정보를 부호화하여 복호화 장치로 전송할 수도 있다.Probability information of non-zero coefficient information, N excess coefficient information, and sub-block information may use probability information having a higher probability of occurrence as the region A (1601, 1604, 1607) becomes closer. Probability information can be selected by referring to non-zero coefficient information. The frequency domain segmentation may be split under the same condition in the encoding / decoding apparatus, or may be transmitted by encoding separate segmentation information to the decoding apparatus.
도 17은 본 발명의 일 실시예에 따른 산술 부호화 방법을 나타내는 순서도이다. 도 17을 참조하면, 부호화할 변환 계수의 값을 이진화하여 이진화된 정보가 유도된다 (S1701). 변환 블록 내에서의 상기 변환 계수의 위치에 따라, 상기 이진화된 정보의 부호화에 적용할 확률 정보가 결정된다 (S1703). 도 16a 에 도시된 예를 참조하면, 부호화할 현재 계수가 주파수 A 영역(1601), 주파수 B 영역 (1602) 또는 주파수 C 영역 (1603) 중 어느 영역에 속하는지에 따라 적용될 확률정보가 결정된다. 여기서, 주파수 A 영역(1601), 주파수 B 영역 (1602) 및 주파수 C 영역 (1603)은 변환 블록의 좌상측 코너에 위치한 DC 계수로부터의 거리에 따라 구분되었다고 볼 수 있다.17 is a flowchart illustrating an arithmetic coding method according to an embodiment of the present invention. Referring to FIG. 17, binarized information is derived by binarizing a value of a transform coefficient to be encoded (S1701). Probability information to be applied to the encoding of the binarized information is determined according to the position of the transform coefficient in the transform block (S1703). Referring to the example illustrated in FIG. 16A, probability information to be applied is determined according to which region of the frequency A region 1601, the frequency B region 1602, or the frequency C region 1603 is included. Here, the frequency A region 1601, the frequency B region 1602, and the frequency C region 1603 may be classified according to distances from the DC coefficients located at the upper left corner of the transform block.
도 18은 본 발명의 일 실시예에 따른 산술 복호화 방법을 나타내는 순서도이다. 도 18을 참조하면, 비트스트림으로부터 산술부호화된 변환 계수의 값이 추출된다 (S1801). 변환 블록 내에서의 상기 변환 계수의 위치에 따라, 상기 산술부호화된 변환 계수의 복호화에 적용할 확률 정보가 결정된다 (S1803). 전술한 바와 같이, 도 16a 에 도시된 예를 참조하면, 복호화할 현재 계수가 주파수 A 영역(1601), 주파수 B 영역 (1602) 또는 주파수 C 영역 (1603) 중 어느 영역에 속하는지에 따라 적용될 확률정보가 결정될 수 있다. 여기서, 주파수 A 영역(1601), 주파수 B 영역 (1602) 및 주파수 C 영역 (1603)은 변환 블록의 좌상측 코너에 위치한 DC 계수로부터의 거리에 따라 구분되었다고 볼 수 있다.18 is a flowchart illustrating an arithmetic decoding method according to an embodiment of the present invention. Referring to FIG. 18, arithmetic encoded transform coefficient values are extracted from the bitstream (S1801). Probability information to be applied to decoding the arithmetic-coded transform coefficient is determined according to the position of the transform coefficient in the transform block (S1803). As described above, referring to the example illustrated in FIG. 16A, the probability information to be applied depends on which of the frequency A region 1601, the frequency B region 1602, or the frequency C region 1603 is included in the decoding. Can be determined. Here, the frequency A region 1601, the frequency B region 1602, and the frequency C region 1603 may be classified according to distances from the DC coefficients located at the upper left corner of the transform block.
도 19a 내지 19c와 20을 참조하여 본 발명의 다른 실시예에 따른, 산술부호화 및 산술복호화를 설명한다. Arithmetic encoding and arithmetic decoding according to another embodiment of the present invention will be described with reference to FIGS. 19A to 19C and 20.
본 실시예에서는, 도 7 내지 9에 도시된 스킵 영역을 이용한, 양자화된 변환 계수의 부호화 방법이 사용된 경우, 스킵 영역이 사용된 경우와 사용되지 않은 경우에 따라서, 현재 정보를 부호화 또는 복호화할 때 서로 다른 확률 정보가 사용된다.In the present embodiment, when the method of encoding the quantized transform coefficients using the skip regions shown in FIGS. 7 to 9 is used, the current information is encoded or decoded according to whether the skip region is used or not. When different probability information is used.
도 19a에 도시된 계수 현재 계수(1901)의 부호화 또는 복호화를 위하여 도 19b 또는 19c에 도시된 확률 정보 테이블이 사용된다고 가정한다. 도 19b에 도시된 확률 정보 테이블은 스킵 영역이 사용되지 않는 경우에 적용될 확률 정보 테이블이고, 도 19c에 도시된 확률 정보 테이블은 스킵 영역이 사용되는 경우에 적용되는 확률 정보 테이블이다.It is assumed that the probability information table shown in FIG. 19B or 19C is used for encoding or decoding the coefficient current coefficient 1901 shown in FIG. 19A. The probability information table shown in FIG. 19B is a probability information table to be applied when a skip region is not used, and the probability information table shown in FIG. 19C is a probability information table applied when a skip region is used.
도 19a를 참조하면, 현재 계수(1901)가 속하는 변환 블록 또는 서브 블록에 스킵 영역이 존재하므로, 현재 계수(1901)의 부호화 또는 복호화를 위하여 도 19c에 도시된 확률 정보 테이블이 적용된다. 따라서, 예컨대 현재 계수(1901)에는 인덱스 5가 할당된다. 이 경우 심볼 1의 확률은 71% 이고 심볼 0의 확률은 29%가 된다. Referring to FIG. 19A, since a skip region exists in a transform block or subblock to which the current coefficient 1901 belongs, the probability information table illustrated in FIG. 19C is applied to encode or decode the current coefficient 1901. Thus, for example, index 5 is assigned to the current coefficient 1901. In this case, the probability of symbol 1 is 71% and the probability of symbol 0 is 29%.
또는, 주변 계수에서 N 초과 계수의 개수에 따라 확률 정보를 다르게 적용할 수 있다. 0이 아닌 계수 정보와 N 초과 계수 정보는 주변에 부호화/복호화 된 정보들의 개수와 주파수 영역의 위치에 따라 발생 확률이 높은 확률 정보를 이용할 수 있고, 주파수 C영역이면서 스킵 영역 주변에 위치한 계수인 경우, 0이 아닌 계수 정보, N 초과 계수 정보, 서브 블록 정보의 발생 확률이 낮은 확률 정보를 적용할 수도 있다. Alternatively, probability information may be applied differently according to the number of N excess coefficients in the peripheral coefficients. Non-zero coefficient information and N excess coefficient information may use probability information having a high probability of occurrence according to the number of encoded / decoded information and the position of the frequency domain, and the coefficients located in the frequency C region and the skip region. , Probability information having a low probability of generating non-zero coefficient information, N excess coefficient information, and subblock information may be applied.
도 20은 본 발명의 다른 실시예에 따른 산술 부호화 또는 복호화 방법을 나타내는 순서도이다. 도 19a 내지 19c를 참조하면서 앞에서 설명한 바와 같이, 스킵 영역이 사용된 경우와 사용되지 않은 경우에 따라서, 현재 정보를 부호화 또는 복호화할 때 서로 다른 확률 정보를 사용한다.20 is a flowchart illustrating an arithmetic encoding or decoding method according to another embodiment of the present invention. As described above with reference to FIGS. 19A to 19C, different probability information is used when encoding or decoding current information according to a case where a skip region is used and a case where the skip region is not used.
도 20을 참조하면, 먼저 부호화 또는 복호화할 현재 변환 블록 내의 기준 계수의 위치가 부호화 또는 복호화된다 (S2001). 그 후, 상기 기준 계수의 위치에 기초하여 선택된 스킵 영역에 대한 스킵 영역 정보가 부호화 또는 복호화된다 (S2003). 상기 스킵 영역에 포함되지 않은 변환 계수의 값을 이진화하여 이진화된 정보가 얻어지면, 복수의 확률 정보 테이블들 중에서, 상기 이진화된 정보의 부호화에 적용할 확률 정보 테이블이 선택된다 (S2005). 여기서, 상기 복수의 확률 정보 테이블은 스킵 영역이 사용되는 경우를 위한 테이블과 스킵 영역이 사용되지 않는 경우를 위한 테이블의 적어도 두 개를 포함한다.Referring to FIG. 20, first, a position of a reference coefficient in a current transform block to be encoded or decoded is encoded or decoded (S2001). Thereafter, skip region information for the skip region selected based on the position of the reference coefficient is encoded or decoded (S2003). When binarized information is obtained by binarizing a value of a transform coefficient not included in the skip region, a probability information table to be applied to encoding the binarized information is selected from a plurality of probability information tables (S2005). Here, the plurality of probability information tables includes at least two tables for a case where a skip region is used and a table for a case where the skip region is not used.
부호화 된 정보들은 이진화 과정을 통해 문맥 적응적 이진화 산술 과정이 수행된다. 문맥 적응적 이진화 산술 과정이란 블록 내의 부호화 된 정보를 심볼화하고 상황에 따라 확률 정보를 이용하여 심볼의 발생 확률을 다르게 적용하고 부호화 하는 과정을 말한다. 본 예시에서는 설명의 편의성을 위해 심볼을 0과 1만을 사용하였지만, 심볼의 개수는 N개(N은 2이상의 자연수)가 사용될 수 있다. The encoded information is subjected to context-adaptive binarization arithmetic through a binarization process. Context-adaptive binarization arithmetic refers to a process of symbolizing encoded information in a block and applying and encoding the occurrence probability of symbols differently using probability information according to a situation. In this example, only 0 and 1 symbols are used for convenience of description, but N symbols (N is a natural number of 2 or more) may be used.
확률 정보란 이진화 된 정보에서 0과 1의 발생 확률을 말한다. 두 정보의 발생 확률을 이전 복원된 정보에 따라서 동일하게 할 수도 있고, 다르게 할 수도 있다. 정보에 따라 N개의 확률 정보를 가질 수도 있다.Probability information refers to the probability of occurrence of 0 and 1 in the binarized information. The occurrence probability of the two pieces of information may be the same or different depending on the previously restored information. It may have N probability information according to the information.
도 21은 문맥 적응적 이진화 산술 부호화 방법을 나타내는 흐름도이다. 먼저, 확률 초기화가 수행된다(S2101). 확률 초기화란 이진화 된 정보들을 확률 정보에 설정되어 있는 확률로 확률 구간을 나누는 과정이다. 단, 어떤 확률 정보를 사용할 것인지는 부호화 장치 또는 복호화 장치에서 임의로 기 설정된 규칙에 의해 동일한 조건을 사용할 수도 있고, 별도로 확률 정보가 부호화 될 수도 있다. 초기 확률 구간은 기 설정된 규칙에 의해 부호화/복호화 과정에서 동일하게 결정될 수도 있다. 또는 초기 확률 구간을 새로 부호화하여 사용 할 수도 있다. 21 is a flowchart illustrating a context-adaptive binarization arithmetic coding method. First, probability initialization is performed (S2101). Probability initialization is a process of dividing the probability section by the probability set in the probability information. However, as to what kind of probability information is to be used, the same condition may be used by a predetermined rule in the encoding apparatus or the decoding apparatus, or the probability information may be separately encoded. The initial probability interval may be determined in the same manner in the encoding / decoding process according to a preset rule. Alternatively, the initial probability interval may be newly encoded.
부호화할 현재 코딩 파라미터의 이진 정보가 결정되면 (S2102), 현재 코딩 파라미터의 이진화 된 정보는 도 21의 단계 S2102의 이전 단계까지의 확률 구간 상태와, 동일 코딩 파라미터의 이전 확률 정보를 이용하여 부호화된다(S2103). 그리고, 이후에 부호화될 이진 정보들을 위해 확률 정보와 확률 구간이 업데이트(S2104)될 수 있다. 그리고, 다음 부호화될 코딩 파라미터 정보가 존재하는 경우(S2105), 다음 코딩 파라미터 정보로 이동하여(S2106), 전술한 과정을 반복한다. 만약 다음 부호화될 코딩 파라미터 정보가 존재하지 않는다면 본 흐름도는 종료된다.When the binary information of the current coding parameter to be encoded is determined (S2102), the binarized information of the current coding parameter is encoded using the probability interval state up to the previous step of step S2102 of FIG. 21 and previous probability information of the same coding parameter. (S2103). Probability information and a probability section may be updated (S2104) for binary information to be encoded later. When the coding parameter information to be encoded next exists (S2105), the process moves to the next coding parameter information (S2106), and the above-described process is repeated. If there is no coding parameter information to be encoded next, the flowchart ends.
도 22는 문맥 적응적 이진화 산술 복호화 방법을 나타내는 흐름도이다. 부호화 장치와 달리, 복호화 장치에서는 확률 정보 및 구간을 이용하여 코딩 파라미터의 이진 정보를 복호화(S2202)한 후, 현재 코딩 파라미터의 이진 정보를 결정(S2203)한다. 이 외 도 22의 복호화 방법은 도 21의 부호화 방법에 대응되므로 상세한 설명은 생략한다.22 is a flowchart illustrating a context-adaptive binarization arithmetic decoding method. Unlike the encoding apparatus, the decoding apparatus decodes binary information of a coding parameter using probability information and an interval (S2202), and then determines binary information of the current coding parameter (S2203). In addition, since the decoding method of FIG. 22 corresponds to the encoding method of FIG. 21, detailed description thereof will be omitted.
상기 설명한 도 21 및 22의 단계 S2103과 S2202에서, 각 코딩 파라미터 별로 주변에 이미 복원된 정보(또는 코딩 파라미터)들을 이용하여 기 설정된 N개의 확률 정보들 중, 최적 확률 정보를 선택적으로 사용하여 부호화 또는 복호화가 진행될 수 있다. In steps S2103 and S2202 of FIGS. 21 and 22 described above, among the N pieces of probability information preset by using information (or coding parameters) already reconstructed around each coding parameter, encoding or using optimal probability information is selectively used. Decoding may proceed.
예를 들어, 양자화된 변환 블록에 속한 정보(또는 코딩 파라미터)의 확률 정보는 변환 블록의 크기에 따라 정보가 발생할 확률이 높은 확률 정보를 사용할 수도 있다. For example, the probability information of the information (or coding parameter) belonging to the quantized transform block may use probability information having a high probability of generating information according to the size of the transform block.
또는, 현재 부호화 또는 복호화 할 계수의 주변 계수들의 정보에 따라 확률 정보를 다르게 적용할 수 있고, 이전의 부호화 또는 복호화된 정보의 확률 정보를 이용하여 현재 부호화 또는 복호화 하는 정보의 확률 정보를 선택할 수도 있다. Alternatively, the probability information may be differently applied according to the information of the neighboring coefficients of the coefficient to be currently encoded or decoded, and the probability information of the information currently encoded or decoded may be selected using the probability information of the previously encoded or decoded information. .
도 23a, 23b는 주변 계수들의 정보에 따라 확률 정보를 다르게 적용한 일 예를 나타내는 도면이다. 23A and 23B illustrate an example in which probability information is differently applied according to information of neighboring coefficients.
도 23a는 현재 계수의 Sig_coeff_flag 정보값을 부호화 또는 복호화에 사용되는 확률 정보 테이블의 예시이다. 현재 부호화 또는 복호화 할 계수와 인접한 계수들 중 현재 계수의 Sig_coeff_flag 정보값과 동일한 정보값을 갖는 계수의 수가 1개인 경우, 현재 계수에는 인덱스 8이 할당된다. 이 때 현재 계수의 Sig_coeff_flag 이진정보인 심볼 1의 확률은 61% 이고 심볼 0의 확률은 39%가 된다. 만약, 현재 계수의 Sig_coeff_flag 정보값과 동일한 정보값을 갖는 주변 계수의 수가 2개인 경우 현재 계수에는 인덱스 5가 할당되고, 이 때의 현재 계수의 Sig_coeff_flag 이진정보인 심볼 1의 확률은 71% 이고 심볼 0의 확률은 29%이다. 만약 현재 계수의 Sig_coeff_flag 정보값과 동일한 정보값을 갖는 주변 계수의 수가 3개인 경우 현재 계수에는 인덱스 2가 할당되고 현재 계수의 Sig_coeff_flag 이진정보인 심볼 1의 확률은 87%, 심볼 0의 확률은 13%이 된다. 23A is an example of a probability information table used for encoding or decoding a Sig_coeff_flag information value of a current coefficient. If the number of coefficients having the same information value as the Sig_coeff_flag information value of the current coefficient among the coefficients adjacent to the coefficient to be encoded or decoded is one, the index 8 is assigned to the current coefficient. In this case, the probability of symbol 1, which is Sig_coeff_flag binary information of the current coefficient, is 61%, and the probability of symbol 0 is 39%. If the number of neighboring coefficients having the same information value as the Sig_coeff_flag information value of the current coefficient is two, index 5 is assigned to the current coefficient, and the probability of symbol 1, which is Sig_coeff_flag binary information of the current coefficient, is 71% and symbol 0 The probability of is 29%. If there are three neighboring coefficients with the same information value as the Sig_coeff_flag information value of the current coefficient, index 2 is assigned to the current coefficient, and the probability of symbol 1, which is Sig_coeff_flag binary information of the current coefficient, is 87%, and symbol 0 is 13%. Becomes
도 23a에 도시된 확률 정보 테이블을 이용하여 현재 계수가 부호화 또는 복호화된 후 도 23b와 같이 확률 정보는 업데이트될 수 있다.After the current coefficient is encoded or decoded using the probability information table illustrated in FIG. 23A, the probability information may be updated as shown in FIG. 23B.
한편, 0이 아닌 계수 정보 Sig_coeff_flag의 경우, 저주파 영역에 가까울수록, 0이 아닌 계수 정보 Sig_coeff_flag의 발생 확률이 높은 확률 정보가 사용될 수 있다. On the other hand, in the case of non-zero coefficient information Sig_coeff_flag, probability information having a higher probability of generating non-zero coefficient information Sig_coeff_flag may be used as it is closer to the low frequency region.
그리고, N 초과 계수 정보의 확률 정보는 직전에 부호화/복호화한 N 초과 계수 정보의 확률 정보를 이용하여 현재의 N 초과 계수 정보의 확률 정보를 설정하거나, 서브 블록 단위로 처음 부호화/복호화 하는 N 초과 계수 정보의 확률 정보를 그대로 사용할 수도 있다. 상술한 바와 같이, N 초과 계수 정보는 Abs_greater1_flag, Abs_greater2_flag 및 Abs_greater3_flag 등이 포함될 수 있다For the probability information of the N excess coefficient information, the probability information of the current N excess coefficient information is set using the probability information of the N excess coefficient information encoded / decoded immediately before, or the N excess that is first encoded / decoded in units of subblocks. Probability information of coefficient information may be used as it is. As described above, the N excess coefficient information may include Abs_greater1_flag, Abs_greater2_flag, Abs_greater3_flag, and the like.
그리고, 서브 블록 정보 Coded_sub_blk_flag는 주변의 부호화/복호화 된 M개의 서브 블록의 확률 정보를 이용하거나 직전에 부호화/복호화 된 서브블록의 확률정보를 이용할 수도 있다. The sub block information Coded_sub_blk_flag may use probability information of neighboring coded / decoded M subblocks or use probability information of a previously encoded / decoded subblock.
(제3 실시예)(Third Embodiment)
도 24는 본 발명의 일 실시 예에 따라, 기준 계수 위치에 따른 각 코딩 파라미터의 확률 정보를 결정하고, 이를 이용하여 각 코딩 파라미터의 정보를 부호화하는 방법을 나타낸 흐름도이다. 도 24의 흐름도는 영상 부호화 장치(100)의 엔트로피 부호화부(107)에 의해 수행될 수 있다.24 is a flowchart illustrating a method of determining probability information of each coding parameter according to a reference coefficient position and encoding the information of each coding parameter using the same according to an embodiment of the present invention. The flowchart of FIG. 24 may be performed by the entropy encoder 107 of the image encoding apparatus 100.
도 24를 참조하면, 먼저 엔트로피 부호화부(107)는 부호화할 현재 변환 블록 내의 기준 계수의 위치를 부호화한다(S2401). 여기서, 기준 계수 위치는 기준 계수 위치 정보 Last_sig로 부호화될 수 있다. Referring to FIG. 24, first, the entropy encoder 107 encodes a position of a reference coefficient in a current transform block to be encoded (S2401). Here, the reference coefficient position may be encoded by reference coefficient position information Last_sig.
전술한 바와 같이, 기준 계수는 역 스캔 순서로 계수들을 스캔 할 때 최초의 0이 아닌 계수를 의미 할 수도 있지만, 영상 부호화 장치(100)와 영상 복호화 장치(200)에서 동일하게 설정된 다른 조건들에 의해서도 결정 가능하다. As described above, the reference coefficient may mean the first non-zero coefficient when scanning coefficients in an inverse scan order, but the reference coefficient may be applied to other conditions that are equally set in the image encoding apparatus 100 and the image decoding apparatus 200. It can also be determined by.
그 후, 기준 계수의 위치에 기초하여 각 코딩 파라미터의 확률 정보를 유도하고 해당 코딩 파라미터를 부호화한다(S2402).Thereafter, probability information of each coding parameter is derived based on the position of the reference coefficient, and the corresponding coding parameter is encoded (S2402).
여기서, 기준 계수의 위치에 따라 확률 테이블을 설정하는 방법은 도 25의 도면 예시를 참조한다. Here, the method of setting the probability table according to the position of the reference coefficient refers to the drawing example of FIG. 25.
도 25를 참조하면, A 영역(2500)은 변환 블록 내 DC 계수와 가까운 임의의 영역을 의미하고, B 영역(2501)은 변환 블록 내 A 영역(2500)이 아닌 영역을 의미한다. 또한, 변환 블록을 N개 이상의 영역으로 분할하는 것도 가능하다. 여기서 A 영역을 나타내는 임의의 영역 정보는 상위헤더에서 전송될 수도 있고, 영상 부호화 장치(100)와 영상 복호화 장치(200)에서 변환 블록 형태에 따라서 동일한 조건으로 결정될 수도 있다. Referring to FIG. 25, the A region 2500 refers to an arbitrary region close to the DC coefficient in the transform block, and the B region 2501 refers to a region other than the A region 2500 in the transform block. It is also possible to divide the transform block into N or more regions. In this case, arbitrary region information indicating the region A may be transmitted from an upper header, or may be determined under the same condition according to the transform block type in the image encoding apparatus 100 and the image decoding apparatus 200.
도 25에서 기준계수의 위치가 A 영역(2500) 혹은 B 영역(2501) 중 어느 영역에 존재하느냐에 따라서 단일 확률 테이블 내에서 코딩 파라미터들의 확률 정보를 다르게 유도하고, 코딩 파라미터들의 확률 정보를 업데이트할 수 있다. In FIG. 25, the probability information of the coding parameters may be differently derived and the probability information of the coding parameters may be updated in a single probability table according to whether the location of the reference coefficient exists in the A region 2500 or the B region 2501. have.
또는, 기준 계수의 위치가 A 영역 혹은 B 영역 중 어느 영역에 존재하느냐에 따라서 2개 이상의 서로 다른 초기 확률 테이블 혹은 서로 같은 초기 확률 테이블을 독립적으로 사용하여 코딩 파라미터들의 확률 정보를 업데이트할 수 있다. Alternatively, the probability information of the coding parameters may be updated by using two or more different initial probability tables or the same initial probability table independently according to whether the position of the reference coefficient exists in the A region or the B region.
하기, 전술한 방법의 상세한 예시를 설명한다. In the following, detailed examples of the above-described method will be described.
변환 블록 내 각 계수가 0인지 아닌지를 나타내는 Sig_coeff_flag 정보의 확률 정보를 유도하기 위해서 2개의 서로 같은 초기 확률 테이블을 독립적으로 이용하여 부호화하는 경우, 변환 블록의 기준 계수가 A 영역(2500)에 존재하는 경우에는 도 26a의 (2600) 테이블을 이용하고, B 영역(2501)에 존재하는 경우에는 도 26a의 (2601) 테이블을 이용하여 독립적으로 Sig_coeff_flag 정보의 확률 정보를 업데이트할 수 있다. In the case of encoding by using two identical initial probability tables independently to derive probability information of Sig_coeff_flag information indicating whether each coefficient in the transform block is 0 or not, the reference coefficient of the transform block exists in the region A 2500. In the case of using the (2600) table of FIG. 26A and in the B region 2501, the probability information of the Sig_coeff_flag information may be independently updated using the (2601) table of FIG. 26A.
도 26b의 (2602) 확률 테이블은 도 26a의 (2600) 초기 확률 테이블에서 기준 계수 위치에 따른 확률 테이블 색인 정보가 5로 결정되어 확률 정보가 업데이트된 결과이고, 도 26b의 (2603) 확률 테이블은 도 26a의 (2601) 초기 확률 테이블에서 기준 계수 위치에 따른 확률 테이블 색인 정보가 8로 결정되어 확률 정보가 업데이트된 결과이다.The probability table 2260 of FIG. 26B is a result of updating the probability information by determining probability table index information according to the reference coefficient position as 5 in the initial probability table 2260 of FIG. 26A, and the probability table of 2260 of FIG. 26B. The probability table index information according to the reference coefficient position is determined as 8 in the initial probability table (2601) of FIG. 26A, and the probability information is updated.
전술한 예시와 동일한 원리로, 변환 블록 내 계수의 절대값이 1보다 큰지를 알려주는 Abs_greater1_flag 정보의 확률 정보는 기준 계수가 A 영역에 있을 때에는 Abs_greater1_flag 정보가 1일 확률이 높은 확률 정보를 선택하고, 기준 계수가 B 영역에 있을 때에는 Abs_greater1_flag 정보가 0일 확률이 높은 확률 정보를 선택하여 부호화할 수 있다.In the same principle as the above example, the probability information of the Abs_greater1_flag information indicating whether the absolute value of the coefficient in the transform block is greater than 1 is selected as the probability information having the high probability that the Abs_greater1_flag information is 1 when the reference coefficient is in the A region. When the reference coefficient is in the B region, the probability information having a high probability that Abs_greater1_flag information is 0 may be selected and encoded.
한편, 확률 테이블 내에서 어떤 확률을 사용할지를 나타내는 색인 정보를 결정하는 방법은 기준 계수의 세부 좌표에 따라서 색인 정보가 결정될 수 있다.Meanwhile, in the method of determining index information indicating which probability to use in the probability table, the index information may be determined according to the detailed coordinates of the reference coefficient.
예를 들어, 변환 블록 내 기준 계수의 세부 좌표가 A 영역의 맨 좌상단(도 25의 2502)에 위치할 경우, 도 26a의 (2600)의 초기 확률 테이블에서 기준 계수 위치에 따른 확률 테이블의 색인 정보가 5로 결정될 수 있다. 그리고, 도 26b의 (2602) 확률 테이블과 같이 색인 정보 5의 확률 정보가 업데이트될 수 있다.For example, when the detailed coordinates of the reference coefficient in the transform block are located at the top left of the region A (2502 of FIG. 25), index information of the probability table according to the reference coefficient position in the initial probability table of 2600 of FIG. 26A. May be determined as 5. And, like the probability table 2260 of FIG. 26B, the probability information of the index information 5 may be updated.
그리고, 변환 블록 내 기준 계수의 세부 좌표가 B 영역의 가운데에 위치(도 25의 2503)할 경우, 도 26a의 (2601)의 초기 확률 테이블에서 기준 계수 위치에 따른 확률 테이블의 색인 정보가 8로 결정될 수 있다. 그리고, 도 26b의 (2603) 확률 테이블과 같이 색인 정보 8의 확률 정보가 업데이트될 수 있다. 도 27은 본 발명의 일 실시 예에 따라, 기준 계수 위치에 따른 각 코딩 파라미터의 확률 정보를 결정하고, 이를 이용하여 각 코딩 파라미터의 정보를 복호화하는 방법을 나타낸 흐름도이다. 도 27의 복호화 방법은, 영상 복호화 장치(200)의 엔트로피 복호화부(201)에 의해 수행될 수 있다.When the detailed coordinates of the reference coefficients in the transform block are located at the center of the region B (2503 of FIG. 25), the index information of the probability table according to the reference coefficient position is 8 in the initial probability table of 2601 of FIG. 26A. Can be determined. The probability information of the index information 8 may be updated as in the probability table of FIG. 26B. 27 is a flowchart illustrating a method of determining probability information of each coding parameter according to a reference coefficient position and decoding the information of each coding parameter using the same according to an embodiment of the present invention. The decoding method of FIG. 27 may be performed by the entropy decoding unit 201 of the image decoding apparatus 200.
도 27을 참조하면, 먼저 엔트로피 복호화부(201)는 복호화할 현재 변환 블록 내의 기준 계수의 위치를 복호화한다(S2701). 전술한 바와 같이, 기준 계수는 역스캔 순서로 계수들을 스캔할 때 최초의 0이 아닌 계수를 말한다. 그 후, 기준 계수의 위치에 기초하여 각 코딩 파라미터의 확률 정보를 유도하고 해당 파라미터 정보를 복호화한다(S2702).Referring to FIG. 27, first, the entropy decoding unit 201 decodes the position of the reference coefficient in the current transform block to be decoded (S2701). As mentioned above, the reference coefficient refers to the first non-zero coefficient when scanning the coefficients in reverse scan order. Thereafter, probability information of each coding parameter is derived based on the position of the reference coefficient and the corresponding parameter information is decoded (S2702).
(제4 실시 예)(Fourth embodiment)
도 28은 본 발명의 일 실시 예에 따른 것으로, DC 계수의 부분 정보에 따라서 각 코딩 파라미터의 확률 정보 유도 및 부호화 방법을 나타낸 흐름도이다. 도 28의 부호화 방법은 영상 부호화 장치(100)의 엔트로피 부호화부(107)에 의해 수행될 수 있다.28 is a flowchart illustrating a method of deriving and encoding probability information of each coding parameter according to partial information of a DC coefficient according to an embodiment of the present invention. The encoding method of FIG. 28 may be performed by the entropy encoder 107 of the image encoding apparatus 100.
도 28를 참조하면, DC 계수의 부분 정보를 부호화하고(S2801), DC의 부분 정보에 기초하여 각 코딩 파라미터의 확률 정보를 유도하고 해당 파라미터 정보를 부호화할 수 있다(S2802).Referring to FIG. 28, partial information of a DC coefficient may be encoded (S2801), and probability information of each coding parameter may be derived based on the partial information of DC, and corresponding parameter information may be encoded (S2802).
여기서, DC 계수는 변환 블록의 맨 좌상단에 위치한 계수이거나, 역 스캔 순서상 가장 나중에 나오는 논-제로 계수(0이 아닌 계수)일 수 있다. Here, the DC coefficient may be a coefficient located at the top left of the transform block or may be a non-zero coefficient (non-zero coefficient) that comes last in an inverse scan order.
또한, 여기서, DC 계수의 부분 정보라 함은 DC 계수를 부호화 및 복호화 하기 위해 필요한 일부 부분 정보를 의미한다. 예를 들어, DC 계수의 부분 정보는 DC 계수의 Sig_coeff_flag 정보 및 Abs_greater1_flag 정보 중 적어도 하나를 의미할 수 있다.In addition, here, the partial information of the DC coefficient means some partial information necessary for encoding and decoding the DC coefficient. For example, the partial information of the DC coefficient may mean at least one of Sig_coeff_flag information and Abs_greater1_flag information of the DC coefficient.
DC 계수의 부분 정보에 기초하여 단일 확률 테이블 내에서 DC 계수의 부분 정보를 제외한 코딩 파라미터들의 확률 정보를 다르게 유도하고, 코딩 파라미터들의 확률 정보를 업데이트할 수 있다.Based on the partial information of the DC coefficients, the probability information of the coding parameters except for the partial information of the DC coefficients may be differently derived in the single probability table, and the probability information of the coding parameters may be updated.
또는, DC 계수의 부분 정보에 기초하여 2개 이상의 서로 다른 초기 확률 테이블 혹은 서로 같은 초기 확률 테이블을 독립적으로 사용하여 코딩 파라미터들의 확률 정보를 업데이트할 수 있다. Alternatively, the probability information of the coding parameters may be updated using two or more different initial probability tables or the same initial probability table independently based on the partial information of the DC coefficients.
하기, 전술한 방법의 상세한 예시를 설명한다. In the following, detailed examples of the above-described method will be described.
변환 블록 내 각 계수가 0인지 아닌지를 나타내는 Sig_coeff_flag 정보의 확률 정보를 유도하기 위해서 2개의 서로 같은 초기 확률 테이블을 독립적으로 이용하여 부호화하고, DC 계수의 부분 정보는 Sig_coeff_flag 정보만을 이용할 수 있다. DC 계수의 부분 정보가 0인 경우에는 도 26a의 (2600) 테이블을 이용하고, DC의 부분 정보가 1인 경우에는 도 26a의 (2601) 테이블을 이용하여 독립적으로 Sig_coeff_flag 정보의 확률 정보를 업데이트할 수 있다. In order to derive probability information of Sig_coeff_flag information indicating whether each coefficient in the transform block is 0, two independent initial probability tables are independently encoded and only partial information of DC coefficients may use Sig_coeff_flag information. When the partial information of the DC coefficient is 0, the (2600) table of FIG. 26A is used, and when the DC information is 1, the probability information of the Sig_coeff_flag information is independently updated by using the (2601) table of FIG. 26A. Can be.
전술한 예시와 동일한 원리로, 변환 블록 내 계수의 절대값이 1보다 큰지를 알려주는 Abs_greater1_flag 정보의 확률 정보는 DC 계수의 부분 정보인 Sig_coeff_flag가 1일 경우에는 Abs_greater1_flag 정보가 1일 확률이 높은 확률 정보를 선택하고, DC 계수의 부분 정보인 Sig_coeff_flag가 0일 경우에는 Abs_greater1_flag 정보가 0일 확률이 높은 확률 정보를 선택하여 부호화할 수 있다.In the same principle as in the above example, the probability information of the Abs_greater1_flag information indicating whether the absolute value of the coefficient in the transform block is greater than 1 is the probability information that the Abs_greater1_flag information has a high probability of 1 when Sig_coeff_flag, which is a partial information of the DC coefficient, is 1; When Sig_coeff_flag which is partial information of the DC coefficient is 0, probability information having a high probability that Abs_greater1_flag information is 0 may be selected and encoded.
확률 테이블 내에서 어떤 확률을 사용할지를 나타내는 색인 정보를 결정하는 방법은 DC 계수의 부분 정보에 따라서 색인 정보가 결정될 수 있다.In the method of determining index information indicating which probability to use in the probability table, the index information may be determined according to the partial information of the DC coefficient.
예를 들어, 현재 부호화 하는 계수의 Sig_coeff_flag 정보가 1일 경우, 도 26a의 (2600)의 초기 확률 테이블의 색인 정보가 5로 결정될 수 있다. 그리고, 도 26b의 (2602) 확률 테이블과 같이 색인 정보 5의 확률 정보가 업데이트 될 수 있다.For example, when Sig_coeff_flag information of the current encoding coefficient is 1, index information of the initial probability table of 2600 of FIG. 26A may be determined as 5. Probability information of index information 5 may be updated as in the probability table 2260 of FIG. 26B.
그리고, 현재 부호화 하는 계수의 Sig_coeff_flag 정보가 0일 경우, 도 26a의 (2601)의 초기 확률 테이블의 색인 정보가 8로 결정될 수 있다. 그리고, 도 26b의 (2603) 확률 테이블과 같이 색인 정보 8의 확률 정보가 업데이트 될 수 있다.When the Sig_coeff_flag information of the current encoding coefficient is 0, index information of the initial probability table of 2601 of FIG. 26A may be determined as 8. Probability information of index information 8 may be updated as in the probability table of FIG. 26B.
도 29는 DC 계수의 부분 정보를 이용하여 변환 블록 계수들을 부호화 하는 방법을 나타낸 흐름도이다. 29 is a flowchart illustrating a method of encoding transform block coefficients using partial information of DC coefficients.
기준 계수 정보를 부호화한 후(S2901)에 DC 계수의 부분 정보를 부호화 한다(S2902). 이 때, DC 계수의 위치가 부호화/복호화 장치에서 기 설정된 경우, DC 계수의 위치 부호화 과정은 생략할 수 있다. 그렇지 않은 경우, DC 계수의 위치를 부호화한다(S2903). 변환 블록 내의 서브 블록에 기준 계수가 포함이 되었다면, 부호화 할 계수가 포함 되었다는 뜻이기 때문에 서브 블록 정보인 Coded_sub_blk_flag가 부호화되지 않는다. 이후 계수들의 0이 아닌 계수 정보 부호화(S2906), N 초과 계수 정보 부호화 (S2907), 부호 정보 부호화 (S2908), 잔차 계수 정보 부호화 (S2909)의 순서로 부호화된다. 단, DC 계수의 부분 정보는 이미 부호화 했으므로, (S2906)부터 (S2909)까지 단계에서 DC 계수 부호화시 DC 계수 부분 정보에 사용된 단계는 생략할 수 있다.After encoding the reference coefficient information (S2901), partial information of the DC coefficient is encoded (S2902). In this case, when the position of the DC coefficient is preset in the encoding / decoding apparatus, the position encoding process of the DC coefficient may be omitted. If not, the position of the DC coefficient is encoded (S2903). If reference coefficients are included in the subblocks in the transform block, it means that the coefficients to be encoded are included, so coded_sub_blk_flag, which is subblock information, is not encoded. Thereafter, the coefficients are encoded in the order of nonzero coefficient information encoding (S2906), N excess coefficient information encoding (S2907), code information encoding (S2908), and residual coefficient information encoding (S2909). However, since the partial information of the DC coefficient has already been encoded, the steps used for the DC coefficient partial information during the DC coefficient encoding in steps S2906 to S2909 may be omitted.
그 후, 다음 서브 블록이 존재하는 경우(S2911), 다음 서브 블록으로 이동(S2912)하여 (S2906)부터 (S2909)까지 순으로 정보를 부호화하고, 다음 서브 블록이 존재하지 않는 경우, 알고리즘을 종료한다. Thereafter, when the next subblock exists (S2911), the process moves to the next subblock (S2912), and information is encoded in order from (S2906) to (S2909), and when the next subblock does not exist, the algorithm ends. do.
도 30은 본 발명의 일 실시 예에 따른 것으로, DC 계수의 부분 정보에 따라서 각 코딩 파라미터의 확률 정보 유도 및 복호화 방법을 나타낸 흐름도이다. 도 30의 복호화 방법은 영상 복호화 장치(200)의 엔트로피 복호화부(201)에 의해 수행될 수 있다.30 is a flowchart illustrating a method of deriving and decoding probability information of each coding parameter according to partial information of a DC coefficient according to an embodiment of the present invention. The decoding method of FIG. 30 may be performed by the entropy decoding unit 201 of the image decoding apparatus 200.
도 30을 참조하면, 먼저 엔트로피 복호화부(201)는 DC 계수의 부분 정보를 복호화 한 후(S3001), DC 계수의 부분 정보를 기초하여 각 코딩 파라미터의 확률 정보를 유도하고 해당 파라미터 정보를 복호화한다(S3002).Referring to FIG. 30, first, the entropy decoding unit 201 decodes partial information of a DC coefficient (S3001), and then derives probability information of each coding parameter based on the partial information of the DC coefficient and decodes corresponding parameter information. (S3002).
도 31은 DC 계수의 부분 정보를 이용하여 변환 블록 계수들을 복호화 하는 방법을 나타낸 흐름도이다. 31 is a flowchart illustrating a method of decoding transform block coefficients using partial information of DC coefficients.
기준 계수 정보를 복호화한 후(S3101)에 DC 계수의 부분 정보를 복호화 한다(S3102). 이 때, DC 계수의 위치가 부호화/복호화 장치에서 기 설정된 경우, DC 계수의 위치 복호화 과정은 생략할 수 있다. 그렇지 않은 경우, DC 계수의 위치를 복호화한다(S3103). 변환 블록 내의 서브 블록에 기준 계수가 포함이 되었다면, 복호화 할 계수가 포함 되었다는 뜻이기 때문에 서브 블록 정보인 Coded_sub_blk_flag가 복호화되지 않는다. 이후 계수들의 0이 아닌 계수 정보 복호화(S3106), N 초과 계수 정보 복호화 (S3107), 부호 정보 복호화 (S3108), 잔차 계수 정보 복호화 (S3109)의 순서로 복호화된다. 단, DC 계수의 부분 정보는 이미 복호화 했으므로, (S3106)부터 (S3109)까지 단계에서 DC 계수 복호화시 DC 계수 부분 정보에 사용된 단계는 생략할 수 있다다.After decoding the reference coefficient information (S3101), the partial information of the DC coefficient is decoded (S3102). In this case, when the position of the DC coefficient is preset in the encoding / decoding apparatus, the position decoding process of the DC coefficient may be omitted. If not, the position of the DC coefficient is decoded (S3103). If the reference coefficient is included in the subblock in the transform block, it means that the coefficient to be decoded is included. Therefore, Coded_sub_blk_flag, which is subblock information, is not decoded. Thereafter, non-zero coefficient information decoding (S3106), N excess coefficient information decoding (S3107), code information decoding (S3108), and residual coefficient information decoding (S3109) are performed in this order. However, since the partial information of the DC coefficient has already been decoded, the steps used for the DC coefficient partial information during the DC coefficient decoding in steps S3106 to S3109 may be omitted.
그 후, 다음 서브 블록이 존재하는 경우(S3111), 다음 서브 블록으로 이동(S3112)하여 (S3106)부터 (S3109)까지 순으로 정보를 복호화하고, 다음 서브 블록이 존재하지 않는 경우, 알고리즘을 종료한다.Thereafter, when the next subblock exists (S3111), the process moves to the next subblock (S3112), and the information is decoded in order from (S3106) to (S3109), and when the next subblock does not exist, the algorithm ends. do.
(제5 실시 예)(Fifth Embodiment)
도 32는 본 발명의 일 실시 예에 따른 것으로, DC 계수와 기준 계수간 거리 및 DC 계수의 부분 정보에 따라서 각 코딩 파라미터의 확률 정보 유도 및 부호화 방법을 나타낸 흐름도이다. 도 32의 부호화 방법은 영상 부호화 장치(100)의 엔트로피 부호화부(107)에 의해 수행될 수 있다.32 is a flowchart illustrating a method of deriving and encoding probability information of each coding parameter according to a distance between a DC coefficient and a reference coefficient and partial information of the DC coefficient according to an embodiment of the present invention. The encoding method of FIG. 32 may be performed by the entropy encoder 107 of the image encoding apparatus 100.
도 32를 참조하면, 엔트로피 부호화부(107)는 현재 변환 블록의 기준 계수의 위치를 부호화한다(S3201). 전술한 바와 같이, 기준 계수는 역 스캔 순서로 계수들을 스캔 할 때 최초의 0이 아닌 계수를 의미 할 수도 있지만, 영상 부호화 장치(100)와 영상 복호화 장치(200)에서 동일하게 설정된 다른 조건들에 의해서도 결정 가능하다. DC 계수의 부분 정보를 부호화한 후, DC 계수와 기준 계수의 거리 및 DC 계수의 부분 정보에 기초하여 코딩 파라미터들의 확률 정보를 유도하고 해당 파라미터 정보를 부호화한다(S3202).Referring to FIG. 32, the entropy encoder 107 encodes the position of the reference coefficient of the current transform block (S3201). As described above, the reference coefficient may mean the first non-zero coefficient when scanning coefficients in an inverse scan order, but the reference coefficient may be applied to other conditions that are equally set in the image encoding apparatus 100 and the image decoding apparatus 200. It can also be determined by. After encoding the partial information of the DC coefficient, the probability information of the coding parameters is derived based on the distance between the DC coefficient and the reference coefficient and the partial information of the DC coefficient, and the corresponding parameter information is encoded (S3202).
여기서, DC 계수는 변환 블록의 맨 좌상단에 위치한 계수 계수이거나, 역 스캔 순서상 가장 나중에 나오는 논-제로 계수(0이 아닌 계수)일 수 있다. Here, the DC coefficient may be a coefficient coefficient located at the top left of the transform block or may be a non-zero coefficient (non-zero coefficient) that comes last in an inverse scan order.
또한, 여기서, DC 계수의 부분 정보라 함은 DC 계수를 부호화 및 복호화 하기 위해 필요한 일부 부분 정보를 의미한다. 예를 들어, DC 계수의 부분 정보는 DC 계수의 Sig_coeff_flag 정보 및 Abs_greater1_flag 정보 중 적어도 하나를 의미할 수 있다.In addition, here, the partial information of the DC coefficient means some partial information necessary for encoding and decoding the DC coefficient. For example, the partial information of the DC coefficient may mean at least one of Sig_coeff_flag information and Abs_greater1_flag information of the DC coefficient.
DC 계수와 기준 계수의 거리 및 DC 계수의 부분 정보에 기초하여 단일 확률 테이블 내에서 DC 계수의 부분 정보를 제외한 코딩 파라미터들의 확률 정보를 다르게 유도하고, 코딩 파라미터들의 확률 정보를 업데이트할 수 있다.Based on the distance between the DC coefficient and the reference coefficient and the partial information of the DC coefficient, the probability information of the coding parameters except the partial information of the DC coefficient may be differently derived in the single probability table, and the probability information of the coding parameters may be updated.
또는, DC 계수와 기준 계수의 거리 및 DC 계수의 부분 정보에 기초하여 2개 이상의 서로 다른 초기 확률 테이블 혹은 서로 같은 초기 확률 테이블을 독립적으로 사용하여 코딩 파라미터들의 확률 정보를 업데이트할 수 있다. Alternatively, based on the distance between the DC coefficient and the reference coefficient and the partial information of the DC coefficient, two or more different initial probability tables or the same initial probability table may be independently used to update probability information of the coding parameters.
여기서, DC 계수와 기준 계수의 거리 정보를 결정하는 방법은 부호화/복호화 장치에서 기 설정된 규칙에 의해 동일한 방법으로 거리 정보 결정할 수도 있고, 거리 정보를 부호화 할 수도 있다. Here, in the method for determining the distance information between the DC coefficient and the reference coefficient, the distance information may be determined or the distance information may be encoded in the same manner according to a predetermined rule in the encoding / decoding apparatus.
하기, 전술한 방법의 상세한 예시를 설명한다. In the following, detailed examples of the above-described method will be described.
변환 블록 내 각 계수가 0인지 아닌지를 나타내는 Sig_coeff_flag 정보의 확률 정보를 유도하기 위해서 3개의 서로 같은 초기 확률 테이블을 독립적으로 이용하여 부호화하고, DC 계수의 부분 정보는 Sig_coeff_flag 정보만을 이용할 수 있다. DC 계수와 기준 계수의 거리 정보가 기 설정된 임의의 임계값보다 크다면 도 33의 (3300) 테이블을 이용하고, DC 계수와 기준 계수의 거리가 정보가 기 설정된 임의의 임계값보다 작다면 도 33의 (3301) 혹은 (3302) 테이블을 이용한다. 여기서, 기 설정된 임의의 임계값은 부호화/복호화 장치에 기 설정된 값이거나, 부호화 장치에서 결정되어 복호화 장치로 전송되는 정보에 기초한 값일 수 있다. 이 때, (3301) 혹은 (3302) 테이블 중 어떤 확률 테이블을 사용할지는 DC 계수의 부분 정보에 기초하여 결정될 수 있다. 예를 들어, DC 계수의 부분 정보인 Sig_coeff_flag 정보가 1이라면 도 33의 (3301) 테이블을 이용하고, 0이라면 도 33의 (3302) 테이블을 이용하여 확률 정보를 결정할 수 있다. In order to derive probability information of Sig_coeff_flag information indicating whether each coefficient in the transform block is 0 or not, three independent initial probability tables are independently encoded and only partial information of DC coefficients may use Sig_coeff_flag information. If the distance information of the DC coefficient and the reference coefficient is greater than a predetermined threshold value, the table 3300 of FIG. 33 is used. If the distance between the DC coefficient and the reference coefficient is smaller than the predetermined threshold value, FIG. 33. Use the (3301) or (3302) table of. The predetermined threshold may be a value preset in the encoding / decoding apparatus or a value based on information determined by the encoding apparatus and transmitted to the decoding apparatus. In this case, which probability table to use (3301) or (3302) may be determined based on the partial information of the DC coefficient. For example, if Sig_coeff_flag information, which is partial information of the DC coefficient, is 1, the probability information may be determined using the table 3301 of FIG. 33 and using the table 3302 of FIG.
한편, 확률 테이블 내에서 어떤 확률을 사용할지를 나타내는 색인 정보를 결정하는 방법은 DC 계수와 기준 계수의 거리 정보에 기초하여 색인 정보를 결정한 후, DC 계수의 부분 정보에 기초하여결정된 색인 정보를 보정할 수 있다. Meanwhile, in the method of determining index information indicating which probability to use in the probability table, the index information is determined based on the distance information between the DC coefficient and the reference coefficient, and then the index information determined based on the partial information of the DC coefficient is corrected. Can be.
도 34는 본 발명의 일 실시 예에 따른 것으로, DC 계수와 기준 계수간 거리 및 DC 계수의 부분 정보에 따라서 각 코딩 파라미터의 확률 정보 유도 및 복호화 방법을 나타낸 흐름도이다. 도 34의 복호화 방법은 영상 복호화 장치(200)의 엔트로피 복호화부(201)에 의해 수행될 수 있다.34 is a flowchart illustrating a method of deriving and decoding probability information of each coding parameter according to a distance between a DC coefficient and a reference coefficient and partial information of the DC coefficient according to an embodiment of the present invention. The decoding method of FIG. 34 may be performed by the entropy decoding unit 201 of the image decoding apparatus 200.
도 34를 참조하면, 엔트로피 복호화부(201)는 현재 변환 블록의 기준 계수의 위치 및 DC 계수의 부분 정보를 복호화한다(S3401). 전술한 바와 같이, 기준 계수는 역 스캔 순서로 계수들을 스캔 할 때 최초의 0이 아닌 계수를 의미 할 수도 있지만, 영상 호화 장치(100)와 영상 복호화 장치(200)에서 동일하게 설정된 다른 조건들에 의해서도 결정 가능하다. 그리고, DC 계수와 기준 계수의 거리 및 DC 계수의 부분 정보에 기초하여 코딩 파라미터들의 확률 정보를 유도하고 해당 파라미터 정보를 복호화한다(S3402).Referring to FIG. 34, the entropy decoding unit 201 decodes the position of the reference coefficient of the current transform block and the partial information of the DC coefficient (S3401). As described above, the reference coefficient may mean the first non-zero coefficient when scanning the coefficients in the reverse scanning order, but the reference coefficient may be applied to other conditions that are identically set in the image encoding apparatus 100 and the image decoding apparatus 200. It can also be determined by. Then, the probability information of the coding parameters is derived based on the distance between the DC coefficient and the reference coefficient and the partial information of the DC coefficient, and the corresponding parameter information is decoded (S3402).
영상 부호화 장치(100)와 영상 복호화 장치(200)에서 부호화/복호화 알고리즘은 전술한 도 29 및 도 31의 내용과 동일할 수 있다.The encoding / decoding algorithms of the image encoding apparatus 100 and the image decoding apparatus 200 may be the same as those of FIGS. 29 and 31.
본 개시의 예시적인 방법들은 설명의 명확성을 위해서 동작의 시리즈로 표현되어 있지만, 이는 단계가 수행되는 순서를 제한하기 위한 것은 아니며, 필요한 경우에는 각각의 단계가 동시에 또는 상이한 순서로 수행될 수도 있다. 본 개시에 따른 방법을 구현하기 위해서, 예시하는 단계에 추가적으로 다른 단계를 포함하거나, 일부의 단계를 제외하고 나머지 단계를 포함하거나, 또는 일부의 단계를 제외하고 추가적인 다른 단계를 포함할 수도 있다.Exemplary methods of the present disclosure are represented as a series of operations for clarity of description, but are not intended to limit the order in which the steps are performed, and each step may be performed simultaneously or in a different order as necessary. In order to implement the method according to the present disclosure, the illustrated step may further include other steps, may include other steps except some, or may include additional other steps except some.
본 개시의 다양한 실시 예는 모든 가능한 조합을 나열한 것이 아니고 본 개시의 대표적인 양상을 설명하기 위한 것이며, 다양한 실시 예에서 설명하는 사항들은 독립적으로 적용되거나 또는 둘 이상의 조합으로 적용될 수도 있다.The various embodiments of the present disclosure are not an exhaustive list of all possible combinations and are intended to describe representative aspects of the present disclosure, and the matters described in the various embodiments may be applied independently or in combination of two or more.
또한, 본 개시의 다양한 실시 예는 하드웨어, 펌웨어(firmware), 소프트웨어, 또는 그들의 결합 등에 의해 구현될 수 있다. 하드웨어에 의한 구현의 경우, 하나 또는 그 이상의 ASICs(Application Specific Integrated Circuits), DSPs(Digital Signal Processors), DSPDs(Digital Signal Processing Devices), PLDs(Programmable Logic Devices), FPGAs(Field Programmable Gate Arrays), 범용 프로세서(general processor), 컨트롤러, 마이크로 컨트롤러, 마이크로 프로세서 등에 의해 구현될 수 있다. In addition, various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof. For hardware implementations, one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), General Purpose It may be implemented by a general processor, a controller, a microcontroller, a microprocessor, and the like.
본 개시의 범위는 다양한 실시 예의 방법에 따른 동작이 장치 또는 컴퓨터 상에서 실행되도록 하는 소프트웨어 또는 머신-실행가능한 명령들(예를 들어, 운영체제, 애플리케이션, 펌웨어(firmware), 프로그램 등), 및 이러한 소프트웨어 또는 명령 등이 저장되어 장치 또는 컴퓨터 상에서 실행 가능한 비-일시적 컴퓨터-판독가능 매체(non-transitory computer-readable medium)를 포함한다.It is intended that the scope of the disclosure include software or machine-executable instructions (eg, an operating system, an application, firmware, a program, etc.) to cause an operation in accordance with various embodiments of the method to be executed on an apparatus or a computer, and such software or Instructions, and the like, including non-transitory computer-readable media that are stored and executable on a device or computer.
본 발명은 영상을 부호화/복호화하는 장치에 이용될 수 있다.The present invention can be used in an apparatus for encoding / decoding an image.

Claims (18)

  1. 복호화할 현재 변환 블록 내의 기준 계수의 위치를 복호화하는 단계; 및Decoding the position of the reference coefficient within the current transform block to be decoded; And
    상기 기준 계수의 위치에 기초하여 선택된 스킵 영역에 대한 스킵 영역 정보를 복호화하는 단계;를 포함하고, Decoding skip region information on the selected skip region based on the position of the reference coefficient;
    상기 스킵 영역 정보는 상기 스킵 영역 내의 계수들이 동일한 계수 값을 가지는지 여부를 나타내는 것을 특징으로 하는 영상의 복호화 방법.The skip region information indicates whether coefficients in the skip region have the same coefficient value.
  2. 제1항에 있어서, The method of claim 1,
    상기 기준 계수는 상기 현재 변환 블록 내의 계수들의 역 스캔 순서 상 최초의 0이 아닌 계수인 것을 특징으로 하는 영상의 복호화 방법.And the reference coefficient is a first non-zero coefficient in an inverse scan order of coefficients in the current transform block.
  3. 제1항에 있어서, The method of claim 1,
    상기 스킵 영역 내의 계수들이 갖는 동일한 계수값이 0이 아닌 경우, 상기 동일한 계수값을 나타내는 정보를 복호화하는 단계를 더 포함하는 것을 특징으로 하는 영상의 복호화 방법.And decoding information indicating the same coefficient value when the same coefficient value of the coefficients in the skip region is not zero.
  4. 제1항에 있어서, The method of claim 1,
    상기 추가 스킵 영역 정보를 복호화하는 단계;를 더 포함하고, Decoding the additional skip region information;
    상기 추가 스킵 영역 정보는 상기 스킵 영역이 아닌 다른 영역 내의 계수들이 동일한 계수 값을 가지는지 여부를 나타내는 것을 특징으로 하는 영상의 복호화 방법.The additional skip region information indicates whether coefficients in a region other than the skip region have the same coefficient value.
  5. 제1항에 있어서, The method of claim 1,
    상기 스킵 영역은, 상기 기준 계수의 위치에서 소정 방향으로 선을 그었을 때 상기 선 상의 계수들 또는 상기 선을 기준으로 일 방향의 영역에 속하는 계수들 중 적어도 하나의 계수들을 포함하는 영역인 것을 특징으로 하는 영상의 복호화 방법.The skip area is an area including at least one of coefficients on the line or coefficients belonging to an area in one direction based on the line when a line is drawn in a predetermined direction at the position of the reference coefficient. A video decoding method.
  6. 제1항에 있어서, The method of claim 1,
    상기 스킵 영역은, 상기 기준 계수의 위치에서 상기 현재 변환 블록 내의 좌하측 코너의 계수 위치로 선을 그었을 때 상기 선 상의 계수들 또는 상기 선을 기준으로 일 방향의 영역에 속하는 계수들 중 적어도 하나의 계수들을 포함하는 영역인 것을 특징으로 하는 영상의 복호화 방법.The skip region may include at least one of coefficients on the line or coefficients belonging to an area in one direction based on the line when the line is drawn from the position of the reference coefficient to the coefficient position of the lower left corner in the current transform block. And a region including coefficients.
  7. 제4항에 있어서, The method of claim 4, wherein
    상기 추가 스킵 영역은, 상기 스킵 영역과 인접한 영역인 것을 특징으로 하는 영상의 복호화 방법.And the additional skip region is an area adjacent to the skip region.
  8. 제4항에 있어서, The method of claim 4, wherein
    상기 추가 스킵 영역은, 상기 기준 계수가 아닌 다른 0이 아닌 계수의 위치에서 소정 방향으로 선을 그었을 때 상기 선에 기초하여 선택되는 영역인 것을 특징으로 하는 영상의 복호화 방법.And the additional skip region is an area selected based on the line when a line is drawn in a predetermined direction at a position other than the reference coefficient other than the reference coefficient.
  9. 비트스트림으로부터 산술부호화된 변환 계수의 값을 얻는 단계; 및Obtaining a value of an arithmetic coded transform coefficient from the bitstream; And
    변환 블록 내에서의 상기 변환 계수의 위치에 따라, 상기 산술부호화된 변환 계수의 복호화에 적용할 확률 정보를 결정하는 단계;를 포함하는 것을 특징으로 하는 영상 복호화 방법.And determining probability information to be applied to decoding the arithmetic-coded transform coefficient according to the position of the transform coefficient within the transform block.
  10. 제9항에 있어서, The method of claim 9,
    상기 확률 정보를 결정하는 단계는, Determining the probability information,
    복수의 영역으로 구분되는 변환 블록 내에서 상기 변환 계수가 어느 영역에 위치하는지에 따라, 상기 산술부호화된 변환 계수의 복호화에 적용할 확률 정보를 결정하는 것을 특징으로 하는 영상 복호화 방법.And probability information to be applied to decoding the arithmetic-coded transform coefficient according to which region the transform coefficient is located in a transform block divided into a plurality of regions.
  11. 제9항에 있어서, The method of claim 9,
    상기 변환 블록 내의 복수의 영역은, 상기 변환 블록의 DC 위치를 기준으로 구분되는 것을 특징으로 하는 영상 복호화 방법.And a plurality of regions in the transform block are divided based on the DC position of the transform block.
  12. 복호화할 현재 변환 블록 내의 기준 계수의 위치를 복호화하는 단계; Decoding the position of the reference coefficient within the current transform block to be decoded;
    상기 기준 계수의 위치에 기초하여 선택된 스킵 영역에 대한 스킵 영역 정보를 복호화하는 단계;Decoding skip region information on a skip region selected based on the position of the reference coefficient;
    상기 스킵 영역에 포함되지 않은 변환 계수의 산술부호화된 값을 얻는 단계; 및Obtaining an arithmetic coded value of a transform coefficient not included in the skip region; And
    복수의 확률 정보 테이블들 중에서, 상기 변환 계수의 산술부호화된 값의 복호화에 적용할 확률 정보 테이블을 선택하는 단계;를 포함하고,Selecting, from a plurality of probability information tables, a probability information table to be applied to decoding an arithmetic coded value of the transform coefficient;
    여기서, 상기 확률 정보 테이블을 선택하는 단계는,Here, the step of selecting the probability information table,
    상기 현재 변환 블록의 복호화에 상기 스킵 영역이 사용되는지 여부에 따라 상기 복수의 확률 정보 테이블들 중 하나를 선택하는 것을 특징으로 하는 영상 복호화 방법.And selecting one of the plurality of probability information tables according to whether the skip region is used to decode the current transform block.
  13. 현재 변환 블록 내의 기준 계수의 위치를 복호화하는 단계; Decoding the position of the reference coefficient in the current transform block;
    상기 기준 계수의 위치에 기초하여 코딩 파라미터의 확률 정보를 유도하는 단계; 및Deriving probability information of a coding parameter based on the position of the reference coefficient; And
    상기 유도된 확률 정보를 이용하여 상기 코딩 파라미터를 복호화하는 단계를 포함하는 영상의 복호화 방법.And decoding the coding parameter by using the derived probability information.
  14. 제13항에 있어서, The method of claim 13,
    상기 현재 변환 블록은 제1 영역 및 제2 영역으로 분할되고,The current transform block is divided into a first region and a second region,
    상기 코딩 파라미터의 확률 정보는 상기 기준 계수가 어느 영역에 존재하는지에 기초하여 결정되는 것을 특징으로 하는 영상의 복호화 방법.The probability information of the coding parameter is determined based on which region the reference coefficient exists in.
  15. 현재 변환 블록의 DC 계수의 부분 정보를 복호화하는 단계;Decoding partial information of the DC coefficient of the current transform block;
    상기 DC 계수의 부분 정보에 기초하여 코딩 파라미터의 확률 정보를 유도하는 단계; 및Deriving probability information of a coding parameter based on the partial information of the DC coefficient; And
    상기 유도된 확률 정보를 이용하여 상기 코딩 파라미터를 복호화하는 단계를 포함하는 영상의 복호화 방법.And decoding the coding parameter by using the derived probability information.
  16. 제15항에 있어서, The method of claim 15,
    상기 DC 계수는 상기 현재 변환 블록의 좌상단에 위치한 계수인 것을 특징으로 하는 영상의 복호화 방법.And the DC coefficient is a coefficient located at the upper left end of the current transform block.
  17. 제15항에 있어서,The method of claim 15,
    상기 DC 계수의 부분 정보는 상기 DC 계수를 복호화하기 위한 정보 중 적어도 하나의 정보인 것을 특징으로 하는 영상의 복호화 방법.And the partial information of the DC coefficients is at least one of information for decoding the DC coefficients.
  18. 제15항에 있어서,The method of claim 15,
    상기 현재 변환 블록 내의 기준 계수의 위치를 복호화하는 단계를 더 포함하고,Decoding a position of a reference coefficient in the current transform block;
    상기 코딩 파라미터의 확률 정보는 상기 DC 계수와 상기 기준 계수간의 거리 정보 및 상기 DC 계수의 부분 정보에 기초하여 유도되는 것을 특징으로 하는 영상의 복호화 방법.The probability information of the coding parameter is derived based on distance information between the DC coefficient and the reference coefficient and partial information of the DC coefficient.
PCT/KR2018/001341 2017-01-31 2018-01-31 Method and device for encoding/decoding image WO2018143670A1 (en)

Priority Applications (12)

Application Number Priority Date Filing Date Title
EP18747331.9A EP3579557A4 (en) 2017-01-31 2018-01-31 Method and device for encoding/decoding image
JP2019541229A JP2020505870A (en) 2017-01-31 2018-01-31 Image encoding / decoding method and apparatus
EP23195330.8A EP4270956A3 (en) 2017-01-31 2018-01-31 Method and device for encoding/decoding image
CN202210975650.2A CN115379225A (en) 2017-01-31 2018-01-31 Image encoding/decoding method and apparatus
CN201880009395.8A CN110235445B (en) 2017-01-31 2018-01-31 Image encoding/decoding method and apparatus
CN202210973907.0A CN115379224A (en) 2017-01-31 2018-01-31 Image encoding/decoding method and apparatus
CN202210975749.2A CN115379226A (en) 2017-01-31 2018-01-31 Image encoding/decoding method and apparatus
CN202210973259.9A CN115379222A (en) 2017-01-31 2018-01-31 Image encoding/decoding method and apparatus
CN202210973319.7A CN115379223A (en) 2017-01-31 2018-01-31 Image encoding/decoding method and apparatus
US16/482,457 US11425426B2 (en) 2017-01-31 2018-01-31 Method and apparatus for encoding/decoding image
JP2022078472A JP2022106982A (en) 2017-01-31 2022-05-11 Method and device for encoding/decoding image
US17/857,470 US11882315B2 (en) 2017-01-31 2022-07-05 Method and apparatus for encoding/decoding image

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR10-2017-0013637 2017-01-31
KR20170013637 2017-01-31
KR1020180007285A KR20180089290A (en) 2017-01-31 2018-01-19 Method and apparatus for encoding/decoding an image
KR10-2018-0007285 2018-01-19

Related Child Applications (2)

Application Number Title Priority Date Filing Date
US16/482,457 A-371-Of-International US11425426B2 (en) 2017-01-31 2018-01-31 Method and apparatus for encoding/decoding image
US17/857,470 Continuation US11882315B2 (en) 2017-01-31 2022-07-05 Method and apparatus for encoding/decoding image

Publications (1)

Publication Number Publication Date
WO2018143670A1 true WO2018143670A1 (en) 2018-08-09

Family

ID=63040927

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2018/001341 WO2018143670A1 (en) 2017-01-31 2018-01-31 Method and device for encoding/decoding image

Country Status (1)

Country Link
WO (1) WO2018143670A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110839158A (en) * 2018-08-16 2020-02-25 北京字节跳动网络技术有限公司 Transform matrix selected coefficient dependent coding

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101356733B1 (en) * 2007-03-07 2014-02-05 삼성전자주식회사 Method and apparatus for Context Adaptive Binary Arithmetic Coding and decoding
US20150181237A1 (en) * 2012-06-22 2015-06-25 Sharp Kabushiki Kaisha Arithmetic decoding device, arithmetic coding device, image decoding apparatus, and image coding apparatus
KR20160038063A (en) * 2010-04-13 2016-04-06 지이 비디오 컴프레션, 엘엘씨 Coding of significance maps and transform coefficient blocks
KR101656964B1 (en) * 2011-08-05 2016-09-12 퀄컴 인코포레이티드 Coding of transform coefficients for video coding
KR20160116006A (en) * 2011-11-07 2016-10-06 퀄컴 인코포레이티드 Coding significant coefficient information in transform skip mode

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101356733B1 (en) * 2007-03-07 2014-02-05 삼성전자주식회사 Method and apparatus for Context Adaptive Binary Arithmetic Coding and decoding
KR20160038063A (en) * 2010-04-13 2016-04-06 지이 비디오 컴프레션, 엘엘씨 Coding of significance maps and transform coefficient blocks
KR101656964B1 (en) * 2011-08-05 2016-09-12 퀄컴 인코포레이티드 Coding of transform coefficients for video coding
KR20160116006A (en) * 2011-11-07 2016-10-06 퀄컴 인코포레이티드 Coding significant coefficient information in transform skip mode
US20150181237A1 (en) * 2012-06-22 2015-06-25 Sharp Kabushiki Kaisha Arithmetic decoding device, arithmetic coding device, image decoding apparatus, and image coding apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110839158A (en) * 2018-08-16 2020-02-25 北京字节跳动网络技术有限公司 Transform matrix selected coefficient dependent coding
US11558612B2 (en) 2018-08-16 2023-01-17 Beijing Bytedance Network Technology Co., Ltd. Coefficient dependent coding of transform matrix selection
CN110839158B (en) * 2018-08-16 2023-03-10 北京字节跳动网络技术有限公司 Transform matrix selected coefficient dependent coding and decoding

Similar Documents

Publication Publication Date Title
WO2018070790A1 (en) Image encoding/decoding method and device
WO2017222325A1 (en) Video signal processing method and device
WO2017043949A1 (en) Method and device for processing video signal
WO2018088805A1 (en) Video signal processing method and apparatus
WO2018056703A1 (en) Method and apparatus for processing video signal
WO2018070742A1 (en) Image encoding/decoding method and device, and recording medium in which bitstream is stored
WO2018008906A1 (en) Method and apparatus for processing video signal
WO2018236028A1 (en) Intra-prediction mode-based image processing method and apparatus therefor
WO2018080122A1 (en) Video encoding/decoding method and apparatus, and recording medium in which bit stream is stored
WO2018008905A1 (en) Method and apparatus for processing video signal
WO2013157825A1 (en) Method and device for encoding/decoding image
WO2018070713A1 (en) Method and apparatus for deriving intra prediction mode for chroma component
WO2020096425A1 (en) Image signal encoding/decoding method, and device for same
WO2018062880A1 (en) Image processing method and apparatus therefor
WO2019245261A1 (en) Method and apparatus for encoding/decoding image
WO2019194568A1 (en) Affine model-based image encoding/decoding method and device
WO2016159610A1 (en) Method and apparatus for processing video signal
WO2020004979A1 (en) Image encoding/decoding method and apparatus
WO2018066958A1 (en) Method and apparatus for processing video signal
WO2017086738A1 (en) Method and apparatus for image encoding/decoding
WO2017086740A1 (en) Method for decoding video using in-loop filter, and device therefor
WO2016048092A1 (en) Method and device for processing video signal
WO2012150849A2 (en) Video encoding/decoding method using error resilient loop filter, and signaling method thereof
WO2019231206A1 (en) Image encoding/decoding method and device
WO2016064123A1 (en) Method and apparatus for processing video signal

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019541229

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018747331

Country of ref document: EP

Effective date: 20190902