WO2019221472A1 - 참조 샘플을 이용하는 비디오 신호 처리 방법 및 장치 - Google Patents

참조 샘플을 이용하는 비디오 신호 처리 방법 및 장치 Download PDF

Info

Publication number
WO2019221472A1
WO2019221472A1 PCT/KR2019/005750 KR2019005750W WO2019221472A1 WO 2019221472 A1 WO2019221472 A1 WO 2019221472A1 KR 2019005750 W KR2019005750 W KR 2019005750W WO 2019221472 A1 WO2019221472 A1 WO 2019221472A1
Authority
WO
WIPO (PCT)
Prior art keywords
reference samples
current block
sample set
samples
value
Prior art date
Application number
PCT/KR2019/005750
Other languages
English (en)
French (fr)
Inventor
김동철
고건중
정재홍
손주형
곽진삼
Original Assignee
주식회사 윌러스표준기술연구소
(주)휴맥스
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from KR1020180054588A external-priority patent/KR20190129641A/ko
Application filed by 주식회사 윌러스표준기술연구소, (주)휴맥스 filed Critical 주식회사 윌러스표준기술연구소
Priority to CN201980031531.8A priority Critical patent/CN112106364B/zh
Priority to CN202211073026.XA priority patent/CN115623196A/zh
Priority to CN202211073320.0A priority patent/CN115623199A/zh
Priority to KR1020217042299A priority patent/KR20210158432A/ko
Priority to CN202211073272.5A priority patent/CN115623198A/zh
Priority to CN202211073245.8A priority patent/CN115623197A/zh
Priority to KR1020207031515A priority patent/KR102344190B1/ko
Publication of WO2019221472A1 publication Critical patent/WO2019221472A1/ko
Priority to US17/089,267 priority patent/US11044470B2/en
Priority to US17/313,987 priority patent/US20210266527A1/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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/182Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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/186Methods 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 colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques

Definitions

  • the present invention relates to a method and apparatus for processing a video signal, and more particularly, to a video signal processing method and apparatus for encoding or decoding a video signal.
  • Compression coding refers to a series of signal processing techniques for transmitting digitized information through a communication line or for storing in a form suitable for a storage medium.
  • the object of compression encoding includes objects such as voice, video, text, and the like.
  • a technique of performing compression encoding on an image is called video image compression.
  • Compression coding on a video signal is performed by removing redundant information in consideration of spatial correlation, temporal correlation, and stochastic correlation.
  • the present invention has an object to improve the coding efficiency of a video signal.
  • the present invention has an object to increase the signaling efficiency associated with the prediction of the current block by using the reference samples of the current block.
  • the present invention provides a video signal processing apparatus and a video signal processing method as follows.
  • the reference samples of the first side and the reference side of the second side of the current block based on the reconstructed samples around the current block. Obtaining them; Obtaining a direct current (DC) value for prediction of the current block based on the reference sample set consisting of at least some of the reference samples on the first side and reference samples on the second side, When the length of the first side and the length of the second side are different from each other, the reference sample set is a reference of an exponential number of 2, in which some of the reference samples on the first side and the reference samples on the second side are excluded. Including samples; And reconstructing the current block based on the DC value.
  • DC direct current
  • a video signal decoding apparatus comprising a processor, the processor comprising: reference samples of a first side of the current block based on previously reconstructed samples around the current block; A direct sample for prediction of the current block based on a reference sample set composed of at least some of the reference samples on the first side and the reference samples on the second side; obtaining a current, DC) value, and when the length of the first side and the length of the second side are different from each other, the reference sample set is partially selected from the reference samples on the first side and the reference samples on the second side.
  • a video signal decoding apparatus including reference samples of the exponent multiplier number of 2 excluded from the reconstruction, and reconstructing the current block based on the DC value.
  • the reference sample set excludes reference samples of a sample number corresponding to a length of a shorter side of the first side and the second side from all of the reference samples on the first side and the reference samples on the second side. It may comprise an exponential number of two reference samples.
  • the reference sample set may be composed of reference samples on either side of a first side and a second side of the current block.
  • the reference sample set may be composed of reference samples on the longer side of the first side and the second side.
  • the reference sample set may include remaining reference samples from which reference samples on the shorter side of the first and second sides are excluded from reference samples on the first and second sides. Can be.
  • the processor compares the length of the first side with the length of the second side and, according to the comparison result, when the length of the first side is longer than the length of the second side, the reference samples configured on the side of the first side.
  • the DC value may be obtained based on the reference sample set.
  • the processor may obtain the DC value based on an average of reference samples on the first side.
  • the processor may obtain the DC value based on a length of a side having a longer length among the first side and the second side according to the comparison result.
  • a video signal encoding apparatus comprising a processor, the processor comprising: reference samples of a first side of the current block based on previously reconstructed samples around a current block; And obtaining reference samples of the second side and obtaining a DC value for prediction of the current block based on a reference sample set consisting of at least some of the reference samples of the first side and reference samples of the second side. And when the length of the first side and the length of the second side are different from each other, the reference sample set has an index of 2 excluding some of the reference samples on the first side and the reference samples on the second side.
  • a reference number of reference samples generating a prediction block of the current block based on the DC value, obtaining a residual signal of the current block based on the prediction block,
  • a video signal encoding apparatus for generating a bit stream comprising a residual signal of the block.
  • the bitstream is intra of the current block predicted intra of the blocks of the picture constituting the video in a hierarchical structure
  • a computer readable recording medium including information on a prediction mode and a residual signal of the current block is provided.
  • the computer-readable recording medium may further include obtaining reference samples on a first side and reference samples on a second side of the current block obtained from previously reconstructed samples around the current block; Obtaining a direct current (DC) value for prediction of the current block based on the reference sample set consisting of at least some of the reference samples on the first side and reference samples on the second side, When the length of the first side and the length of the second side are different from each other, the reference sample set is a reference of an exponential number of 2, in which some of the reference samples on the first side and the reference samples on the second side are excluded. Including samples; And the bitstream obtained through the step of predicting the current block based on the DC value.
  • DC direct current
  • the processor based on the reconstructed samples around the current block, the first side of the current block
  • a processing device is provided.
  • the first side and the second side may be perpendicular to each other.
  • the processor may obtain the DC value based on an average of reference samples on either side.
  • the one side may be a longer side among the first side and the second side.
  • the processor may obtain the DC value based on reference samples on the side of the first side and the second side of which the length is longer.
  • the processor compares the length of the first side with the length of the second side, and if the length of the second side is longer than the length of the first side according to the comparison result, the processor compares the average of the reference samples on the second side.
  • the DC value may be obtained based on the above.
  • the number of reference samples on the first side and the number of reference samples on the second side may each be an exponential power of two.
  • the sum of the number of reference samples on the first side and the number of reference samples on the second side may not be an exponential power of two.
  • coding efficiency of a video signal may be increased.
  • the computational complexity required for generating the prediction block of the current block can be reduced.
  • FIG. 1 is a schematic block diagram of a video signal encoding apparatus according to an embodiment of the present invention.
  • FIG. 2 is a schematic block diagram of a video signal decoding apparatus according to an embodiment of the present invention.
  • FIG. 3 illustrates an embodiment in which a coding tree unit is divided into coding units within a picture.
  • FIG. 4 illustrates one embodiment of a method for signaling the splitting of a quad tree and a multi-type tree.
  • 5 and 6 show an intra prediction method in more detail according to an embodiment of the present invention.
  • FIG. 7 is a diagram illustrating an embodiment of a method of predicting a current block when the intra prediction mode of the current block is a DC mode.
  • FIG. 8 is a diagram illustrating a method of acquiring a DC value of a current block when the height and width of the current block are different according to an embodiment of the present invention.
  • FIGS. 9, 10, and 11 are diagrams illustrating an embodiment of a method in which a reference sample set is configured when heights and widths of current blocks are different.
  • FIG. 12 is a diagram illustrating another embodiment of a method in which a reference sample set is configured when heights and widths of current blocks are different.
  • FIG. 13 is a diagram illustrating a method of acquiring a DC value of a current block based on a ratio between a width and a height of the current block according to an embodiment of the present invention.
  • FIG. 14 illustrates another embodiment of a method in which a reference sample set is configured when heights and widths of current blocks are different according to an embodiment of the present invention.
  • 15 and 16 are diagrams illustrating an embodiment of a reference sample set for obtaining a DC value of a current block when the height and width of the current block are '4' and '16'.
  • 17 and 18 are diagrams illustrating an embodiment of a reference sample set for obtaining a DC value of a current block when the height and width of the current block are '4' and '32'.
  • 19, 20, and 21 are diagrams illustrating another embodiment of a reference sample set for obtaining a DC value of the current block when the height and width of the current block are different.
  • 22, 23 and 24 illustrate another embodiment of a reference sample set for obtaining a DC value of the current block when the height and width of the current block are different.
  • 25 and 26 are diagrams illustrating an embodiment of a reference sample set for obtaining a DC value of a current block when the height and width of the current block are '4' and '32'.
  • 27, 28 and 29 illustrate a reference sample set that includes some of the reference samples on the short side of the current block and some of the reference samples on the long side of the current block, according to one embodiment of the invention. It is a figure which shows.
  • FIG. 30 is a flowchart illustrating a method of applying a weight to an average for each reference sample set according to an embodiment of the present invention.
  • 31 is a diagram illustrating a method of obtaining a DC value when the length of one of the first and second sides of the current block is not an exponential power of two, according to an embodiment of the present invention.
  • 32 illustrates one embodiment of luma blocks and chroma blocks of the current unit.
  • FIG. 33 is a diagram illustrating an embodiment in which a luma block and a chroma block are divided into different forms.
  • 34 is a diagram illustrating intra prediction modes classified according to regions according to an embodiment of the present invention.
  • 35 is a diagram illustrating a modeling group when the representative prediction mode of the luma block of the current unit is not the angular mode according to an embodiment of the present invention.
  • 37, 38, and 39 are diagrams illustrating a modeling group according to another embodiment of the present invention.
  • FIG. 40 is a diagram for a method of restoring a chroma block based on a plurality of relation models, according to an embodiment of the present invention.
  • FIG. 41 is a diagram illustrating a specific embodiment of a method in which a chroma block is restored based on a plurality of relationship models.
  • FIG. 42 is a diagram illustrating an embodiment of reference samples when a prediction mode of a current block is a DC mode.
  • 43 and 44 are diagrams illustrating an example of reference samples used for acquiring a DC value when the current block is a rectangular block.
  • Coding may optionally be interpreted as encoding or decoding.
  • an apparatus for generating a video signal bitstream by encoding (encoding) a video signal is referred to as an encoding apparatus or an encoder, and an apparatus for reconstructing a video signal by performing decoding (decoding) of a video signal bitstream is decoded.
  • device or decoder referred to as device or decoder.
  • the video signal processing apparatus is used herein as a term of a concept including both an encoder and a decoder.
  • Information is a term that includes values, parameters, coefficients, elements, and the like. In some cases, meanings may be interpreted differently, and thus the present invention is not limited thereto.
  • 'Unit' is used to refer to a basic unit of image processing or a specific position of a picture, and refers to an image region including both a luma component and a chroma component.
  • 'block' refers to an image region including a luma component and a specific component of chroma components (ie, Cb and Cr).
  • terms such as 'unit', 'block', 'partition', and 'region' may be used interchangeably.
  • a unit may be used as a concept including a coding unit, a prediction unit, and a transform unit.
  • a picture refers to a field or frame, and in some embodiments, the terms may be used interchangeably.
  • the encoding apparatus 100 of the present invention includes a transformer 110, a quantizer 115, an inverse quantizer 120, an inverse transformer 125, a filter 130, and a predictor 150. ) And the entropy coding unit 160.
  • the transform unit 110 obtains a transform coefficient value by converting a residual signal that is a difference between the input video signal and the prediction signal generated by the predictor 150.
  • a discrete cosine transform DCT
  • DST discrete sine transform
  • the discrete cosine transform and the discrete sine transform divide the input picture signal into a block to perform the transform.
  • the coding efficiency may vary depending on the distribution and the characteristics of the values in the transform domain.
  • the quantization unit 115 quantizes the transform coefficient value output from the transform unit 110.
  • the prediction unit 150 predicts the picture using a region already coded, and adds a residual value between the original picture and the predictive picture to the predicted picture to increase the coding efficiency.
  • the method of obtaining is used.
  • information that is also available at the decoder should be used when performing prediction at the encoder.
  • the encoder performs a process of restoring the encoded current block again.
  • the inverse quantization unit 120 inverse quantizes the transform coefficient value, and the inverse transform unit 125 restores the residual value by using the inverse quantized transform coefficient value.
  • the filtering unit 130 performs a filtering operation for improving the quality of the reconstructed picture and improving the coding efficiency.
  • a deblocking filter For example, a sample adaptive offset (SAO), an adaptive loop filter, and the like may be included.
  • the filtered picture is output or stored in a decoded picture buffer (DPB) 156 for use as a reference picture.
  • DPB decoded picture buffer
  • the predictor 150 includes an intra predictor 152 and an inter predictor 154.
  • the intra predictor 152 performs intra prediction in the current picture, and the inter predictor 154 predicts the current picture using the reference picture stored in the decoded picture buffer 156. Do this.
  • the intra prediction unit 152 performs intra prediction from reconstructed samples in the current picture, and transmits the intra encoding information to the entropy coding unit 160.
  • the intra encoding information may include at least one of an intra prediction mode, a Most Probable Mode (MPM) flag, and an MPM index.
  • the inter predictor 154 may include a motion estimator 154a and a motion compensator 154b.
  • the motion estimation unit 154a obtains a motion vector value of the current region by referring to a specific region of the reconstructed reference picture.
  • the motion estimator 154a transmits a motion information set (reference picture index, motion vector information, etc.) for the reference region to the entropy coding unit 160.
  • the motion compensator 154b performs motion compensation using the motion vector value transmitted from the motion estimator 154a.
  • the inter prediction unit 154 transfers inter encoding information including the motion information set for the reference region to the entropy coding unit 160.
  • the predictor 150 may include an intra block copy (BC) predictor (not shown).
  • the intra BC prediction unit performs intra BC prediction from reconstructed samples in the current picture, and transmits the intra BC encoding information to the entropy coding unit 160.
  • the intra BC predictor obtains a block vector value of the current region by referring to a specific region in the current picture.
  • the intra BC predictor may perform intra BC prediction using the obtained block vector value.
  • the intra BC predictor transfers the intra BC encoding information to the entropy coding unit 160.
  • the intra BC encoding information may include block vector information.
  • the transform unit 110 obtains a transform coefficient value by converting a residual value between the original picture and the predictive picture.
  • the transformation may be performed in a specific block unit in the picture, and the size of the specific block may vary within a preset range.
  • the quantization unit 115 quantizes the transform coefficient value generated by the transform unit 110 and transmits the quantized unit 115 to the entropy coding unit 160.
  • the entropy coding unit 160 entropy-codes the quantized transform coefficients, intra encoding information, inter encoding information, and the like to generate a video signal bitstream.
  • a variable length coding (VLC) method and an arithmetic coding method may be used.
  • the variable length coding (VLC) scheme converts input symbols into consecutive codewords, which may have a variable length. For example, frequently occurring symbols are represented by short codewords and infrequently occurring symbols by long codewords.
  • a context-based adaptive variable length coding (CAVLC) method may be used as a variable length coding method.
  • Arithmetic coding converts consecutive data symbols into a single prime number, which can obtain the optimal fractional bits needed to represent each symbol.
  • Context-based Adaptive Binary Arithmetic Code (CABAC) may be used as the arithmetic coding.
  • CABAC Context-based Adaptive Binary Arithmetic Code
  • the generated bitstream is encapsulated in a NAL unit.
  • the NAL unit includes coded integer coding tree units.
  • a bitstream In order to decode a bitstream in a video decoder, a bitstream must first be divided into NAL unit units, and then each separated NAL unit must be decoded.
  • information necessary for decoding the video signal bitstream is a higher level set such as a picture parameter set (PPS), a sequence parameter set (SPS), a video parameter set (VPS), or the like. It may be transmitted through the Raw Byte Sequence Payload (RBSP).
  • PPS picture parameter set
  • SPS sequence parameter set
  • VPN video parameter set
  • RBSP Raw Byte Sequence Payload
  • FIG. 1 illustrates an encoding apparatus 100 according to an embodiment of the present invention, in which blocks marked separately represent logically distinguishing elements of the encoding apparatus 100. Therefore, the above-described elements of the encoding apparatus 100 may be mounted in one chip or in a plurality of chips according to the design of the device. According to an embodiment, the operation of each element of the encoding apparatus 100 described above may be performed by a processor (not shown).
  • the decoding apparatus 200 of the present invention includes an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 225, a filtering unit 230, and a prediction unit 250.
  • the entropy decoding unit 210 entropy decodes the video signal bitstream to extract transform coefficients, intra encoding information, inter encoding information, and the like for each region.
  • the inverse quantizer 220 inverse quantizes the entropy decoded transform coefficient, and the inverse transform unit 225 restores the residual value by using the inverse quantized transform coefficient.
  • the video signal processing apparatus 200 reconstructs the original pixel value by summing the residual value obtained by the inverse transformer 225 with a predictor obtained by the predictor 250.
  • the filtering unit 230 performs filtering on the picture to improve the picture quality. This may include a deblocking filter to reduce block distortion and / or an adaptive loop filter to remove distortion of the entire picture.
  • the filtered picture is output or stored in a decoded picture buffer (DPB) 256 for use as a reference picture for the next picture.
  • DPB decoded picture buffer
  • the predictor 250 includes an intra predictor 252 and an inter predictor 254.
  • the predictor 250 generates a predictive picture by using the encoding type decoded by the entropy decoding unit 210 described above, transform coefficients for each region, intra / inter encoding information, and the like.
  • a decoded area of the current picture or other pictures including the current block may be used.
  • a picture (or tile / slice) that can be performed is called an inter picture (or tile / slice).
  • a picture (or tile / slice) using at most one motion vector and reference picture index to predict the sample values of each block among the inter pictures (or tiles / slices) is a predictive picture or a P picture (or , A tile / slice), and a picture (or tile / slice) using at most two motion vectors and a reference picture index is called a bi-predictive picture or a B picture (or tile / slice).
  • the P picture (or tile / slice) uses up to one set of motion information to predict each block
  • the B picture (or tile / slice) uses up to two motion information to predict each block.
  • the motion information set includes one or more motion vectors and one reference picture index.
  • the intra prediction unit 252 generates a prediction block by using the intra encoding information and the reconstructed samples in the current picture.
  • the intra encoding information may include at least one of an intra prediction mode, a Most Probable Mode (MPM) flag, and an MPM index.
  • MPM Most Probable Mode
  • the intra predictor 252 predicts sample values of the current block by using reconstructed samples located on the left and / or top of the current block as reference samples.
  • reconstructed samples, reference samples, and samples of the current block may represent pixels.
  • sample values may represent pixel values.
  • the reference samples may be samples included in the neighboring block of the current block.
  • the reference samples may be samples on a line adjacent to the left boundary of the current block and / or samples on a line adjacent to the upper boundary.
  • the reference samples are located on a line within a predetermined distance from the upper boundary of the current block and / or on a line within a predetermined distance from the left boundary of the current block among the samples of the neighboring blocks of the current block. May be samples.
  • the neighboring block of the current block is a left (L) block, an upper (A) block, a lower left (BL) block, an upper right (AR) block, or an upper left (Above Left) adjacent to the current block.
  • AL may include at least one of the blocks.
  • the inter prediction unit 254 generates a prediction block by using the reference picture and inter encoding information stored in the decoded picture buffer 256.
  • the inter encoding information may include a motion information set (reference picture index, motion vector information, etc.) of the current block with respect to the reference block.
  • Inter prediction may include L0 prediction, L1 prediction, and bi-prediction.
  • L0 prediction means prediction using one reference picture included in the L0 picture list
  • L1 prediction means prediction using one reference picture included in the L1 picture list.
  • one set of motion information eg, a motion vector and a reference picture index
  • up to two reference regions may be used, and these two reference regions may exist in the same reference picture or may exist in different pictures, respectively.
  • up to two sets of motion information may be used, and two motion vectors may correspond to the same reference picture index or may be different from each other. It may also correspond.
  • the reference pictures may be displayed (or output) before or after the current picture in time.
  • the inter predictor 254 may obtain a reference block of the current block by using the motion vector and the reference picture index.
  • the reference block exists in the reference picture corresponding to the reference picture index.
  • a sample value of the block specified by the motion vector or an interpolated value thereof may be used as a predictor of the current block.
  • an 8-tap interpolation filter can be used for luma signals and a 4-tap interpolation filter can be used for chroma signals for motion prediction with pixel accuracy in sub-pel units.
  • the interpolation filter for motion prediction in the subpel unit is not limited thereto.
  • the inter predictor 254 performs motion compensation to predict the texture of the current unit from the previously reconstructed picture. In this case, the inter predictor may use the motion information set.
  • the predictor 250 may include an intra BC predictor (not shown).
  • the intra BC prediction unit performs intra BC prediction from reconstructed samples in the current picture, and transmits the intra BC encoding information to the entropy coding unit 160.
  • the intra BC predictor obtains a block vector value of the current region by referring to a specific region in the current picture.
  • the intra BC predictor may perform intra BC prediction using the obtained block vector value.
  • the intra BC predictor transfers the intra BC encoding information to the entropy coding unit 160.
  • the intra BC encoding information may include block vector information.
  • the predictor output from the intra predictor 252 or the inter predictor 254 and the residual value output from the inverse transform unit 225 are added to generate a reconstructed video picture. That is, the video signal decoding apparatus 200 reconstructs the current block by using the prediction block generated by the predictor 250 and the residual obtained by the inverse transform unit 225.
  • FIG. 2 illustrates a decoding apparatus 200 according to an embodiment of the present invention, in which blocks separately displayed are logically distinguished elements of the decoding apparatus 200. Therefore, the above-described elements of the decoding apparatus 200 may be mounted in one chip or in a plurality of chips according to the design of the device. According to an embodiment, the operation of each element of the above-described decoding apparatus 200 may be performed by a processor (not shown).
  • FIG. 3 illustrates an embodiment in which a coding tree unit (CTU) is divided into coding units (CUs) in a picture.
  • CTU coding tree unit
  • CUs coding units
  • a picture may be divided into a sequence of coding tree units (CTUs).
  • the coding tree unit consists of an NXN block of luma samples and two blocks of corresponding chroma samples.
  • the coding tree unit may be divided into a plurality of coding units.
  • the coding tree unit may be a leaf node without splitting. In this case, the coding tree unit itself may be a coding unit.
  • the coding unit refers to a basic unit for processing a picture in the processing of the video signal described above, that is, in the process of intra / inter prediction, transformation, quantization, and / or entropy coding.
  • the size and shape of the coding unit in one picture may not be constant.
  • the coding unit may have a square or rectangular shape.
  • the rectangular coding unit (or rectangular block) includes a vertical coding unit (or vertical block) and a horizontal coding unit (or horizontal block).
  • the vertical block is a block whose height is larger than the width
  • the horizontal block is a block whose width is larger than the height.
  • non-square blocks may refer to rectangular blocks in the present specification, the present invention is not limited thereto.
  • a coding tree unit is first divided into a quad tree (QT) structure. That is, in a quad tree structure, one node having a size of 2NX2N may be divided into four nodes having a size of NXN.
  • a quad tree may also be referred to as a quaternary tree. Quad tree splitting can be performed recursively, and not all nodes need to be split to the same depth.
  • the above-described leaf node of the quad tree may be further divided into a multi-type tree (MTT) structure.
  • MTT multi-type tree
  • one node in a multi-type tree structure, one node may be divided into a binary or ternary tree structure of horizontal or vertical division. That is, there are four partition structures in the multi-type tree structure: vertical binary partition, horizontal binary partition, vertical ternary partition, and horizontal ternary partition.
  • the width and height of each node in each tree structure may have a power of two.
  • BT binary tree
  • a 2NX2N sized node may be divided into two NX2N nodes by vertical binary division and two 2NXN nodes by horizontal binary division.
  • a 2NX2N sized node is divided into nodes of (N / 2) X2N, NX2N and (N / 2) X2N by vertical ternary division, and the horizontal ternary By splitting, it can be split into nodes of 2NX (N / 2), 2NXN and 2NX (N / 2).
  • This multi-type tree split may be performed recursively.
  • Leaf nodes of the multi-type tree may be coding units. If no splitting for a coding unit is indicated or if the coding unit is not large relative to the maximum transform length, then that coding unit is used as the unit of prediction and transform without further splitting. Meanwhile, at least one of the following parameters in the aforementioned quad tree and multi-type tree may be previously defined or transmitted through an RBSP of a higher level set such as PPS, SPS, VPS, and the like.
  • Preset flags may be used to signal the division of the aforementioned quad tree and multi-type tree.
  • a flag 'qt_split_flag' indicating whether a quad tree node is split
  • a flag 'mtt_split_flag' indicating whether a multi-type tree node is split
  • a flag 'mtt_split_vertical_flag' indicating a split direction of a multi-type tree node
  • at least one of a flag 'mtt_split_binary_flag' indicating a split shape of the multi-type tree node.
  • a coding tree unit is a root node of a quad tree and may be first divided into quad tree structures.
  • 'qt_split_flag' is signaled for each node 'QT_node'. If the value of 'qt_split_flag' is 1, the node is divided into 4 square nodes. If the value of 'qt_split_flag' is 0, the node becomes the leaf node 'QT_leaf_node' of the quad tree.
  • Each quad tree leaf node 'QT_leaf_node' may be further divided into a multi-type tree structure.
  • 'mtt_split_flag' is signaled for each node 'MTT_node'. If the value of 'mtt_split_flag' is 1, the node is divided into a plurality of rectangular nodes. If the value of 'mtt_split_flag' is 0, the node becomes the leaf node 'MTT_leaf_node' of the multi-type tree.
  • the node 'MTT_node' is divided into two rectangular nodes, and when the value of 'mtt_split_binary_flag' is 0, the node 'MTT_node' is divided into three rectangular nodes.
  • Picture prediction (motion compensation) for coding is directed to coding units (i.e. leaf nodes of the coding unit tree) that are no longer divided.
  • the basic unit for performing such prediction is hereinafter referred to as a prediction unit or a prediction block.
  • the term unit used in the present specification may be used as a term to replace the prediction unit, which is a basic unit for performing prediction.
  • the present invention is not limited thereto and may be broadly understood as a concept including the coding unit.
  • the intra predictor predicts the sample values of the current block using reconstructed samples located on the left and / or top of the current block as reference samples.
  • FIG. 5 shows one embodiment of reference samples used for prediction of the current block in intra prediction mode.
  • the reference samples may be samples adjacent to the left boundary of the current block and / or samples adjacent to the upper boundary.
  • the size of the current block is WXH and samples of a single reference line adjacent to the current block are used for intra prediction, at most 2W + 2H + 1 located on the left and / or top of the current block.
  • Reference samples may be set using the four peripheral samples.
  • samples on the plurality of reference lines may be used for intra prediction of the current block.
  • the plurality of reference lines may be composed of n lines located within a preset distance from the boundary of the current block.
  • separate reference line information indicating at least one reference line used for intra prediction of the current block may be signaled.
  • the reference line information may include an index indicating one of the plurality of reference lines.
  • a reference sample on a side of a current block may be reference samples within a height or width range of the current block among reference samples around the side.
  • the reference samples around a specific side may be samples on any one of the plurality of reference lines.
  • the reference sample on the left side of the current block may represent reference samples within the height range of the current block among reference samples around the left side.
  • the reference sample on the left side of the current block may represent reference samples within a width range of the current block among reference samples around the left side.
  • a reference sample on a specific side may be referred to as a reference sample corresponding to the specific side.
  • the intra prediction unit may perform a reference sample padding process to obtain a reference sample.
  • the intra predictor may perform a reference sample filtering process to reduce the error of the intra prediction. That is, the filtered reference samples may be obtained by filtering the samples around the current block and / or the reference samples obtained by the reference sample padding process. The intra predictor predicts the samples of the current block using unfiltered reference samples or filtered reference samples.
  • intra prediction mode information indicating an intra prediction direction may be signaled.
  • the intra prediction mode information indicates any one of a plurality of intra prediction modes constituting an intra prediction mode set. If the current block is an intra predicted block, the decoder receives the intra prediction mode information of the current block from the bitstream. The intra prediction unit of the decoder performs intra prediction on the current block based on the extracted intra prediction mode information.
  • the intra prediction mode set may include all intra prediction modes (eg, a total of 67 intra prediction modes) used for intra prediction. More specifically, the intra prediction mode set may include a planar mode, a direct current (DC) mode, and a plurality of (eg, 65) angle modes (ie, directional modes). In some embodiments, the intra prediction mode set may be configured with some of all intra prediction modes. Each intra prediction mode may be indicated through a preset index (ie, an intra prediction mode index). For example, as shown in FIG. 6, the intra prediction mode index 0 indicates the planar mode, and the intra prediction mode index 1 indicates the DC mode. In addition, the intra prediction mode indexes 2 to 66 may indicate different angle modes, respectively.
  • the intra prediction mode index 0 indicates the planar mode
  • the intra prediction mode index 1 indicates the DC mode.
  • the intra prediction mode indexes 2 to 66 may indicate different angle modes, respectively.
  • the intra prediction mode index 2 indicates a horizontal diagonal (HDIA) mode
  • the intra prediction mode index 18 indicates a horizontal (HOR) mode
  • the intra prediction mode index 34 indicates a diagonal (Diagonal, DIA).
  • the intra prediction mode index 50 indicates a vertical (VER) mode
  • intra prediction mode index 66 indicates a vertical diagonal (VDIA) mode.
  • the decoder may obtain intra prediction mode information for prediction of the current block.
  • the intra prediction mode information of the current block may indicate any one of intra prediction modes included in the intra prediction mode set.
  • Intra prediction mode information for prediction of the current block may indicate a DC mode.
  • the decoder may reconstruct the current block based on the DC mode.
  • the encoder and the decoder may obtain a prediction block of the current block based on a direct current (DC) value.
  • the DC value may be obtained based on the reference sample of the current block.
  • the DC value of the current block may be obtained based on a plurality of reference samples corresponding to each of the upper side and the left side of the current block.
  • the DC value of the current block may be obtained based on an average of a plurality of reference sample values corresponding to each of the upper side and the left side of the current block.
  • the prediction mode of the current block is the DC mode, all prediction sample values in the prediction block may be obtained based on a single DC value.
  • the decoder may reconstruct the current block based on the obtained prediction block.
  • the encoder may obtain the residual signal of the current block based on the prediction block.
  • the encoder can generate a bitstream including the residual signal by encoding the residual signal of the current block.
  • the encoder may transmit the generated bitstream to the decoder.
  • the decoder may receive from the encoder a bitstream that includes the residual signal of the current block.
  • the decoder may reconstruct the current block based on the obtained prediction block and the received residual signal.
  • boundary filtering such as position dependent intra prediction combination (PDPC) may be performed on the prediction block of the current block.
  • the residual signal may be obtained based on the encoder filtered prediction block.
  • the decoder may reconstruct the current block based on the filtered prediction block.
  • the DC value of the current block represents a DC value for prediction of the current block.
  • a DC value for prediction of the current block 701 may be obtained based on a plurality of reference samples 702 corresponding to each of the upper side and the left side of the current block 701.
  • the DC value may be obtained based on the average of the plurality of reference samples 702 of the current block 701. As illustrated in FIG.
  • L1, L2, L3 can be used for DC value acquisition.
  • the DC value of the current block 701 may be an average of sample values of each of the plurality of reference samples U0, U1, U2, U3, L0, L1, L2, L3.
  • the encoder and the decoder calculate an average of the reference samples U0, U1, U2, U3, L0, L1, L2, and L3 corresponding to the upper side and the left side of the current block, respectively, of the current block 701. DC value can be obtained.
  • a division operation may be performed to obtain an average of sample values.
  • the division operation may be a factor in increasing the complexity and computational complexity of video signal processing in hardware or software implementation.
  • the shift operator may replace the division operator. That is, when the divisor is an exponent of 2, the encoder and the decoder may perform a division operation using one shift operator. Accordingly, when the number of reference sample values to be subjected to the average value calculation is an exponent of 2, the encoder and the decoder may obtain an average of the reference sample values by using a shift operator.
  • a shift operation or operator may represent a bit-wise arithmetic shift operation or operator.
  • the encoder and the decoder may perform a shift operation on the total sum of the sample values of each of the reference samples corresponding to each of the upper side and the left side of the current block.
  • the encoder and the decoder may shift the total sum of the sample values by the shift parameter.
  • the shift parameter may be determined based on the length of at least one of the width or height of the current block.
  • the shift parameter may be the sum of the width and height of the current block.
  • the sum of the width and height of the current block may be the number of reference samples used to obtain the DC value. In this way, the encoder and the decoder may acquire the DC value of the current block without performing a division operation. If this is expressed as an equation, Equation 1 below.
  • Equation 1 W represents the width of the current block, H represents the height of the current block.
  • SUM (W + H) represents the sum of all W upper reference sample values corresponding to the upper side of the current block and H left reference sample values corresponding to the left side.
  • ">>” represents a shift operator. Specifically, ">>” represents a right shift operator. The right shift operator binarizes the argument input to the operator, and shifts the binarized argument to the right by the shift parameter.
  • offset may be a parameter for rounding off a fractional part of the average value.
  • the offset may be determined based on the length of at least one of the width or height of the current block.
  • the offset may be a value obtained by dividing the sum of the width and the height of the current block by two. That is, the offset may be a value obtained by dividing the number of reference samples used for acquiring the DC value by two.
  • the offset may be expressed as 2 ⁇ (log2 (W + H) -1).
  • the number of reference samples used to acquire a DC value of the current block may be an exponential power of two.
  • the encoder and the decoder may obtain an average of the reference sample values of the exponent number of two using the shift operator.
  • the encoder and the decoder may obtain the DC value of the current block using only an addition operation and a shift operation. Accordingly, the encoder and the decoder according to an embodiment of the present invention can be implemented in low complexity hardware or software as compared to the case of obtaining a DC value by using a division operation.
  • the shape of the current block may not be square depending on how the current block is divided from the coding tree unit.
  • the size and shape of the prediction unit split from the coding tree unit may not be constant.
  • the current block may be a rectangular block having different heights and widths of the current block.
  • the number of reference samples corresponding to each of the upper side and the left side of the current block may not be an exponential number of two. That is, the sum of the number of samples corresponding to the length of the upper side of the current block and the number of samples corresponding to the length of the left side may not be an exponential power of two.
  • the current block may be a rectangular block having a height and a width of '4' and '8', respectively.
  • the number of reference samples corresponding to each of the upper side and the left side of the current block is (4 + 8) (that is, 12). If the number of reference samples used for obtaining the DC value is not an exponential power of 2, the encoder and the decoder may be difficult to obtain the DC value in the same manner as in FIG. That is, when the height and width of the current block are different, division operations may be implemented at the encoder and the decoder. However, if the processing involves a division operation, the computation speed may decrease due to the increased complexity.
  • the encoder and the decoder may obtain the DC value of the current block by using a different method than when the height and the width of the current block are the same.
  • an encoder and a decoder according to an embodiment of the present invention may obtain a DC value of a current block based on a reference sample set including some of reference samples corresponding to each of the left side and the upper side of the current block. Can be.
  • the number of reference samples included in the reference sample set may be an exponential power of two.
  • the reference sample set may be composed of reference samples at a preset position.
  • the reference sample set may be composed of reference samples satisfying a preset condition.
  • the encoder and the decoder may compare the length of the first side and the length of the second side of the current block.
  • the first side may be any one of an upper side and a left side of the current block.
  • the second side may be the other of the upper side and the left side of the current block. According to the comparison result, when the length of the first side and the length of the second side are the same, the encoder and the decoder may obtain the DC value of the current block by the method described above with reference to FIG. 7.
  • the encoder and the decoder may configure a reference sample set including some of the reference samples.
  • the encoder and decoder may construct a reference sample set that includes an exponential multiplier of two reference samples that are some of the first side reference samples and the second side reference samples of the current block.
  • the encoder and the decoder may obtain a reference sample set including an exponential number of two reference samples, some of which are excluded from the first side reference samples and the second side reference samples.
  • the encoder and the decoder may obtain the DC value of the current block based on the reference sample set.
  • the encoder and decoder may predict the current block based on the obtained DC value.
  • the current block 801 may be a rectangular block having a height N and a width M different from each other.
  • the number of DC reference samples corresponding to each of the first side and the second side of the current block 801 may be (M + N).
  • DC reference samples may be used as a term indicating all of a plurality of reference samples corresponding to each of the upper side and the left side of the current block.
  • the DC value of the current block 801 may be obtained based on a reference sample set that includes a (M '+ N') number of reference samples that are some of the (M + N) DC reference samples.
  • (M '+ N') may be represented by 2 ⁇ k (where k is an integer).
  • (M '+ N') may be smaller than (M + N).
  • the reference sample set may include remaining reference samples except for at least some of the short side reference samples among the DC reference samples.
  • the reference sample set may include remaining reference samples except at least some of the long side reference samples among the DC reference samples.
  • the DC value of the current block may be obtained based on at least one reference sample set.
  • the encoder and the decoder may obtain the DC value of the current block based on one reference sample set.
  • the DC value of the current block 801 may be obtained based on an average of reference sample values included in the reference sample set.
  • Equation 2 shows how a DC value is obtained based on a reference sample set. Referring to [Equation 2], the encoder and the decoder may obtain the DC value of the current block without performing division.
  • Equation 2 SUM (M '+ N') represents a sum of reference sample values included in a reference sample set among reference sample values corresponding to each of an upper side and a left side of the current block.
  • M ' represents the number of reference samples included in the reference sample set among the reference samples corresponding to the upper side.
  • N ' represents the number of reference samples included in the reference sample set among the reference samples corresponding to the left side.
  • the offset may be a parameter for rounding off the fractional part of the average value. For example, the offset may be '(M' + N ') >> 1'.
  • the encoder and the decoder may obtain the DC value of the current block based on the plurality of reference sample sets. This will be described in detail with reference to FIG. 14. Hereinafter, various methods of configuring a reference sample set for acquiring a DC value of the current block when the height and width of the current block are different will be described.
  • the current block 901 is a rectangular block having a height and a width of '4' and '8', respectively.
  • the total number of reference samples corresponding to each of the upper side and the left side of the current block 901 is (4 + 8) (that is, 12).
  • the division operator is difficult to be replaced by the shift operator when the number of reference samples used for obtaining the DC value is not an exponential power of two.
  • the encoder And division operations must be implemented at the decoder.
  • the DC value of the current block 901 may be obtained based on some of the reference samples corresponding to each of the upper side and the left side of the current block.
  • the encoder and the decoder may obtain the DC value of the current block without implementing division.
  • the DC value of the current block 901 is a reference sample set consisting of some of 12 reference samples L0, L1, L2, L3, 0, 1, 2, 3, 4, 5, 6, 7 ( Can be obtained based on DC0).
  • the encoder and decoder may construct a reference sample set according to predefined rules between the encoder and the decoder.
  • the reference sample set DC0 may be configured of remaining reference samples from which a predetermined number of samples are excluded from reference samples corresponding to each of the upper side and the left side of the current block 901.
  • the encoder and decoder may construct a reference sample set consisting of the remaining reference samples.
  • the number of remaining reference samples may be an exponential number of two.
  • the preset number may be the number of samples corresponding to the length of a specific side.
  • the total number of DC reference samples of the current block may be the sum of the width and height of the current block.
  • the reference sample set may consist of M or N reference samples.
  • the number of reference samples included in the reference sample set may be an exponential power of two.
  • the specific side may be a short side among the first side and the second side of the current block.
  • the reference sample set may include the remaining reference samples from which the reference number of the sample number corresponding to the length of the short side is excluded from all of the DC reference samples. That is, the number of reference samples included in the reference sample set may be the number of samples corresponding to the length of the long side among the first side and the second side of the current block. If the width of the current block is longer than the height, the specific side may be the left side. Also, when the width of the current block is smaller than the height, the specific side may be the upper side.
  • the reference sample set may be composed of remaining reference samples excluded by the number of short side samples among DC reference samples of the current block.
  • Equation 2 described above with reference to FIG. 8 may be expressed as (SUM (number of remaining reference samples) + (length of long sides >> 1)) >> log2 (length of long sides).
  • the length of the long side may represent the length of the longer side of the first side and the second side of the current block.
  • the encoder and the decoder may obtain the DC value of the current block based on the length of the long side among the first side and the second side of the current block.
  • the reference sample set DC0 includes reference samples L1, L2, L3, L4, 0, 1, 2, 3, 4, 5, respectively corresponding to the left side and the upper side of the current block 901. 6, 7) may be composed of the remaining reference samples (L1, L2, L3, L4, 1, 3, 5, 7) excluded by the number of short side samples.
  • the DC value of the current block 901 may be obtained based on an average of reference sample values included in the reference sample set DC0. In this case, a method of determining the position of each of the reference samples included in the reference sample set or the position of each of the DC reference samples not included in the reference sample set will be described later.
  • the position of the reference sample may be a position relative to the position of the upper left sample of the current block.
  • the reference sample set may include some of the reference samples on the long side of the current block and all of the reference samples on the short side of the current block.
  • the encoder and decoder may select some of the reference samples of the long side of the current block.
  • the encoder and the decoder may construct a reference sample set that includes the selected some long side side reference samples and a short side side adjacent reference samples.
  • the reference sample set may include only some of the long sides of the reference samples 0, 1, 2, 3, 4, 5, 6, and 7.
  • the reference sample set may include the remaining reference samples except the reference samples of a specific position among the long side samples.
  • the specific position may be determined based on the ratio of the short side to the long side of the current block.
  • an interval between reference samples among DC reference samples not included in the reference sample set may be determined based on a ratio of the short side to the long side of the current block.
  • the ratio of the short side to the long side may be '8/4' (ie, '2').
  • the reference sample set may include reference samples ⁇ 1, 3, 5, 7 ⁇ .
  • the reference sample set may include reference samples ⁇ 0, 2, 4, 6 ⁇ .
  • '%' Represents the remainder operation.
  • the reference sample index may represent the x-coordinate of the reference sample.
  • the reference sample index may represent the y-coordinate of the reference sample.
  • the predetermined remaining value may be any one of the remaining possible values according to the ratio of the short side to the long side, which is the dividend of the remainder operation.
  • a specific position of reference samples that are not included in the reference sample set among the DC reference samples may be determined according to the 'preset remaining value'.
  • the ratio of the short side to the long side of the current block 1001 may be '16 / 4 '(ie,' 4 ').
  • the reference sample set DC0 may include reference samples ⁇ 0, 2, 3, 4, 6, 7, 8, 10, 11, 12, 14, 15 ⁇ . 10 illustrates a reference sample set configured when the preset remaining value is '1'.
  • the reference sample set DC0 may include the remaining reference samples from which reference samples at positions equally spaced from the reference sample positioned second from the left are excluded among the reference samples corresponding to the upper side of the current block.
  • the present disclosure is not limited thereto. If the preset value is something other than '1', the position of each of the excluded reference samples may be different.
  • the ratio of the short side to the long side of the current block 1101 may be '32 / 4 '(ie,' 8 ').
  • the reference sample set DC0 may include the remaining reference samples except the reference samples ⁇ 0, 8, 16, 24 ⁇ among the DC reference samples.
  • the embodiments described with reference to FIGS. 9 and 10 may be applied to the embodiment of FIG. 11 in the same or corresponding manner.
  • the reference sample set may include remaining reference samples except for a predetermined number of consecutive reference samples among DC reference samples.
  • 12 illustrates another embodiment of how the reference sample set is configured when the height and width of the current block 1201 are different.
  • the reference sample set DC0 may include remaining reference samples except for reference samples ⁇ 0, 1, 14, and 15 ⁇ among DC reference samples.
  • the reference sample set is illustrated as including all of the reference samples on the short side of the current block and some of the reference samples on the long side, but the present disclosure is not limited thereto.
  • the reference sample set may include remaining reference samples from which all of the reference samples on the side of the short side of the current block are excluded from all of the DC reference samples.
  • the reference sample set may be composed of remaining reference samples in which reference samples on the short side of the current block are excluded from all of the DC reference samples.
  • the short side of the current block may represent a short side among the first side and the second side of the current block. That is, the reference sample set may be composed of reference samples of the long side of the first side and the second side of the current block.
  • the DC value of the current block may be obtained based on a reference sample set composed of reference samples on the long side of the first side and the second side. In addition, the DC value of the current block may be obtained based on the length of the longer side among the first side and the second side.
  • the encoder and the decoder may compare the length of the first side and the length of the second side of the current block. According to the comparison result, when the length of the first side is longer than the length of the second side, the encoder and the decoder may obtain a reference sample set consisting of the reference samples on the first side. Also, the encoder and the decoder may obtain the DC value of the current block based on the average of the reference sample values of the side on the first side. Conversely, if the length of the second side is longer than the length of the first side, the encoder and decoder may obtain a reference sample set composed of reference samples on the second side. In this case, the encoder and the decoder may obtain the DC value of the current block based on the reference sample set composed of the reference samples on the second side.
  • the reference sample set may be configured only when the ratio of the long side to the short side is greater than or equal to the reference ratio.
  • FIG. 13 is a diagram illustrating a method of determining a DC value of a current block based on a ratio between a width and a height of the current block according to an embodiment of the present invention. Referring to FIG. 13, the DC value of the current block may be obtained based on the reference sample set only when the ratio of the short side to the long side is '4' or more.
  • the encoder and the decoder may obtain a ratio of the short side to the long side based on the height and width of the current block. If the ratio of the short side to the long side of the current block is greater than or equal to the reference ratio, the encoder and decoder may construct a reference sample set. In addition, the encoder and the decoder may obtain the DC value of the current block based on the configured reference sample set. On the other hand, when the ratio of the short side to the long side of the current block is smaller than the reference ratio, the encoder and the decoder may alternatively obtain the DC value of the current block. For example, the encoder and the decoder may obtain the DC value of the current block based on a weight according to the ratio of the current block. When the height and width of the current block are different from each other, a method of obtaining the DC value of the current block based on the weight according to the ratio of the current block by the encoder and the decoder will be described later with reference to FIG. 30.
  • the long side reference sample and the short side reference sample constituting the reference sample set may be the same number.
  • the encoder and the decoder may match the number of reference samples on the long side and the number of reference samples on the short side so that the number of reference samples included in the reference sample set is an exponential number of two. .
  • the length of the short side of the current block 1401 may be '4', and the length of the long side may be '8'.
  • the reference sample set may include four specific reference samples among the long side reference samples 0, 1, 2, 3, 4, 5, 6, and 7.
  • the reference sample set includes some reference samples 4, 5, 6 and 7 on the right side of the long side sides of the reference samples 0, 1, 2, 3, 4, 5, 6 and 7. It may include some reference samples (0, 1, 2, 3) on the left side which are excluded.
  • the reference sample set may include some reference samples (0, 1, 2, 3) on the left side of the long side samples (0, 1, 2, 3, 4, 5, 6, and 7). It may include some reference samples 4, 5, 6, 7 on the right side that have been excluded.
  • the reference sample set may include odd reference samples (0, 2, 4, 6) with reference to the leftmost reference sample among the reference samples on the long side of the current block.
  • the reference sample set may include even reference samples 1, 3, 5, and 7 based on the reference sample located at the leftmost side among the reference samples on the long side of the current block.
  • the DC value of the current block 1401 may be obtained based on either the first reference sample set DC0 or the second reference sample set DC1.
  • the first reference sample set DC0 may include ⁇ L0, L1, L2, L3, 0, 1, 2, 3 ⁇ .
  • the second reference sample set DC1 may include ⁇ L0, L1, L2, L3, 4, 5, 6, 7 ⁇ . That is, the reference samples L0, L1, L2, and L3 on the short side may be commonly included in each of the first reference sample set DC0 and the second reference sample set DC1.
  • the DC value of the current block 1401 may be obtained based on an average of reference sample values included in the first reference sample set DC0.
  • the DC value of the current block 1401 may be obtained based on an average of reference sample values included in the second reference sample set DC1.
  • the DC value of the current block may be obtained based on a plurality of reference sample sets.
  • a plurality of reference sample sets may be configured based on reference samples corresponding to each of the upper side and the left side of the current block.
  • the number of reference samples included in each of the plurality of reference sample sets may be an exponential number of two.
  • the DC value of the current block may be obtained based on at least two or more reference sample sets of the plurality of reference sample sets.
  • the encoder and decoder may determine at least two or more reference sample sets of the plurality of reference sample sets.
  • the encoder and the decoder may obtain an average of sample values of each of the reference samples included in the reference sample set for each determined reference sample set.
  • the encoder and the decoder may obtain the DC value of the current block based on the final average between the averages per reference sample set.
  • the DC value of the current block 1401 may be obtained based on the first reference sample set DC0 and the second reference sample set DC1.
  • the encoder and the decoder may obtain a first average of all reference sample values included in the first reference sample set DC0.
  • the encoder and the decoder may obtain a second average of all reference sample values included in the second reference sample set DC1.
  • the encoder and the decoder may obtain the DC value of the current block 1401 based on the first average and the second average.
  • the DC value of the current block 1401 may be obtained based on the final average between the first average and the second average. Equation 3 shows an embodiment in which a DC value of a current block is obtained based on a plurality of reference sample sets.
  • Average_DC0 and Average_DC1 represent a first average and a second average, respectively.
  • the offset may be a parameter for rounding off the fractional part of the average value.
  • W represents the length of the long side of the current block
  • H represents the length of the short side of the current block.
  • the current block 1501 is a rectangular block having a height and a width of '4' and '16', respectively.
  • the DC value of the current block 1501 is at least one of the first reference sample set DC0, the second reference sample set DC1, the third reference sample set DC2, and the fourth reference sample set DC3. It can be obtained based on one.
  • the first reference sample set DC0 may include ⁇ L0, L1, L2, L3, 0, 1, 2, 3 ⁇ .
  • the second reference sample set DC1 may include ⁇ L0, L1, L2, L3, 4, 5, 6, 7 ⁇ .
  • the third reference sample set DC0 may include ⁇ L0, L1, L2, L3, 8, 9, 10, 11 ⁇ .
  • the fourth reference sample set DC1 may include ⁇ L0, L1, L2, L3, 12, 13, 14, 15 ⁇ .
  • Equation 4 Average_DC0 represents a first average of reference sample values included in the first reference sample set DC0.
  • Average_DC1 represents a second average of reference sample values included in the second reference sample set DC1.
  • Average_DC2 represents a third average of reference sample values included in the third reference sample set DC2.
  • Average_DC3 represents a fourth average of reference sample values included in the fourth reference sample set DC3.
  • the offset may be a parameter for rounding off the fractional part of the average value.
  • W represents the length of the long side and H represents the length of the short side.
  • a fifth reference sample set DC4 composed of reference samples other than the reference samples constituting the first reference sample set DC0 may be configured.
  • the DC value of the current block 1601 may be obtained based on the first reference sample set DC0 and the fifth reference sample set DC4.
  • the DC value of the current block 1701 can be obtained based on the average.
  • the first reference sample set DC0 has been described as an example, but the present disclosure is not limited thereto.
  • a reference sample set composed of reference samples other than the reference samples constituting the second reference sample set DC1 of FIG. 15 may be configured.
  • the current block 1701 is a rectangular block having a height and a width of '4' and '32', respectively.
  • the DC value of the current block 1701 may include a first reference sample set DC0, a second reference sample set DC1, a third reference sample set DC2, a fourth reference sample set DC3, and a fifth value. It may be obtained based on at least one of the reference sample set DC4, the sixth reference sample set DC5, the seventh reference sample set DC6, and the eighth reference sample set DC7.
  • a ninth reference sample set DC8 including reference samples other than the reference samples included in the first reference sample set DC0 may be included. It may be configured. Referring to FIG. 18, the ninth reference sample set DC8 may further include reference samples on the short side of the current block 1701. In this case, as described with reference to FIG. 14, based on the first average of the reference sample values included in the first reference sample set DC0 and the ninth average of the reference sample values included in the ninth reference sample set DC8. The DC value of the current block 1801 can be obtained.
  • the reference sample set may be composed of reference samples corresponding to any one of the first side and the second side of the current block. That is, the reference sample set may not include reference samples corresponding to any one of the first side and the second side of the current block.
  • the number of reference samples included in the reference sample set may be an exponential power of two.
  • the reference sample set may include the reference samples of the other side except for the reference samples of the specific side of the current block among the DC reference samples.
  • the specific side may be one of the first side and the second side of the current block.
  • the specific side may be a short side among the first side and the second side of the current block.
  • the reference sample set may be composed of reference samples corresponding to the longer side of the first side and the second side.
  • the particular side may be the left side.
  • the specific side may be the upper side.
  • the encoder and the decoder may compare the length of the first side and the length of the second side of the current block. If the first side of the current block is longer than the second side according to the comparison result, the encoder and the decoder may obtain the reference sample set composed of the reference samples on the first side. In addition, the encoder and the decoder may obtain the DC value of the current block based on the reference sample set composed of the reference samples on the first side. Conversely, if the length of the second side is longer than the length of the first side, the encoder and decoder may obtain a reference sample set composed of reference samples on the second side. In this case, the encoder and the decoder may obtain the DC value of the current block based on the reference sample set composed of the reference samples on the second side.
  • the current block 1901 is a rectangular block having a height and a width of '4' and '8', respectively.
  • the encoder and decoder may construct a first reference sample set DC0 consisting of reference samples on the short side.
  • the encoder and the decoder may construct a reference sample set that includes at least some of the reference samples on the long side of the current block 1901.
  • each of the second reference sample set DC1, the third reference sample set DC2, and the fourth reference sample set DC3 is composed of at least some of the reference samples on the long side of the current block 1901.
  • the second reference sample set DC1, the third reference sample set DC2, and the fourth reference sample set DC3 each include four reference samples.
  • the present disclosure is not limited thereto.
  • the number of reference samples included in the reference sample set based on the long side of the current block may be equal to or less than the length of the long side and correspond to an exponent of 2. That is, the reference sample set may consist of two or eight reference samples.
  • the encoder and the decoder may be connected to any one of the first reference sample set DC0, the second reference sample set DC1, the third reference sample set DC2, and the fourth reference sample set DC3. It is possible to obtain a DC value of the current block based on.
  • the number of reference sample sets used to obtain the DC value is not an exponential power of 2
  • a separate division operation may be necessary in the process of obtaining the final average between the averages for each reference sample set.
  • the division operation may increase the complexity and the amount of calculation of the encoder and the decoder. Accordingly, when the DC value of the current block is obtained based on the plurality of reference sample sets, the number of the plurality of reference sample sets may be an exponential number of two.
  • the DC value of the current block may be obtained based on one single-sided reference sample set and a preset number of long-sided reference sample sets.
  • the one-sided reference sample set may represent a reference sample set composed of at least some of the reference samples on the short side of the current block.
  • the long side reference sample set may represent a reference sample set composed of at least some of the reference sample sets on the long side of the current block.
  • the number of long side reference sample sets may be a number set such that the total number of reference sample sets used for obtaining a DC value of the current block is an exponential power of two.
  • the number of long side reference sample sets may be ((2 ⁇ n) -1).
  • n may be an integer.
  • a first reference sample set DC0 that includes only reference samples on the short side of the current block 1901 may be configured.
  • three long side reference sample sets may be configured that include some of the long side side reference samples of the current block 1901.
  • the encoder and the decoder may constitute a second reference sample set DC1, a third reference sample set DC2, and a fourth reference sample set DC3.
  • some of the reference samples constituting any one of the second reference sample set DC1, the third reference sample set DC2, and the fourth reference sample set DC3 may overlap.
  • the number of reference samples included in each of the plurality of reference sample sets may be different. For example, four DC0, eight DC1, four DC2, four DC3 can be configured.
  • the encoder and decoder calculate an average for each reference sample set of each of the first reference sample set DC0, the second reference sample set DC1, the third reference sample set DC2, and the fourth reference sample set DC3. Can be obtained.
  • the encoder and the decoder may obtain the DC value of the current block based on the final average of the averages for each reference sample set by the method described above with reference to FIG. 8. The above-described methods may be applied in the same or corresponding method to the embodiment of FIGS. 20 and 21.
  • the current block 2001 is a rectangular block having a height and a width of '4' and '16', respectively.
  • the DC value of the current block 2001 is one reference sample set DC0, which is a single-sided reference sample set, a second reference sample set DC1, which is three long-term reference sample sets, and a third reference sample set ( DC2), and at least one of the fourth reference sample set DC3.
  • the current block 2101 is a rectangular block having a height and a width of '4' and '32', respectively.
  • the DC value of the current block 2101 includes one first reference sample set DC0, one set of single-sided reference samples, two reference sample sets DC1, three long-sided reference sample sets, and a third reference sample set ( DC2), and at least one of the fourth reference sample set DC3.
  • the reference sample set may be composed of remaining reference samples excluded by the number of short side samples among all the reference samples on the short side and long side of the current block.
  • 22, 23 and 24 illustrate another embodiment of a reference sample set for acquiring a DC value of the current block when the height and width of the current block are '4' and '16'.
  • the current block 2201 is a rectangular block whose height and width are '4' and '16', respectively.
  • the encoder and decoder may construct a reference sample set comprising (16 + 4-4) number (ie, 16) reference samples.
  • the encoder and the decoder may be configured with reference samples L0, L1, L2, L3 on the short side of the current block and some (0, 1, 2, 3, 4) of the reference samples on the long side of the current block.
  • a first reference sample set DC0 including 5, 6, 7, 8, 9, 10, and 11 may be configured.
  • the encoder and decoder may be used to determine the reference samples L0, L1, L2, L3 of the short side of the current block and some of the reference samples of the long side of the current block 2201 (4, 5, 6, 7, 8,
  • the second reference sample set DC1 including 9, 10, 11, 12, 13, 14, and 15 may be configured.
  • the present disclosure is not limited thereto.
  • the reference sample set may include reference samples (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 on the long side of the current block). It can consist only of).
  • the reference sample set may not include the reference samples L0, L1, L2, L3 on the short side of the current block.
  • the encoder and decoder may construct a reference sample set based on a sample value of each of the reference samples.
  • the reference sample set may not include the reference sample having the largest sample value among the reference samples corresponding to each of the upper side and the left side of the current block.
  • the reference sample set may not include the reference sample having the smallest sample value among the reference samples corresponding to each of the upper side and the left side of the current block.
  • a third reference sample set including reference samples other than the reference samples included in the first reference sample set DC0 may be configured.
  • the first reference sample set DC0 includes remaining reference samples from which some of the reference samples corresponding to the long side are excluded from among the reference samples corresponding to each of the long side and the short side of the current block 2301. It can be configured as.
  • a third reference sample set DC2 including some of the excluded reference samples 12, 13, 14, and 15 may be configured.
  • the third reference sample set 'DC2 ′ may further include reference samples on the short side.
  • the DC value of the current block 2401 may be obtained based on the first reference sample set DC0 and the third reference sample set DC2. In this case, as described with reference to FIGS. 14 and 15, the first average of the reference sample values included in the first reference sample set DC0 and the third of the reference sample values included in the third reference sample set DC2 are described. The DC value of the current block 2401 may be obtained based on the average.
  • 25 and 26 are diagrams illustrating an embodiment of a reference sample set for obtaining a DC value of a current block when the height and width of the current block are '4' and '32'.
  • current block 2501 is a rectangular block having a height and a width of '4' and '32', respectively.
  • the embodiments described with reference to FIG. 22 may be applied to the embodiments of FIGS. 25 and 26.
  • the encoder and decoder may construct a reference sample set comprising (32 + 4-4) number (ie, 32) reference samples.
  • the encoder and the decoder may include a first reference including remaining reference samples from which the long side reference sample portions 28, 29, 30, and 31 are excluded from the entire reference samples corresponding to each of the long and short sides of the current block. A sample set can be obtained.
  • the DC value of the current block 2601 may be obtained based on the first reference sample set DC0 and the second reference sample set DC1.
  • the DC value of the current block is obtained based on a reference sample set that includes some of the reference samples on the short side of the current block and some of the reference samples on the long side of the current block.
  • the encoder and the decoder may determine the number of unilateral reference samples and the number of long side reference samples, respectively, included in the reference sample set.
  • the encoder and the decoder may determine the first number of the single-sided reference samples and the second number of the long-sided reference samples such that the sum of the number of single-sided reference samples and the number of long-sided reference samples included in the reference sample set is an exponential power of 2.
  • the encoder and decoder may construct a reference sample set that includes an exponential number of two reference samples based on the determined first and second numbers.
  • the reference sample set may include two unilateral reference samples and six long side reference samples.
  • the first reference sample set DC0 may be configured.
  • it includes two reference samples (L2, L3) located below one of the single side reference samples and six reference samples (2, 3, 4, 5, 6, 7) from the right side of the long side reference samples.
  • the second reference sample set DC1 may be configured.
  • current block 2801 is a rectangular block having a height and a width of '4' and '8', respectively.
  • the reference sample set may include one unilateral reference samples and three long side reference samples.
  • a first reference sample set DC0 comprising a reference sample L0 located at the top of the one-sided reference samples and three reference samples 0, 1, and 2 from the left of the long-term reference samples.
  • a second reference sample set DC1 including a reference sample L1 located second from the top of the one-sided reference samples and three reference samples 2, 3, and 4 of the longside reference samples may be configured.
  • the current block 2901 is a rectangular block having a height and a width of '4' and '16', respectively.
  • the reference sample set may include one unilateral reference samples and seven long side reference samples.
  • the reference sample L0 located at the top of the one-sided reference samples and seven reference samples (0, 1, 2, 3, 4, 5, 6) from the left of the long-sided reference samples are included.
  • the first reference sample set DC0 may be configured.
  • each of the plurality of reference sample sets may be composed of reference samples corresponding to any one of the first side and the second side of the current block.
  • the first reference sample set may be composed of reference samples on the side of the longer side among the first side and the second side of the current block.
  • the second reference sample set may be composed of reference samples on the side of the shorter side among the first side and the second side of the current block.
  • the DC value of the current block may be obtained based on at least one of the first reference sample set or the second reference sample set.
  • the DC value of the current block can be obtained based on both the first reference sample set and the second reference sample set.
  • the DC value of the current block may be obtained based on an average for each reference sample set as described above with reference to FIG. 14.
  • the DC value of the current block may be obtained based on the final average for the first average and the second average.
  • the first average may be an average of reference samples included in the first reference sample set.
  • the second average may be an average of reference samples included in the second reference sample set.
  • the number of reference samples included in the second reference sample set may be smaller than the number of reference samples included in the first reference sample set.
  • the encoder and the decoder may obtain a final average by applying weights to the first average and the second average, respectively.
  • the encoder and the decoder may obtain a first integer value and a second integer value based on a ratio of the short side to the long side of the current block.
  • the first integer value may be an integer weighted value applied to a first average of sample values of the reference samples on the long side of the current block.
  • the second integer value may be an integer weighted value applied to a second average of sample values of reference samples on the short side of the current block.
  • the encoder and the decoder may obtain the first weight and the second weight based on the ratio of the short side to the long side of the current block.
  • the first and second weights may be weights for each of the first and second averages.
  • the encoder and the decoder may obtain the first integer value and the second integer value by integerizing the first weight and the second weight.
  • the first weight and the second weight may be as shown in Equation 5 below.
  • the weights according to the ratio of the short side H to the long side W may be as follows.
  • each of the weights may be represented as a floating point value.
  • Second weight 0.4
  • the weights according to the shape of the current block are exemplary and the present disclosure is not limited thereto.
  • the place where rounding off is performed may vary.
  • the place where rounding off is performed may be determined based on at least one of the accuracy or the magnitude of the scaling number.
  • the encoder and the decoder may integer the first weight and the second weight based on a predetermined index value.
  • the encoder and the decoder may obtain a first integer value and a second integer value by multiplying the predetermined index value by the first weight value and the second weight value, respectively.
  • the preset exponent value may be an exponential power of two.
  • the preset exponent value may be 16 powers of two.
  • the first weight is multiplied by the preset index value as follows.
  • the first weight for each ratio multiplied by the preset exponential value is in the form of a real value including a decimal point.
  • the encoder and the decoder may integer the first weight multiplied by the preset exponent value.
  • the encoder and the decoder may integer the first weight multiplied by a predetermined exponent value by using one of rounding, rounding, and rounding.
  • the same method may be applied to the first weight and the second weight, or a plurality of methods may be applied.
  • the first weight value may be rounded and the second weight value may be rounded.
  • the encoder and the decoder may obtain the following first integer values.
  • the encoder and the decoder may obtain the following first integer values.
  • the encoder and the decoder may obtain the following first integer values.
  • the encoder and the decoder may obtain a first average and a second average.
  • the first average and the second average may be rounded values.
  • the encoder and the decoder may obtain a DC value of the current block based on the first average, the second average, the first integer value, and the second integer value.
  • the encoder and the decoder may obtain a first intermediate value by applying a first integer value to the first average.
  • the encoder and the decoder may obtain a second intermediate value by applying a second integer value to the second average.
  • the encoder and the decoder may obtain the DC value of the current block based on the average of the first intermediate value and the second intermediate value.
  • the encoder and the decoder may predict the current block based on the obtained DC value.
  • the width and height of the current block may not be an exponential power of two.
  • the number of reference samples corresponding to each of the upper side and the left side of the current block may not be an exponential number of two.
  • 31 is a diagram illustrating a method of obtaining a DC value when the length of one of the first and second sides of the current block is not an exponential power of two, according to an embodiment of the present invention.
  • the current block 3101 is a rectangular block having a height and a width of '4' and '24', respectively.
  • the ratio of the short side to the long side of the current block 3101 may be '6'.
  • the DC value of the current block 3101 can be obtained using the method described above with reference to FIG. 30.
  • the encoder and decoder can obtain a first average of reference sample values on the long side of the current block 3101.
  • the encoder and decoder may obtain a second average of the reference sample values of the short side of the current block 3101.
  • the second weight and the first weight for each of the first and second averages may be obtained based on the length of the short side and the length of the long side.
  • the encoder and the decoder may normalize the first weight and the second weight based on the above-described preset index value.
  • the encoder and the decoder may normalize the first weight and the second weight to obtain a first integer value "G second integer value.
  • the encoder and decoder may respectively obtain a first integer value in the first average and the second average.
  • the DC value of the current block may be obtained by applying the value and the second integer value.
  • the encoder may obtain the DC value by using an addition and shift operation without a division operation in the step of obtaining the DC value.
  • the decoder may obtain the prediction mode of the corresponding block from the bitstream. Also, when the prediction mode of the current block is the DC mode, the decoder may acquire the DC value by using addition and shift operations without a division operation.
  • the current unit may include both a luma component and a chroma component corresponding to the corresponding image area.
  • a method of predicting a chroma block of a current unit according to an embodiment of the present invention will be described with reference to FIGS. 32 to 41.
  • 32 illustrates one embodiment of luma blocks and chroma blocks of the current unit.
  • a prediction block corresponding to a specific component of the current unit may be obtained using reconstructed sample values of other components of the current unit.
  • This method may be referred to as a cross-component linear model (CCLM) method.
  • CCLM cross-component linear model
  • the current unit may include a first component and a second component.
  • the encoder and the decoder may obtain a prediction block corresponding to the second component based on the reconstructed sample value of the first component.
  • the encoder and the decoder may obtain a relationship model indicating a relationship between the first component and the second component of the current unit.
  • the relationship model may be a mathematical relationship.
  • the encoder and the decoder may obtain a prediction block corresponding to the second component from the reconstructed sample value of the first component based on the obtained relationship model.
  • a relationship model representing the relationship between the first component and the second component may be obtained based on reference samples of the current unit.
  • the current unit may include a first block corresponding to the first component and a second block corresponding to the second component. As illustrated in FIG. 32, sizes of the first block and the second block may be different from each other.
  • the encoder and the decoder may obtain a relationship model indicating a relationship between the first component and the second component based on the first reference samples around the first block and the second reference samples around the second block.
  • the second block may be predicted using the first block and the obtained relationship model.
  • the first component may be any one of a luma component and chroma components (ie, Cb and Cr).
  • the second component may be any other than the first component of the luma component and the chroma components.
  • the first component may represent a luma component.
  • the second component may represent any one of the chroma components.
  • the encoder and decoder may predict the other component based on the reconstructed sample values of the two or more components. For example, the encoder and decoder may use the method described above for chroma intra prediction.
  • the relationship model used in the CCLM method may be represented by a linear model as shown in [Equation 6].
  • predC (i, j) represents a predicted sample value of the (i, j) position of the chroma block.
  • recL (I, j) represents a reconstructed sample value of the position (i, j) of the luma block of the current unit.
  • the number of samples included in the chroma block may be smaller than the number of samples included in the luma block.
  • the YCbCr sampling ratio of the video signal processed by the encoder and decoder may be 4: 2: 0.
  • the predictive block of the chroma block may be obtained based on the down sampled luma sample values.
  • the parameters ⁇ and ⁇ may be obtained based on the relationship between the luma reference samples around the luma block and the chroma reference samples around the chroma block.
  • Equation 7 L (n) represents the nth luma reference sample, and C (n) represents the nth chroma reference sample. Also, if the number of luma reference samples is greater than the number of chroma reference samples, down sampled luma reference samples may be used. In Equation 8, N may represent the number of chroma reference samples. For example, C (n) may be an nth chroma reference sample of chroma reference samples on the upper and left sides of the chroma block.
  • a modeling group including a plurality of reference samples used for obtaining a relationship model may be configured in various ways.
  • the modeling group may include a plurality of reference samples used for obtaining a relation model among reference samples of the current block.
  • the modeling group may include a luma modeling group including luma reference samples and a chroma modeling group including chroma reference samples.
  • the chroma component of the current unit may have a high probability of being predicted in a direction similar to the direction in which the luma component is predicted.
  • the modeling group may be configured based on the prediction mode of the luma block.
  • the prediction mode of the luma block may be a prediction mode used for prediction of the luma component.
  • reference samples of the positions shown in FIG. 35, 36, or 38 may be used for obtaining a relation model.
  • the prediction mode other than the angular mode may be either a planar mode or a DC mode.
  • reference samples at positions shown in FIG. 35, 36, or 38 may be used for obtaining a relation model.
  • reference samples of the position shown in FIG. 37 may be used to obtain a relation model.
  • reference samples of the position illustrated in FIG. 39 may be used to obtain a relation model.
  • the encoder may signal how the aforementioned modeling group is configured.
  • the method in which the modeling group is configured may be signaled based on the luma prediction mode.
  • the method of configuring the modeling group may include a first configuration method, a second configuration method, and a third configuration method.
  • each of the first configuration method, the second configuration method, and the third configuration method may be signaled through first signaling, second signaling, and third signaling.
  • each signaling method may be signaled based on the prediction mode of the luma block.
  • how the modeling group is organized may be signaled with variable length bits.
  • the first configuration method, the second configuration method, and the third configuration method may be signaled through bits such as 0, 10, 11 (or 1, 01, 00), respectively. 35 to 36 or 38, the first method of configuring the modeling group configuration method, the second method of configuring the modeling group configuration method shown in FIG. 37, the third method of configuring the modeling group configuration method shown in FIG. It can be said.
  • a modeling group formation method that is signaled with the least bits may be determined based on the luma component prediction mode. For example, when the prediction mode of the luma block is the horizontal mode, the encoder may signal the second configuration method with the least number of bits. In addition, when the prediction mode of the luma block is the vertical mode, the encoder may signal the third configuration method with the least number of bits.
  • the luma block and the chroma block in the picture may be divided in a manner independent of each other. Accordingly, there may be a plurality of prediction modes of the luma block corresponding to the chroma block.
  • the encoder and the decoder may determine a representative prediction mode which is any one of the plurality of prediction modes. In this regard will be described later with reference to FIG.
  • reference samples of different positions may be used for each sub-block corresponding to each of the plurality of luma prediction modes.
  • FIGS. 33 to 39 is a diagram illustrating an embodiment in which a luma block and a chroma block are divided into different forms.
  • the current unit may be included in an I-picture (tile / slice).
  • the sampling ratio of YCbCr of the current unit may be 4: 2: 0.
  • the method of configuring the modeling group may vary according to the structure in which the luma block and the chroma block are divided.
  • the chroma block and the luma block of the current unit may correspond 1: 1.
  • the single tree method may indicate how the luma block and the chroma block of the current unit are divided in the same way.
  • the modeling group may be configured based on the intra prediction mode of the luma block of the current unit.
  • the chroma block and the luma block of the current unit may be divided into different structures as shown in FIG. 33.
  • the split tree method may indicate a method in which the luma block and the chroma block of the current unit are divided into different structures.
  • the chroma block and the luma block of the current unit may be difficult to correspond one-to-one.
  • the chroma block 3301 on the left side and the luma block 3302 corresponding to the chroma block 3301 may be divided in different ways. Accordingly, a method of determining the representative prediction mode of the luma block may be needed.
  • a method of configuring a modeling group may be determined based on intra prediction mode information corresponding to each of the luma sub-blocks including a specific location.
  • the five preset positions are Top-Left (TL), Top-Right (RT), Center (Right-Right, CR), Lower-Left (BL), and Lower-Right (BR).
  • the encoder and the decoder may determine a representative prediction mode of the luma block among intra prediction modes of the luma sub-blocks including each of the preset positions.
  • the encoder and the decoder may use the angular mode having the highest priority according to a predetermined order among the intra prediction modes of the luma sub-blocks including the preset position as the representative prediction mode.
  • the intra prediction mode of the luma sub-block including the preset position may be used as the representative prediction mode.
  • the preset position may be any one of the five preset positions described above.
  • the preset position may be BR.
  • BR may be the furthest position from the reference samples.
  • a representative prediction mode may be obtained based on an intra prediction mode of luma sub-blocks each including at least two preset positions.
  • the encoder and the decoder may obtain the representative prediction mode based on an average of indices of each of the first intra prediction mode and the second intra prediction mode corresponding to each of two preset positions.
  • the representative prediction mode may be obtained based on the frequency of the intra prediction modes corresponding to each of the five preset positions of FIG. 33A.
  • the encoder and the decoder may acquire the frequency for each intra prediction mode among intra prediction modes corresponding to each of TL, TR, CR, BL, and BR.
  • the encoder and the decoder may use the intra prediction mode having a high frequency as the representative prediction mode based on the frequency of each intra prediction mode.
  • the encoder and the decoder may group intra prediction modes to obtain a frequency for each prediction mode group.
  • 34 is a diagram illustrating intra prediction modes classified according to regions according to an embodiment of the present invention.
  • 34 is a diagram illustrating an embodiment of grouping angular modes into three prediction mode groups M0, M1, and M2.
  • the present disclosure is not limited thereto, and the encoder and the decoder may be grouped into three or less or three or more prediction mode groups according to the angles of the angular modes.
  • the intra prediction modes belonging to the first prediction mode group M0 may be the most among intra prediction modes corresponding to each of five preset positions.
  • the encoder and the decoder may use any one of the intra prediction modes belonging to the first prediction mode group M0 as the representative prediction mode.
  • 35 is a diagram illustrating a modeling group when the representative prediction mode of the luma block of the current unit is not the angular mode according to an embodiment of the present invention.
  • the encoder and the decoder may use the reference samples corresponding to each of the left and upper sides of the chroma block to use the relationship between the luma block and the chroma block.
  • a model can be obtained.
  • FIG. 36 illustrates a modeling group according to another embodiment of the present invention.
  • the extended modeling group may be used as shown in FIG. 36.
  • a relation model is obtained by using reference samples of different positions for each luma sub-block
  • an extended modeling group may be used as shown in FIG. 36.
  • the encoder and decoder may obtain a relationship model between the first component and the second component using a wider range of reference samples than the modeling group shown in FIG. 35.
  • FIG. 37 may represent a modeling group used for a relationship model of the first component and the second component of the current unit when the representative prediction mode of the luma block of the current unit belongs to the first prediction mode group M0 of FIG. 34.
  • Intra prediction modes belonging to the first prediction mode group M0 may be predicted using reference samples of the left boundary of the current block.
  • the relationship model may be obtained based on the first modeling group further comprising reference samples on a line adjacent to the left boundary of the current block relative to the modeling group of FIG. 35.
  • FIG. 38 may represent a modeling group used for a relationship model of a first component and a second component of the current unit when the representative prediction mode of the luma block of the current unit belongs to the second prediction mode group M1 of FIG. 34.
  • the value of the samples of the current block may be similar to the value of the samples on the upper left side of the current block.
  • the relationship model may be obtained based on the second modeling group further including a sample located at an upper-left side of the current block compared to the modeling group of FIG. 35.
  • the position of the upper left sample may vary according to the sub-sampling method.
  • FIG. 39 may represent a modeling group used for a relationship model of a first component and a second component of the current unit when the representative prediction mode of the luma block of the current unit belongs to the third prediction mode group M2 of FIG. 34.
  • Intra prediction modes belonging to the third prediction mode group M2 may be predicted using reference samples of the upper boundary of the current block.
  • the relationship model may be obtained based on a third modeling group further comprising reference samples on a line adjacent to the upper boundary of the current block compared to the modeling group of FIG. 35.
  • the prediction mode of the luma block corresponding to the chroma block may be plural.
  • the CCLM method may be applied by dividing the prediction mode of the luma block into the same regions.
  • the current unit may be divided into a first area and a second area.
  • the current unit may be divided into a first region and a second region based on the prediction mode of the luma block.
  • a relationship model between the luma block and the chroma block may be separately obtained for each of the first region and the second region.
  • the first relationship model corresponding to the first area and the second relationship model corresponding to the second area may be independent of each other.
  • the encoder and the decoder may obtain the first relationship model and the second relationship model in different ways. For example, the encoder and the decoder may obtain the first relationship model based on the prediction mode of the first region.
  • the encoder and the decoder may obtain a second relationship model based on the prediction mode of the second region.
  • the encoder and the decoder may reconstruct the samples of the portion corresponding to the first region in the chroma block based on the first relation model.
  • the encoder and the decoder may reconstruct the samples of the portion corresponding to the second region in the chroma block based on the second relation model.
  • a plurality of different relationship models may be used depending on the positions of the samples in the current unit.
  • samples located above the reference diagonal can be reconstructed using the upper relationship model.
  • the reference diagonal line may represent a diagonal line connecting the position of the upper left sample and the lower right sample of the current unit.
  • the upper relation model may be a model obtained based on reference samples located above the current unit.
  • the reference samples located above the current unit may refer to the reference samples located above each of the chroma block and the luma block of the current unit.
  • Samples located below the reference diagonal can be reconstructed using the left relationship model.
  • the left relation model may be a model obtained based on the left reference samples of the current unit.
  • the left reference samples of the current unit may represent the left reference samples of each of the chroma block and the luma block of the current unit.
  • FIG. 41 is a diagram illustrating a specific embodiment of a method in which a chroma block is restored based on a plurality of relationship models.
  • the current unit may be divided into a first area and a second area.
  • the first relation model for the first region may be obtained based on the modeling group configured as shown in FIG. 41 (b).
  • the second relationship model for the second region may be obtained based on the modeling group configured as shown in FIG. 41 (c).
  • the encoder and decoder can obtain a first relationship model based on reference samples located above the current unit.
  • the encoder and the decoder may obtain a second relation model based on the reference samples located to the left of the current unit.
  • the encoder and the decoder may reconstruct the samples of the portion corresponding to the first region in the chroma block based on the first relation model.
  • the encoder and the decoder may reconstruct the samples of the portion corresponding to the second region in the chroma block based on the second relation model.
  • FIG. 42 is a diagram illustrating an embodiment of reference samples when a prediction mode of a current block is a DC mode.
  • the current block is a 4 ⁇ 4 square block.
  • the encoder and the decoder may obtain a DC value of the current block based on DC reference samples on any one of the plurality of reference lines refIdx_0, refIdx_1, and refIdx_3. .
  • the encoder may signal a reference line index indicating any one of the plurality of reference lines.
  • the decoder may obtain a reference line index indicating one of the plurality of reference lines.
  • the decoder may parse the bitstream to obtain intra_luma_ref_Idx [x0] [y0].
  • the decoder may obtain a reference line index (IntraLumaRefLineIdx [x0] [y0]) from intra_luma_ref_Idx [x0] [y0].
  • the reference line index may indicate a reference line adjacent to the boundary of the current block.
  • the reference line index when the reference line index is '1', the reference line index may indicate a reference line spaced one sample from the boundary of the current block. In addition, when the reference line index is '3', the reference line index may indicate a reference line spaced by three samples from the boundary of the current block.
  • nTbW and nTbH may represent the width and height of the current block, respectively.
  • the DC value of the current block may be obtained by the methods described with reference to FIGS. 8 to 31.
  • Embodiments of the present invention described above may be implemented through various means.
  • embodiments of the present invention may be implemented by hardware, firmware, software, or a combination thereof.
  • a method according to embodiments of the present invention may include one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), and Programmable Logic Devices (PLDs). It may be implemented by field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, and the like.
  • ASICs Application Specific Integrated Circuits
  • DSPs Digital Signal Processors
  • DSPDs Digital Signal Processing Devices
  • PLDs Programmable Logic Devices
  • FPGAs field programmable gate arrays
  • processors controllers, microcontrollers, microprocessors, and the like.
  • the method according to the embodiments of the present invention may be implemented in the form of a module, a procedure, or a function that performs the functions or operations described above.
  • the software code may be stored in memory and driven by the processor.
  • the memory may be located inside or outside the processor, and may exchange data with the processor by various known means.
  • Computer readable media can be any available media that can be accessed by a computer and includes both volatile and nonvolatile media, removable and non-removable media.
  • the computer readable medium may include both computer storage media and communication media.
  • Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data.
  • Communication media typically includes other data, or other transmission mechanism, of a modulated data signal, such as computer readable instructions, data structures, or program modules, and includes any information delivery media.

Abstract

비디오 신호를 인코딩하거나 디코딩하는 비디오 신호 처리 방법 및 장치가 개시된다. 더욱 구체적으로, 비디오 신호의 처리 방법에 있어서, 현재 블록 주변의 기 복원된 샘플들에 기초하여 상기 현재 블록의 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들을 획득하는 단계, 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들 중 적어도 일부로 구성된 참조 샘플 세트에 기초하여 상기 현재 블록의 예측을 위한 직류(direct current, DC) 값을 획득하는 단계, 상기 제1 변의 길이와 상기 제2 변의 길이가 서로 다른 경우, 상기 참조 샘플 세트는 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들 중에서, 일부가 제외된 2의 지수 승 개수의 참조 샘플들을 포함함, 및 상기 DC 값에 기초하여 상기 현재 블록을 복원하는 단계를 포함하는, 비디오 신호 처리 방법 및 이를 수행하는 비디오 신호 처리 장치가 개시된다.

Description

참조 샘플을 이용하는 비디오 신호 처리 방법 및 장치
본 발명은 비디오 신호의 처리 방법 및 장치에 관한 것으로, 보다 상세하게는 비디오 신호를 인코딩하거나 디코딩하는 비디오 신호 처리 방법 및 장치에 관한 것이다.
압축 부호화란 디지털화한 정보를 통신 회선을 통해 전송하거나, 저장 매체에 적합한 형태로 저장하기 위한 일련의 신호 처리 기술을 의미한다. 압축 부호화의 대상에는 음성, 영상, 문자 등의 대상이 존재하며, 특히 영상을 대상으로 압축 부호화를 수행하는 기술을 비디오 영상 압축이라고 일컫는다. 비디오 신호에 대한 압축 부호화는 공간적인 상관관계, 시간적인 상관관계, 확률적인 상관관계 등을 고려하여 잉여 정보를 제거함으로써 이루어진다. 그러나 최근의 다양한 미디어 및 데이터 전송 매체의 발전으로 인해, 더욱 고효율의 비디오 신호 처리 방법 및 장치가 요구되고 있다.
본 발명은 비디오 신호의 코딩 효율을 높이기 위한 목적을 가지고 있다. 또한, 본 발명은 현재 블록의 참조 샘플들을 이용하여 현재 블록의 예측과 관련된 시그널링 효율을 높이기 위한 목적을 가지고 있다.
상기와 같은 과제를 해결하기 위해, 본 발명은 다음과 같은 비디오 신호 처리 장치 및 비디오 신호 처리 방법을 제공한다.
먼저 본 발명의 일 실시예에 따르면, 비디오 신호의 처리 방법에 있어서, 현재 블록 주변의 기 복원된 샘플들에 기초하여 상기 현재 블록의 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들을 획득하는 단계; 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들 중 적어도 일부로 구성된 상기 참조 샘플 세트에 기초하여 상기 현재 블록의 예측을 위한 직류(direct current, DC) 값을 획득하는 단계, 상기 제1 변의 길이와 상기 제2 변의 길이가 서로 다른 경우, 상기 참조 샘플 세트는 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들 중에서 일부가 제외된 2의 지수 승 개수의 참조 샘플들을 포함함; 및 상기 DC 값에 기초하여 상기 현재 블록을 복원하는 단계를 포함하는, 비디오 신호 처리 방법이 제공된다.
또한, 본 발명의 실시예에 따르면, 비디오 신호 디코딩 장치에 있어서, 프로세서를 포함하고, 상기 프로세서는, 현재 블록 주변의 기 복원된 샘플들에 기초하여 상기 현재 블록의 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들을 획득하고, 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들 중 적어도 일부로 구성된 참조 샘플 세트에 기초하여 상기 현재 블록의 예측을 위한 직류(direct current, DC) 값을 획득하, 상기 제1 변의 길이와 상기 제2 변의 길이가 서로 다른 경우, 상기 참조 샘플 세트는 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들 중에서 일부가 제외된 2의 지수 승 개수의 참조 샘플들을 포함하며, 상기 DC 값에 기초하여 상기 현재 블록을 복원하는 비디오 신호 디코딩 장치가 제공된다.
상기 참조 샘플 세트는 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들 전체로부터 상기 제1 변과 상기 제2 변 중에서 더 짧은 변의 길이에 대응하는 샘플 개수의 참조 샘플들이 제외된 2의 지수 승 개수의 참조 샘플들을 포함할 수 있다.
상기 참조 샘플 세트는 상기 현재 블록의 제1 변과 제2 변 중에서 어느 한 변 측의 참조 샘플들로 구성될 수 있다.
상기 참조 샘플 세트는 상기 제1 변과 제2 변 중에서 더 긴 변 측의 참조 샘플들로 구성될 수 있다.
상기 참조 샘플 세트는 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들로부터 상기 제1 변과 제2 변 중에서 더 짧은 변 측의 참조 샘플들이 제외된 나머지 참조 샘플들로 구성될 수 있다.
상기 프로세서는, 상기 제1 변의 길이와 제2 변의 길이를 비교하고, 상기 비교 결과에 따라, 상기 제1 변의 길이가 상기 제2 변의 길이 보다 긴 경우, 상기 제1 변 측의 참조 샘플들로 구성된 상기 참조 샘플 세트에 기초하여 상기 DC 값을 획득할 수 있다.
상기 프로세서는, 상기 제1 변의 길이가 상기 제2 변의 길이 보다 긴 경우, 상기 제1 변 측의 참조 샘플들의 평균에 기초하여 상기 DC 값을 획득할 수 있다.
상기 프로세서는, 상기 비교 결과에 따라, 상기 제1 변과 상기 제2 변 중에서 변의 길이가 더 긴 변의 길이에 기초하여 상기 DC 값을 획득할 수 있다.
또한, 본 발명의 실시예에 따르면, 비디오 신호 인코딩 장치에 있어서, 프로세서를 포함하고, 상기 프로세서는, 현재 블록 주변의 기 복원된 샘플들에 기초하여 상기 현재 블록의 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들을 획득하고, 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들 중 적어도 일부로 구성된 참조 샘플 세트에 기초하여 상기 현재 블록의 예측을 위한 DC 값을 획득하고, 상기 제1 변의 길이와 상기 제2 변의 길이가 서로 다른 경우, 상기 참조 샘플 세트는 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들 중에서 일부가 제외된 2의 지수 승 개수의 참조 샘플들을 포함하며, 상기 DC 값에 기초하여 상기 현재 블록의 예측 블록을 생성하고, 상기 예측 블록에 기초하여 상기 현재 블록의 잔차 신호를 획득하고, 상기 현재 블록의 잔차 신호를 포함하는 비트스트림 생성하는 비디오 신호 인코딩 장치가 제공된다.
또한, 본 발명의 실시예에 따르면, 비트스트림을 저장하는 컴퓨터로 판독 가능한 기록 매체에 있어서, 상기 비트스트림은 비디오를 구성하는 픽쳐를 계층적 구조로 분할한 블록들 중 인트라 예측된 현재 블록의 인트라 예측 모드에 대한 정보 및 상기 현재 블록의 잔차 신호를 포함하는 컴퓨터로 판독 가능한 기록 매체가 제공된다. 상기 컴퓨터로 판독 가능한 기록 매체는, 상기 현재 블록 주변의 기 복원된 샘플들로부터 획득된 현재 블록의 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들을 획득하는 단계; 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들 중 적어도 일부로 구성된 상기 참조 샘플 세트에 기초하여 상기 현재 블록의 예측을 위한 직류(direct current, DC) 값을 획득하는 단계, 상기 제1 변의 길이와 상기 제2 변의 길이가 서로 다른 경우, 상기 참조 샘플 세트는 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들 중에서 일부가 제외된 2의 지수 승 개수의 참조 샘플들을 포함함; 및 상기 DC 값에 기초하여 상기 현재 블록을 예측하는 단계를 통해 획득된 상기 비트스트림을 포함할 수 있다.
또한, 본 발명의 실시예에 따르면, 비디오 신호 인코딩 및/또는 디코딩 장치에 있어서, 프로세서를 포함하고, 상기 프로세서는, 현재 블록 주변의 기 복원된 샘플들에 기초하여, 상기 현재 블록의 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들을 획득하고, 상기 제1 변의 길이와 상기 제2 변의 길이가 다른 경우, 상기 복수의 참조 샘플들 중에서, 상기 제1 변 및 상기 제2 변 중 어느 한 변 측의 참조 샘플들이 제외된 나머지 참조 샘플들에 기초하여 상기 현재 블록의 예측을 위한 직류(direct current, DC) 값을 획득하고, 상기 DC 값에 기초하여 상기 현재 블록을 예측하는 비디오 신호 처리 장치가 제공된다. 이때, 상기 제1 변과 상기 제2 변은 서로 직교할 수 있다.
상기 프로세서는 상기 어느 한 변 측의 참조 샘플들의 평균에 기초하여 상기 DC 값을 획득할 수 있다.
상기 어느 한 변은 상기 제1 변 및 상기 제2 변 중에서 길이가 더 긴 변일 수 있다. 이때, 상기 프로세서는, 상기 제1 변 및 상기 제2 변 중에서 길이가 더 긴 변 측의 참조 샘플들에 기초하여 상기 DC 값을 획득할 수 있다.
상기 프로세서는, 상기 제1 변의 길이와 상기 제2 변의 길이를 비교하고, 상기 비교 결과에 따라 상기 제1 변의 길이 보다 상기 제2 변의 길이가 긴 경우, 상기 제2 변 측의 참조 샘플들의 평균에 기초하여 상기 DC 값을 획득할 수 있다.
상기 제1 변 측의 참조 샘플들의 개수 및 상기 제2 변 측의 참조 샘플들의 개수는 각각 2의 지수 승일 수 있다. 상기 제1 변 측의 참조 샘플들의 개수와 상기 제2 변 측의 참조 샘플들의 개수의 합은 2의 지수 승이 아닐 수 있다.
본 발명의 실시예에 따르면 비디오 신호의 코딩 효율이 높아질 수 있다. 또한, 본 발명의 실시예에 따르면 현재 블록의 인트라 예측의 예측 성능을 향상시킬 수 있다.
본 발명의 실시예에 따르면 현재 블록의 예측 블록 생성에 요구되는 연산 복잡도를 감소시킬 수 있다.
도 1은 본 발명의 실시예에 따른 비디오 신호 인코딩 장치의 개략적인 블록도이다.
도 2는 본 발명의 실시예에 따른 비디오 신호 디코딩 장치의 개략적인 블록도이다.
도 3은 픽쳐 내에서 코딩 트리 유닛이 코딩 유닛들로 분할되는 실시예를 도시한다.
도 4는 쿼드 트리 및 멀티-타입 트리의 분할을 시그널링하는 방법의 일 실시예를 도시한다.
도 5 및 도 6은 본 발명의 실시예에 따른 인트라 예측 방법을 더욱 구체적으로 도시한다.
도 7은 현재 블록의 인트라 예측 모드가 DC 모드인 경우, 현재 블록이 예측되는 방법의 일 실시예를 나타내는 도면이다.
도 8은 본 발명의 일 실시예에 따라 현재 블록의 높이와 너비가 다른 경우, 현재 블록의 DC 값을 획득하는 방법을 나타내는 도면이다.
도 9, 도 10 및 도 11는 현재 블록의 높이와 너비가 서로 다른 경우, 참조 샘플 세트가 구성되는 방법의 일 실시예를 나타내는 도면이다.
도 12는 현재 블록의 높이와 너비가 서로 다른 경우, 참조 샘플 세트가 구성되는 방법의 다른 일 실시예를 나타내는 도면이다.
도 13은 본 발명의 일 실시예에 따라 현재 블록의 너비와 높이 사이의 비율에 기초하여 현재 블록의 DC 값이 획득되는 방법을 나타내는 도면이다.
도 14는 본 발명의 일 실시예에 따라 현재 블록의 높이와 너비가 서로 다른 경우, 참조 샘플 세트가 구성되는 방법의 또 다른 일 실시예를 나타내는 도면이다.
도 15 및 도 16은 현재 블록의 높이와 너비가 '4' 및 '16'인 경우, 현재 블록의 DC 값의 획득을 위한 참조 샘플 세트의 일 실시예를 나타내는 도면이다.
도 17 및 도 18는 현재 블록의 높이와 너비가 '4' 및 '32'인 경우, 현재 블록의 DC 값의 획득을 위한 참조 샘플 세트의 일 실시예를 나타내는 도면이다.
도 19, 도 20 및 도 21는 현재 블록의 높이와 너비가 서로 다른 경우, 현재 블록의 DC 값의 획득을 위한 참조 샘플 세트의 다른 일 실시예를 나타내는 도면이다.
도 22, 도 23 및 도 24는 현재 블록의 높이와 너비가 서로 다른 경우, 현재 블록의 DC 값의 획득을 위한 참조 샘플 세트의 또 다른 일 실시예를 나타내는 도면이다.
도 25 및 도 26은 현재 블록의 높이와 너비가 '4' 및 '32'인 경우, 현재 블록의 DC 값의 획득을 위한 참조 샘플 세트의 일 실시예를 나타내는 도면이다.
도 27, 도 28 및 도 29는 본 발명의 일 실시예에 따라, 현재 블록의 짧은 변 측의 참조 샘플들 중 일부 및 현재 블록의 긴 변 측의 참조 샘플들 중 일부를 포함하는 참조 샘플 세트를 나타내는 도면이다.
도 30은 본 발명의 일 실시예에 따라 참조 샘플 세트 별 평균에 가중치가 적용되는 방법을 나타내는 흐름도이다.
도 31은 본 발명의 일 실시예에 따라 현재 블록의 제1 변 및 제2 변 중 어느 한 변의 길이가 2의 지수 승이 아닌 경우, DC 값을 획득되는 방법을 나타내는 도면이다.
도 32는 현재 유닛의 루마 블록과 크로마 블록의 일 실시예를 나타낸다.
도 33은 루마 블록과 크로마 블록이 서로 다른 형태로 분할되는 실시예를 나타내는 도면이다.
도 34는 본 발명의 일 실시예에 따라 인트라 예측 모드들을 영역 별로 분류한 도면이다.
도 35는 본 발명의 일 실시예에 따라 현재 유닛의 루마 블록의 대표 예측 모드가 각도 모드가 아닌 경우의 모델링 그룹을 나타내는 도면이다.
도 36은 본 발명의 다른 일 실시예에 따른 모델링 그룹을 나타내는 도면이다.
도 37, 도 38, 및 도 39는 본 발명의 또 다른 일 실시예에 따른 모델링 그룹을 나타내는 도면이다.
도 40은 본 발명의 일 실시예에 따라, 복수의 관계 모델에 기초하여 크로마 블록을 복원하는 방법을 나타내는 도면이다.
도 41은 크로마 블록이 복수의 관계 모델에 기초하여 복원되는 방법의 구체적인 실시예를 나타내는 도면이다.
도 42는 현재 블록의 예측 모드가 DC 모드인 경우, 참조 샘플들의 일 실시예를 나타내는 도면이다.
도 43 및 도 44는 현재 블록이 직사각형 블록인 경우, DC 값 획득에 사용되는 참조 샘플들의 일 실시예를 나타내는 도면이다.
본 명세서에서 사용되는 용어는 본 발명에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어를 선택하였으나, 이는 당 분야에 종사하는 기술자의 의도, 관례 또는 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한 특정 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 발명의 설명 부분에서 그 의미를 기재할 것이다. 따라서 본 명세서에서 사용되는 용어는, 단순한 용어의 명칭이 아닌 그 용어가 가진 실질적인 의미와 본 명세서의 전반에 걸친 내용을 토대로 해석되어야 함을 밝혀두고자 한다.
본 명세서에서 일부 용어들은 다음과 같이 해석될 수 있다. 코딩은 경우에 따라 인코딩 또는 디코딩으로 해석될 수 있다. 본 명세서에서 비디오 신호의 인코딩(부호화)을 수행하여 비디오 신호 비트스트림을 생성하는 장치는 인코딩 장치 혹은 인코더로 지칭되며, 비디오 신호 비트스트림의 디코딩(복호화)을 수행하여 비디오 신호를 복원하는 장치는 디코딩 장치 혹은 디코더로 지칭된다. 또한, 본 명세서에서 비디오 신호 처리 장치는 인코더 및 디코더를 모두 포함하는 개념의 용어로 사용된다. 정보(information)는 값(values), 파라미터(parameter), 계수(coefficients), 성분(elements) 등을 모두 포함하는 용어로서, 경우에 따라 의미는 달리 해석될 수 있으므로 본 발명은 이에 한정되지 아니한다. '유닛'은 영상 처리의 기본 단위 또는 픽쳐의 특정 위치를 지칭하는 의미로 사용되며, 루마(luma) 성분과 크로마(chroma) 성분을 모두 포함하는 이미지 영역을 가리킨다. 또한, ‘블록’은 루마 성분 및 크로마 성분들(즉, Cb 및 Cr) 중 특정 성분을 포함하는 이미지 영역을 가리킨다. 다만, 실시예에 따라서 ‘유닛’, '블록', '파티션' 및 '영역' 등의 용어는 서로 혼용하여 사용될 수 있다. 또한, 본 명세서에서 유닛은 코딩 유닛, 예측 유닛, 변환 유닛을 모두 포함하는 개념으로 사용될 수 있다. 픽쳐는 필드 혹은 프레임을 가리키며, 실시예에 따라 상기 용어들은 서로 혼용하여 사용될 수 있다.
도 1은 본 발명의 일 실시예에 따른 비디오 신호 인코딩 장치의 개략적인 블록도이다. 도 1을 참조하면, 본 발명의 인코딩 장치(100)는 변환부(110), 양자화부(115), 역양자화부(120), 역변환부(125), 필터링부(130), 예측부(150) 및 엔트로피 코딩부(160)를 포함한다.
변환부(110)는 입력 받은 비디오 신호와 예측부(150)에서 생성된 예측 신호의 차이인 레지듀얼 신호를 변환하여 변환 계수 값을 획득한다. 예를 들어, 이산 코사인 변환(Discrete Cosine Transform, DCT), 이산 사인 변환(Discrete Sine Transform, DST) 또는 웨이블릿 변환(Wavelet Transform) 등이 사용될 수 있다. 이산 코사인 변환 및 이산 사인 변환은 입력된 픽쳐 신호를 블록 형태로 나누어 변환을 수행하게 된다. 변환에 있어서 변환 영역 내의 값들의 분포와 특성에 따라서 코딩 효율이 달라질 수 있다. 양자화부(115)는 변환부(110)에서 출력된 변환 계수 값을 양자화한다.
코딩 효율을 높이기 위하여 픽쳐 신호를 그대로 코딩하는 것이 아니라, 예측부(150)를 통해 이미 코딩된 영역을 이용하여 픽쳐를 예측하고, 예측된 픽쳐에 원본 픽쳐와 예측 픽쳐 간의 레지듀얼 값을 더하여 복원 픽쳐를 획득하는 방법이 사용된다. 인코더와 디코더에서 미스매치가 발생되지 않도록 하기 위해, 인코더에서 예측을 수행할 때에는 디코더에서도 사용 가능한 정보를 사용해야 한다. 이를 위해, 인코더에서는 부호화한 현재 블록을 다시 복원하는 과정을 수행한다. 역양자화부(120)에서는 변환 계수 값을 역양자화하고, 역변환부(125)에서는 역양자화된 변환 계수값을 이용하여 레지듀얼 값을 복원한다. 한편, 필터링부(130)는 복원된 픽쳐의 품질 개선 및 부호화 효율 향상을 위한 필터링 연산을 수행한다. 예를 들어, 디블록킹 필터, 샘플 적응적 오프셋(Sample Adaptive Offset, SAO) 및 적응적 루프 필터 등이 포함될 수 있다. 필터링을 거친 픽쳐는 출력되거나 참조 픽쳐로 이용하기 위하여 복호 픽쳐 버퍼(Decoded Picture Buffer, DPB, 156)에 저장된다.
예측부(150)는 인트라 예측부(152)와 인터 예측부(154)를 포함한다. 인트라 예측부(152)는 현재 픽쳐 내에서 인트라(intra) 예측을 수행하며, 인터 예측부(154)는 복호 픽쳐 버퍼(156)에 저장된 참조 픽쳐를 이용하여 현재 픽쳐를 예측하는 인터(inter) 예측을 수행한다. 인트라 예측부(152)는 현재 픽쳐 내의 복원된 샘플들로부터 인트라 예측을 수행하여, 인트라 부호화 정보를 엔트로피 코딩부(160)에 전달한다. 인트라 부호화 정보는 인트라 예측 모드, MPM(Most Probable Mode) 플래그, MPM 인덱스 중 적어도 하나를 포함할 수 있다. 인터 예측부(154)는 모션 추정부(154a) 및 모션 보상부(154b)를 포함하여 구성될 수 있다. 모션 추정부(154a)는 복원된 참조 픽쳐의 특정 영역을 참조하여 현재 영역의 모션 벡터값을 획득한다. 모션 추정부(154a)는 참조 영역에 대한 모션 정보 세트(참조 픽쳐 인덱스, 모션 벡터 정보 등)를 엔트로피 코딩부(160)로 전달한다. 모션 보상부(154b)는 모션 추정부(154a)에서 전달된 모션 벡터값을 이용하여 모션 보상을 수행한다. 인터 예측부(154)는 참조 영역에 대한 모션 정보 세트를 포함하는 인터 부호화 정보를 엔트로피 코딩부(160)에 전달한다.
추가적인 실시예에 따라, 예측부(150)는 인트라 블록 카피(block copy, BC) 예측부(미도시)를 포함할 수 있다. 인트라 BC 예측부는 현재 픽쳐 내의 복원된 샘플들로부터 인트라 BC 예측을 수행하여, 인트라 BC 부호화 정보를 엔트로피 코딩부(160)에 전달한다. 인트라 BC 예측부는 현재 픽쳐 내의 특정 영역을 참조하여 현재 영역의 블록 벡터값을 획득한다. 인트라 BC 예측부는 획득된 블록 벡터값을 이용하여 인트라 BC 예측을 수행할 수 있다. 인트라 BC 예측부는 인트라 BC 부호화 정보를 엔트로피 코딩부(160)로 전달한다. 인트라 BC 부호화 정보는 블록 벡터 정보를 포함할 수 있다.
위와 같은 픽쳐 예측이 수행될 경우, 변환부(110)는 원본 픽쳐와 예측 픽쳐 간의 레지듀얼 값을 변환하여 변환 계수 값을 획득한다. 이때, 변환은 픽쳐 내에서 특정 블록 단위로 수행될 수 있으며, 특정 블록의 크기는 기 설정된 범위 내에서 가변할 수 있다. 양자화부(115)는 변환부(110)에서 생성된 변환 계수 값을 양자화하여 엔트로피 코딩부(160)로 전달한다.
엔트로피 코딩부(160)는 양자화된 변환 계수, 인트라 부호화 정보, 및 인터 부호화 정보 등을 엔트로피 코딩하여 비디오 신호 비트스트림을 생성한다. 엔트로피 코딩부(160)에서는 가변 길이 코딩(Variable Length Coding, VLC) 방식과 산술 코딩(arithmetic coding) 방식 등이 사용될 수 있다. 가변 길이 코딩(VLC) 방식은 입력되는 심볼들을 연속적인 코드워드로 변환하는데, 코드워드의 길이는 가변적일 수 있다. 예를 들어, 자주 발생하는 심볼들을 짧은 코드워드로, 자주 발생하지 않은 심볼들은 긴 코드워드로 표현하는 것이다. 가변 길이 코딩 방식으로서 컨텍스트 기반 적응형 가변 길이 코딩(Context-based Adaptive Variable Length Coding, CAVLC) 방식이 사용될 수 있다. 산술 코딩은 연속적인 데이터 심볼들을 하나의 소수로 변환하는데, 산술 코딩은 각 심볼을 표현하기 위하여 필요한 최적의 소수 비트를 얻을 수 있다. 산술 코딩으로서 컨텍스트 기반 적응형 산술 부호화(Context-based Adaptive Binary Arithmetic Code, CABAC)가 이용될 수 있다.
상기 생성된 비트스트림은 NAL(Network Abstraction Layer) 유닛을 기본 단위로 캡슐화 된다. NAL 유닛은 부호화된 정수 개의 코딩 트리 유닛(coding tree unit)을 포함한다. 비디오 디코더에서 비트스트림을 복호화하기 위해서는 먼저 비트스트림을 NAL 유닛 단위로 분리한 후, 분리된 각각의 NAL 유닛을 복호화해야 한다. 한편, 비디오 신호 비트스트림의 복호화를 위해 필요한 정보들은 픽쳐 파라미터 세트(Picture Parameter Set, PPS), 시퀀스 파라미터 세트(Sequence Parameter Set, SPS), 비디오 파라미터 세트(Video Parameter Set, VPS) 등과 같은 상위 레벨 세트의 RBSP(Raw Byte Sequence Payload)를 통해 전송될 수 있다.
한편, 도 1의 블록도는 본 발명의 일 실시예에 따른 인코딩 장치(100)를 나타낸 것으로서, 분리하여 표시된 블록들은 인코딩 장치(100)의 엘리먼트들을 논리적으로 구별하여 도시한 것이다. 따라서 전술한 인코딩 장치(100)의 엘리먼트들은 디바이스의 설계에 따라 하나의 칩으로 또는 복수의 칩으로 장착될 수 있다. 일 실시예에 따르면, 전술한 인코딩 장치(100)의 각 엘리먼트의 동작은 프로세서(미도시)에 의해 수행될 수 있다.
도 2는 본 발명의 일 실시예에 따른 비디오 신호 디코딩 장치(200)의 개략적인 블록도이다. 도 2를 참조하면 본 발명의 디코딩 장치(200)는 엔트로피 디코딩부(210), 역양자화부(220), 역변환부(225), 필터링부(230) 및 예측부(250)를 포함한다.
엔트로피 디코딩부(210)는 비디오 신호 비트스트림을 엔트로피 디코딩하여, 각 영역에 대한 변환 계수, 인트라 부호화 정보, 인터 부호화 정보 등을 추출한다. 역양자화부(220)는 엔트로피 디코딩된 변환 계수를 역양자화하고, 역변환부(225)는 역양자화된 변환 계수를 이용하여 레지듀얼 값을 복원한다. 비디오 신호 처리 장치(200)는 역변환부(225)에서 획득된 레지듀얼 값을 예측부(250)에서 획득된 예측자(predictor)와 합산하여 원래의 화소값을 복원한다.
한편, 필터링부(230)는 픽쳐에 대한 필터링을 수행하여 화질을 향상시킨다. 여기에는 블록 왜곡 현상을 감소시키기 위한 디블록킹 필터 및/또는 픽쳐 전체의 왜곡 제거를 위한 적응적 루프 필터 등이 포함될 수 있다. 필터링을 거친 픽쳐는 출력되거나 다음 픽쳐에 대한 참조 픽쳐로 이용하기 위하여 복호 픽쳐 버퍼(DPB, 256)에 저장된다.
예측부(250)는 인트라 예측부(252) 및 인터 예측부(254)를 포함한다. 예측부(250)는 전술한 엔트로피 디코딩부(210)를 통해 복호화된 부호화 타입, 각 영역에 대한 변환 계수, 인트라/인터 부호화 정보 등을 활용하여 예측 픽쳐를 생성한다. 복호화가 수행되는 현재 블록을 복원하기 위해서, 현재 블록이 포함된 현재 픽쳐 또는 다른 픽쳐들의 복호화된 영역이 이용될 수 있다. 복원에 현재 픽쳐만을 이용하는, 즉 인트라 예측 또는 인트라 BC 예측만을 수행하는 픽쳐(또는, 타일/슬라이스)를 인트라 픽쳐 또는 I 픽쳐(또는, 타일/슬라이스), 인트라 예측, 인터 예측 및 인트라 BC 예측을 모두 수행할 수 있는 픽쳐(또는, 타일/슬라이스)를 인터 픽쳐(또는, 타일/슬라이스)라고 한다. 인터 픽쳐(또는, 타일/슬라이스) 중 각 블록의 샘플 값들을 예측하기 위하여 최대 하나의 모션 벡터 및 참조 픽쳐 인덱스를 이용하는 픽쳐(또는, 타일/슬라이스)를 예측 픽쳐(predictive picture) 또는 P 픽쳐(또는, 타일/슬라이스)라고 하며, 최대 두 개의 모션 벡터 및 참조 픽쳐 인덱스를 이용하는 픽쳐(또는, 타일/슬라이스)를 쌍예측 픽쳐(Bi-predictive picture) 또는 B 픽쳐(또는, 타일/슬라이스) 라고 한다. 다시 말해서, P 픽쳐(또는, 타일/슬라이스)는 각 블록을 예측하기 위해 최대 하나의 모션 정보 세트를 이용하고, B 픽쳐(또는, 타일/슬라이스)는 각 블록을 예측하기 위해 최대 두 개의 모션 정보 세트를 이용한다. 여기서, 모션 정보 세트는 하나 이상의 모션 벡터와 하나의 참조 픽쳐 인덱스를 포함한다.
인트라 예측부(252)는 인트라 부호화 정보 및 현재 픽쳐 내의 복원된 샘플들을 이용하여 예측 블록을 생성한다. 전술한 바와 같이, 인트라 부호화 정보는 인트라 예측 모드, MPM(Most Probable Mode) 플래그, MPM 인덱스 중 적어도 하나를 포함할 수 있다. 인트라 예측부(252)는 현재 블록의 좌측 및/또는 상측에 위치한 복원된 샘플들을 참조 샘플들로 이용하여 현재 블록의 샘플 값들을 예측한다. 본 개시에서, 복원된 샘플들, 참조 샘플들 및 현재 블록의 샘플들은 픽셀들을 나타낼 수 있다. 또한, 샘플 값(sample value)들은 픽셀 값들을 나타낼 수 있다.
일 실시예에 따르면, 참조 샘플들은 현재 블록의 주변 블록에 포함된 샘플들일 수 있다. 예를 들어, 참조 샘플들은 현재 블록의 좌측 경계에 인접한 라인 상의 샘플들 및/또는 상측 경계에 인접한 라인 상의 샘플들일 수 있다. 또한, 참조 샘플들은 현재 블록의 주변 블록의 샘플들 중 현재 블록의 좌측 경계로부터 기 설정된 거리 이내의 라인 상에 위치하는 샘플들 및/또는 현재 블록의 상측 경계로부터 기 설정된 거리 이내의 라인 상에 위치하는 샘플들일 수 있다. 이때, 현재 블록의 주변 블록은 현재 블록에 인접한 좌측(L) 블록, 상측(A) 블록, 하좌측(Below Left, BL) 블록, 상우측(Above Right, AR) 블록 또는 상좌측(Above Left, AL) 블록 중 적어도 하나를 포함할 수 있다.
인터 예측부(254)는 복호 픽쳐 버퍼(256)에 저장된 참조 픽쳐 및 인터 부호화 정보를 이용하여 예측 블록을 생성한다. 인터 부호화 정보는 참조 블록에 대한 현재 블록의 모션 정보 세트(참조 픽쳐 인덱스, 모션 벡터 정보 등)를 포함할 수 있다. 인터 예측에는 L0 예측, L1 예측 및 쌍예측(Bi-prediction)이 있을 수 있다. L0 예측은 L0 픽쳐 리스트에 포함된 1개의 참조 픽쳐를 이용한 예측이고, L1 예측은 L1 픽쳐 리스트에 포함된 1개의 참조 픽쳐를 이용한 예측을 의미한다. 이를 위해서는 1세트의 모션 정보(예를 들어, 모션 벡터 및 참조 픽쳐 인덱스)가 필요할 수 있다. 쌍예측 방식에서는 최대 2개의 참조 영역을 이용할 수 있는데, 이 2개의 참조 영역은 동일한 참조 픽쳐에 존재할 수도 있고, 서로 다른 픽쳐에 각각 존재할 수도 있다. 즉, 쌍예측 방식에서는 최대 2세트의 모션 정보(예를 들어, 모션 벡터 및 참조 픽쳐 인덱스)가 이용될 수 있는데, 2개의 모션 벡터가 동일한 참조 픽쳐 인덱스에 대응될 수도 있고 서로 다른 참조 픽쳐 인덱스에 대응될 수도 있다. 이때, 참조 픽쳐들은 시간적으로 현재 픽쳐 이전이나 이후 모두에 표시(또는 출력)될 수 있다.
인터 예측부(254)는 모션 벡터 및 참조 픽쳐 인덱스를 이용하여 현재 블록의 참조 블록을 획득할 수 있다. 상기 참조 블록은 참조 픽쳐 인덱스에 대응하는 참조 픽쳐 내에 존재한다. 또한, 모션 벡터에 의해서 특정된 블록의 샘플 값 또는 이의 보간(interpolation)된 값이 현재 블록의 예측자(predictor)로 이용될 수 있다. 서브펠(sub-pel) 단위의 픽셀 정확도를 갖는 모션 예측을 위하여 이를 테면, 루마 신호에 대하여 8-탭 보간 필터가, 크로마 신호에 대하여 4-탭 보간 필터가 사용될 수 있다. 다만, 서브펠 단위의 모션 예측을 위한 보간 필터는 이에 한정되지 않는다. 이와 같이 인터 예측부(254)는 이전에 복원된 픽쳐로부터 현재 유닛의 텍스쳐를 예측하는 모션 보상(motion compensation)을 수행한다. 이때, 인터 예측부는 모션 정보 세트를 이용할 수 있다.
추가적인 실시예에 따라, 예측부(250)는 인트라 BC 예측부(미도시)를 포함할 수 있다. 인트라 BC 예측부는 현재 픽쳐 내의 복원된 샘플들로부터 인트라 BC 예측을 수행하여, 인트라 BC 부호화 정보를 엔트로피 코딩부(160)에 전달한다. 인트라 BC 예측부는 현재 픽쳐 내의 특정 영역을 참조하여 현재 영역의 블록 벡터값을 획득한다. 인트라 BC 예측부는 획득된 블록 벡터값을 이용하여 인트라 BC 예측을 수행할 수 있다. 인트라 BC 예측부는 인트라 BC 부호화 정보를 엔트로피 코딩부(160)로 전달한다. 인트라 BC 부호화 정보는 블록 벡터 정보를 포함할 수 있다.
상기 인트라 예측부(252) 또는 인터 예측부(254)로부터 출력된 예측자, 및 역변환부(225)로부터 출력된 레지듀얼 값이 더해져서 복원된 비디오 픽쳐가 생성된다. 즉, 비디오 신호 디코딩 장치(200)는 예측부(250)에서 생성된 예측 블록과 역변환부(225)로부터 획득된 레지듀얼을 이용하여 현재 블록을 복원한다.
한편, 도 2의 블록도는 본 발명의 일 실시예에 따른 디코딩 장치(200)를 나타낸 것으로서, 분리하여 표시된 블록들은 디코딩 장치(200)의 엘리먼트들을 논리적으로 구별하여 도시한 것이다. 따라서 전술한 디코딩 장치(200)의 엘리먼트들은 디바이스의 설계에 따라 하나의 칩으로 또는 복수의 칩으로 장착될 수 있다. 일 실시예에 따르면, 전술한 디코딩 장치(200)의 각 엘리먼트의 동작은 프로세서(미도시)에 의해 수행될 수 있다.
도 3은 픽쳐 내에서 코딩 트리 유닛(Coding Tree Unit, CTU)이 코딩 유닛들(Coding Units, CUs)로 분할되는 실시예를 도시한다. 비디오 신호의 코딩 과정에서, 픽쳐는 코딩 트리 유닛(CTU)들의 시퀀스로 분할될 수 있다. 코딩 트리 유닛은 루마(luma) 샘플들의 NXN 블록과, 이에 대응하는 크로마(chroma) 샘플들의 2개의 블록들로 구성된다. 코딩 트리 유닛은 복수의 코딩 유닛들로 분할될 수 있다. 코딩 트리 유닛은 분할되지 않고 리프 노드가 될 수도 있다. 이 경우, 코딩 트리 유닛 자체가 코딩 유닛이 될 수 있다. 코딩 유닛은 상기에서 설명한 비디오 신호의 처리 과정, 즉 인트라/인터 예측, 변환, 양자화 및/또는 엔트로피 코딩 등의 과정에서 픽쳐를 처리하기 위한 기본 단위를 가리킨다. 하나의 픽쳐 내에서 코딩 유닛의 크기 및 모양은 일정하지 않을 수 있다. 코딩 유닛은 정사각형 혹은 직사각형의 모양을 가질 수 있다. 직사각형 코딩 유닛(혹은, 직사각형 블록)은 수직 코딩 유닛(혹은, 수직 블록)과 수평 코딩 유닛(혹은, 수평 블록)을 포함한다. 본 명세서에서, 수직 블록은 높이가 너비보다 큰 블록이며, 수평 블록은 너비가 높이보다 큰 블록이다. 또한, 본 명세서에서 정사각형이 아닌(non-square) 블록은 직사각형 블록을 가리킬 수 있지만, 본 발명은 이에 한정되지 않는다.
도 3을 참조하면, 코딩 트리 유닛은 먼저 쿼드 트리(Quad Tree, QT) 구조로 분할된다. 즉, 쿼드 트리 구조에서 2NX2N 크기를 가지는 하나의 노드는 NXN 크기를 가지는 네 개의 노드들로 분할될 수 있다. 본 명세서에서 쿼드 트리는 4진(quaternary) 트리로도 지칭될 수 있다. 쿼드 트리 분할은 재귀적으로 수행될 수 있으며, 모든 노드들이 동일한 깊이로 분할될 필요는 없다.
한편, 전술한 쿼드 트리의 리프 노드(leaf node)는 멀티-타입 트리(Multi-Type Tree, MTT) 구조로 더욱 분할될 수 있다. 본 발명의 실시예에 따르면, 멀티 타입 트리 구조에서는 하나의 노드가 수평 혹은 수직 분할의 2진(binary, 바이너리) 혹은 3진(ternary, 터너리) 트리 구조로 분할될 수 있다. 즉, 멀티-타입 트리 구조에는 수직 바이너리 분할, 수평 바이너리 분할, 수직 터너리 분할 및 수평 터너리 분할의 4가지 분할 구조가 존재한다. 본 발명의 실시예에 따르면, 상기 각 트리 구조에서 노드의 너비 및 높이는 모두 2의 거듭제곱 값을 가질 수 있다. 예를 들어, 바이너리 트리(Binary Tree, BT) 구조에서, 2NX2N 크기의 노드는 수직 바이너리 분할에 의해 2개의 NX2N 노드들로 분할되고, 수평 바이너리 분할에 의해 2개의 2NXN 노드들로 분할될 수 있다. 또한, 터너리 트리(Ternary Tree, TT) 구조에서, 2NX2N 크기의 노드는 수직 터너리 분할에 의해 (N/2)X2N, NX2N 및 (N/2)X2N의 노드들로 분할되고, 수평 터너리 분할에 의해 2NX(N/2), 2NXN 및 2NX(N/2)의 노드들로 분할될 수 있다. 이러한 멀티-타입 트리 분할은 재귀적으로 수행될 수 있다.
멀티-타입 트리의 리프 노드는 코딩 유닛이 될 수 있다. 코딩 유닛에 대한 분할이 지시되지 않거나 코딩 유닛이 최대 변환 길이에 비해 크지 않은 경우, 해당 코딩 유닛은 더 이상의 분할 없이 예측 및 변환의 단위로 사용된다. 한편, 전술한 쿼드 트리 및 멀티-타입 트리에서 다음의 파라메터들 중 적어도 하나가 사전에 정의되거나 PPS, SPS, VPS 등과 같은 상위 레벨 세트의 RBSP를 통해 전송될 수 있다. 1) CTU 크기: 쿼드 트리의 루트 노드(root node) 크기, 2) 최소 QT 크기(MinQtSize): 허용된 최소 QT 리프 노드 크기, 3) 최대 BT 크기(MaxBtSize): 허용된 최대 BT 루트 노드 크기, 4) 최대 TT 크기(MaxTtSize): 허용된 최대 TT 루트 노드 크기, 5) 최대 MTT 깊이(MaxMttDepth): QT의 리프 노드로부터의 MTT 분할의 최대 허용 깊이, 6) 최소 BT 크기(MinBtSize): 허용된 최소 BT 리프 노드 크기, 7) 최소 TT 크기(MinTtSize): 허용된 최소 TT 리프 노드 크기.
도 4는 쿼드 트리 및 멀티-타입 트리의 분할을 시그널링하는 방법의 일 실시예를 도시한다. 전술한 쿼드 트리 및 멀티-타입 트리의 분할을 시그널링하기 위해 기 설정된 플래그들이 사용될 수 있다. 도 4를 참조하면, 쿼드 트리 노드의 분할 여부를 지시하는 플래그 ‘qt_split_flag’, 멀티-타입 트리 노드의 분할 여부를 지시하는 플래그 ‘mtt_split_flag’, 멀티-타입 트리 노드의 분할 방향을 지시하는 플래그 ‘mtt_split_vertical_flag’ 또는 멀티-타입 트리 노드의 분할 모양을 지시하는 플래그 ‘mtt_split_binary_flag’ 중 적어도 하나가 사용될 수 있다.
본 발명의 실시예에 따르면, 코딩 트리 유닛은 쿼드 트리의 루트 노드이며, 쿼드 트리 구조로 우선 분할될 수 있다. 쿼드 트리 구조에서는 각각의 노드 ‘QT_node’ 별로 ‘qt_split_flag’가 시그널링된다. ‘qt_split_flag’의 값이 1일 경우 해당 노드는 4개의 정사각형 노드들로 분할되며, ‘qt_split_flag’의 값이 0일 경우 해당 노드는 쿼드 트리의 리프 노드 ‘QT_leaf_node’가 된다.
각각의 쿼드 트리 리프 노드 ‘QT_leaf_node’는 멀티-타입 트리 구조로 더 분할될 수 있다. 멀티-타입 트리 구조에서는 각각의 노드 ‘MTT_node’ 별로 ‘mtt_split_flag’가 시그널링된다. ‘mtt_split_flag’의 값이 1일 경우 해당 노드는 복수의 직사각형 노드들로 분할되며, ‘mtt_split_flag’의 값이 0일 경우 해당 노드는 멀티-타입 트리의 리프 노드 ‘MTT_leaf_node’가 된다. 멀티-타입 트리 노드 ‘MTT_node’가 복수의 직사각형 노드들로 분할될 경우(즉, ‘mtt_split_flag’의 값이 1일 경우), 노드 ‘MTT_node’를 위한 ‘mtt_split_vertical_flag’ 및 ‘mtt_split_binary_flag’가 추가로 시그널링될 수 있다. ‘mtt_split_vertical_flag’의 값이 1일 경우 노드 ‘MTT_node’의 수직 분할이 지시되며, ‘mtt_split_vertical_flag’의 값이 0일 경우 노드 ‘MTT_node’의 수평 분할이 지시된다. 또한, ‘mtt_split_binary_flag’의 값이 1일 경우 노드 ‘MTT_node’는 2개의 직사각형 노드들로 분할되며, ‘mtt_split_binary_flag’의 값이 0일 경우 노드 ‘MTT_node’는 3개의 직사각형 노드들로 분할된다.
코딩을 위한 픽쳐 예측(모션 보상)은 더 이상 나누어지지 않는 코딩 유닛(즉 코딩 유닛 트리의 리프 노드)을 대상으로 이루어진다. 이러한 예측을 수행하는 기본 단위를 이하에서는 예측 유닛(prediction unit) 또는 예측 블록(prediction block)이라고 한다.
이하, 본 명세서에서 사용되는 유닛이라는 용어는 예측을 수행하는 기본 단위인 상기 예측 유닛을 대체하는 용어로 사용될 수 있다. 다만, 본 발명이 이에 한정되는 것은 아니며, 더욱 광의적으로는 상기 코딩 유닛을 포함하는 개념으로 이해될 수 있다.
도 5 및 도 6은 본 발명의 실시예에 따른 인트라 예측 방법을 더욱 구체적으로 도시한다. 전술한 바와 같이, 인트라 예측부는 현재 블록의 좌측 및/또는 상측에 위치한 복원된 샘플들을 참조 샘플들로 이용하여 현재 블록의 샘플 값들을 예측한다.
먼저, 도 5는 인트라 예측 모드에서 현재 블록의 예측을 위해 사용되는 참조 샘플들의 일 실시예를 도시한다. 일 실시예에 따르면, 참조 샘플들은 현재 블록의 좌측 경계에 인접한 샘플들 및/또는 상측 경계에 인접한 샘플들일 수 있다. 도 5에 도시된 바와 같이, 현재 블록의 크기가 WXH이고 현재 블록에 인접한 단일 참조 라인(line)의 샘플들이 인트라 예측에 사용될 경우, 현재 블록의 좌측 및/또는 상측에 위치한 최대 2W+2H+1개의 주변 샘플들을 사용하여 참조 샘플들이 설정될 수 있다.
본 발명의 추가적인 실시예에 따르면, 현재 블록의 인트라 예측을 위해 복수의 참조 라인들 상의 샘플들이 사용될 수 있다. 복수의 참조 라인들은 현재 블록의 경계로부터 기 설정된 거리 이내에 위치한 n개의 라인들로 구성될 수 있다. 이 경우, 현재 블록의 인트라 예측을 위해 사용되는 적어도 하나의 참조 라인을 지시하는 별도의 참조 라인 정보가 시그널링될 수 있다. 구체적으로, 참조 라인 정보는 복수의 참조 라인들 중 어느 하나를 지시하는 인덱스를 포함할 수 있다.
본 개시에서, 현재 블록의 특정 변 측의 참조 샘플은 해당 변 주변의 참조 샘플들 중에서 현재 블록의 높이 또는 너비 범위 내의 참조 샘플들일 수 있다. 또한, 특정 변 주변의 참조 샘플들은 복수의 참조 라인들 중 어느 하나의 참조 라인 상의 샘플들일 수 있다. 예를 들어, 현재 블록의 좌변 측의 참조 샘플은 좌변 주변의 참조 샘플들 중에서 현재 블록의 높이 범위 내의 참조 샘플들을 나타낼 수 있다. 현재 블록의 좌변 측의 참조 샘플은 좌변 주변의 참조 샘플들 중에서 현재 블록의 너비 범위 내의 참조 샘플들을 나타낼 수 있다. 또한, 본 개시에서 특정 변 측의 참조 샘플은 특정 변에 대응하는 참조 샘플로 지칭될 수도 있다.
또한, 참조 샘플로 사용될 적어도 일부의 샘플이 아직 복원되지 않은 경우, 인트라 예측부는 참조 샘플 패딩 과정을 수행하여 참조 샘플을 획득할 수 있다. 또한, 인트라 예측부는 인트라 예측의 오차를 줄이기 위해 참조 샘플 필터링 과정을 수행할 수 있다. 즉, 현재 블록 주변의 샘플들 및/또는 참조 샘플 패딩 과정에 의해 획득된 참조 샘플들에 필터링을 수행하여 필터링된 참조 샘플들을 획득할 수 있다. 인트라 예측부는 필터링되지 않은 참조 샘플들 또는 필터링된 참조 샘플들을 이용하여 현재 블록의 샘플들을 예측한다.
다음으로, 도 6은 인트라 예측에 사용되는 예측 모드들의 일 실시예를 도시한다. 인트라 예측을 위해, 인트라 예측 방향을 지시하는 인트라 예측 모드 정보가 시그널링될 수 있다. 인트라 예측 모드 정보는 인트라 예측 모드 세트를 구성하는 복수의 인트라 예측 모드들 중 어느 하나를 지시한다. 현재 블록이 인트라 예측된 블록일 경우, 디코더는 비트스트림으로부터 현재 블록의 인트라 예측 모드 정보를 수신한다. 디코더의 인트라 예측부는 추출된 인트라 예측 모드 정보에 기초하여 현재 블록에 대한 인트라 예측을 수행한다.
본 발명의 실시예에 따르면, 인트라 예측 모드 세트는 인트라 예측에 사용되는 모든 인트라 예측 모드들(예, 총 67개의 인트라 예측 모드들)을 포함할 수 있다. 더욱 구체적으로, 인트라 예측 모드 세트는 평면 모드, 직류(direct current, DC) 모드 및 복수의(예, 65개의) 각도 모드들(즉, 방향 모드들)을 포함할 수 있다. 일부 실시예에서, 인트라 예측 모드 세트는 모든 인트라 예측 모드들 중 일부로 구성될 수도 있다. 각각의 인트라 예측 모드는 기 설정된 인덱스(즉, 인트라 예측 모드 인덱스)를 통해 지시될 수 있다. 예를 들어, 도 6에 도시된 바와 같이 인트라 예측 모드 인덱스 0은 평면 모드를 지시하고, 인트라 예측 모드 인덱스 1은 DC 모드를 지시한다. 또한, 인트라 예측 모드 인덱스 2 내지 66은 서로 다른 각도 모드들을 각각 지시할 수 있다. 이때, 인트라 예측 모드 인덱스 2는 수평 대각(Horizontal Diagonal, HDIA) 모드를 지시하고, 인트라 예측 모드 인덱스 18은 수평(Horizontal, HOR) 모드를 지시하고, 인트라 예측 모드 인덱스 34는 대각(Diagonal, DIA) 모드를 지시하고, 인트라 예측 모드 인덱스 50은 수직(Vertical, VER) 모드를 지시하며, 인트라 예측 모드 인덱스 66은 수직 대각(Vertical Diagonal, VDIA) 모드를 지시한다.
도 7은 현재 블록의 인트라 예측 모드가 DC 모드인 경우, 현재 블록이 예측되는 방법의 일 실시예를 나타내는 도면이다. 일 실시예에 따라, 디코더는 현재 블록의 예측을 위한 인트라 예측 모드 정보를 획득할 수 있다. 예를 들어, 현재 블록의 인트라 예측 모드 정보는 인트라 예측 모드 세트가 포함하는 인트라 예측 모드들 중에서 어느 하나를 지시할 수 있다. 현재 블록의 예측을 위한 인트라 예측 모드 정보는 DC 모드를 지시할 수 있다. 이 경우, 디코더는 DC 모드에 기초하여 현재 블록을 복원할 수 있다.
구체적으로, 인코더 및 디코더는 직류(direct current, DC) 값에 기초하여 현재 블록의 예측 블록을 획득할 수 있다. DC 값은 현재 블록의 참조 샘플에 기초하여 획득될 수 있다. 구체적으로, 현재 블록의 DC 값은 현재 블록의 상측 변 및 좌측 변 각각에 대응하는 복수의 참조 샘플들에 기초하여 획득될 수 있다. 현재 블록의 DC 값은 현재 블록의 상측 변 및 좌측 변 각각에 대응하는 복수의 참조 샘플 값들의 평균에 기초하여 획득될 수 있다. 현재 블록의 예측 모드가 DC 모드인 경우, 예측 블록 내의 모든 예측 샘플 값들은 단일의 DC 값에 기초하여 획득될 수 있다. 디코더는 획득된 예측 블록 기초하여 현재 블록을 복원할 수 있다.
또한, 인코더는 예측 블록에 기초하여 현재 블록의 잔차 신호를 획득할 수 있다. 인코더는 현재 블록의 잔차 신호를 인코딩하여 잔차 신호를 포함하는 비트스트림을 생성할 수 있다. 또한, 인코더는 생성된 비트스트림을 디코더에게 전송할 수 있다. 디코더는 인코더로부터 현재 블록의 잔차 신호를 포함하는 비트스트림을 수신할 수 있다. 디코더는 획득된 예측 블록 및 수신된 잔차 신호에 기초하여 현재 블록을 복원할 수 있다. 추가적인 실시예에 따라, 현재 블록의 예측 블록에 대해 위치-의존적인 인트라 예측 결합(position dependent intra prediction combination, PDPC)과 같은 경계 필터링이 수행될 수도 있다. 이 경우, 인코더 필터링된 예측 블록에 기초하여 잔차 신호를 획득할 수 있다. 또한, 디코더는 필터링된 예측 블록에 기초하여 현재 블록을 복원할 수 있다.
이하에서는, 본 발명의 일 실시예에 따라 현재 블록의 DC 값이 획득되는 방법에 대해 구체적으로 설명하도록 한다. 본 개시에서, 현재 블록의 DC 값은 현재 블록의 예측을 위한 DC 값을 나타낸다. 도 7을 참조하면, 현재 블록(701)의 예측을 위한 DC 값은 현재 블록(701)의 상측 변과 좌측 변 각각에 대응하는 복수의 참조 샘플들(702)에 기초하여 획득될 수 있다. 예를 들어, DC 값은 현재 블록(701)의 복수의 참조 샘플들(702)의 평균에 기초하여 획득될 수 있다. 도 7과 같이, 현재 블록(701)의 크기가 4X4인 경우, 상측 변에 대응하는 4개의 참조 샘플들(U0, U1, U2, U3) 및 좌측 변에 대응하는 4개의 참조 샘플들(L0, L1, L2, L3)이 DC 값 획득에 사용될 수 있다. 예를 들어, 현재 블록(701)의 DC 값은 복수의 참조 샘플들(U0, U1, U2, U3, L0, L1, L2, L3) 각각의 샘플 값들의 평균일 수 있다.
구체적으로, 인코더 및 디코더는 현재 블록의 상측 변 및 좌측 변 각각에 대응하는 참조 샘플들(U0, U1, U2, U3, L0, L1, L2, L3)의 평균을 연산하여 현재 블록(701)의 DC 값을 획득할 수 있다. 이때, 샘플 값들의 평균을 획득하기 위해 나눗셈 연산이 수행될 수 있다. 그러나 나눗셈 연산은 하드웨어 또는 소프트웨어 구현 시, 비디오 신호 처리의 복잡도 및 연산량을 증가시키는 요인이 될 수 있다.
한편, 나눗셈에서 제수(divisor)가 2의 지수 승인 경우, 쉬프트 연산자는 나눗셈 연산자를 대체할 수 있다. 즉, 제수(divisor)가 2의 지수 승인 경우, 인코더 및 디코더는 하나의 쉬프트 연산자를 이용하여 나눗셈 연산을 수행할 수 있다. 이에 따라, 평균 값 연산의 대상이 되는 참조 샘플 값들의 개수가 2의 지수 승인 경우, 인코더 및 디코더는 쉬프트 연산자를 이용하여 참조 샘플 값들의 평균을 획득할 수 있다. 본 개시에서, 쉬프트 연산 또는 연산자는 비트-단위(bit-wise) 산술(arithmetic) 쉬프트 연산 또는 연산자를 나타낼 수 있다.
예를 들어, 인코더 및 디코더는 현재 블록의 상측 변 및 좌측 변 각각에 대응하는 참조 샘플들 각각의 샘플 값의 전체 합에 대해 쉬프트 연산을 수행할 수 있다. 인코더 및 디코더는 상기 샘플 값의 전체 합을 쉬프트 파라미터만큼 쉬프트할 수 있다. 쉬프트 파라미터는 현재 블록의 너비 또는 높이 중 적어도 하나의 길이에 기초하여 결정될 수 있다. 예를 들어, 쉬프트 파라미터는 현재 블록의 너비 및 높이의 합일 수 있다. 현재 블록의 너비 및 높이의 합은 DC 값 획득에 사용되는 참조 샘플들의 개수일 수 있다. 이를 통해, 인코더 및 디코더는 나눗셈 연산을 수행하지 않고 현재 블록의 DC 값을 획득할 수 있다. 이를 수식으로 나타내면 아래 [수학식 1]과 같다.
[수학식 1]
(SUM(W+H)+offset) >> log2(W+H)
[수학식 1]에서 W는 현재 블록의 너비를 나타내고, H는 현재 블록의 높이를 나타낸다. 또한, SUM(W+H)는 현재 블록의 상측 변에 대응하는 W개의 상측 참조 샘플 값들과 좌측 변에 대응하는 H개의 좌측 참조 샘플 값들 전체의 합을 나타낸다. “>>”는 쉬프트 연산자를 나타낸다. 구체적으로, “>>”는 우측 쉬프트 연산자를 나타낸다. 우측 쉬프트 연산자는 연산자에 입력된 인자를 2진화하고, 2진화된 인자를 쉬프트 파라미터만큼 우측으로 쉬프트한다.
[수학식 1]에서, offset은 평균 값의 소수점 이하 부분을 반올림하기 위한 파라미터일 수 있다. 일 실시예에 따라, offset은 현재 블록의 너비 또는 높이 중 적어도 하나의 길이에 기초하여 결정될 수 있다. 구체적으로, offset은 현재 블록의 너비와 높이의 합을 2로 나눈 값일 수 있다. 즉, offset은 DC 값 획득에 사용되는 참조 샘플들의 개수를 2로 나눈 값일 수 있다. 예를 들어, offset은 2^(log2(W+H)-1)로 표현될 수 있다.
도 7과 같이, 현재 블록의 높이와 너비가 동일한 경우, 현재 블록의 DC 값의 획득에 사용되는 참조 샘플의 개수가 2의 지수 승일 수 있다. 전술한 바와 같이, 인코더 및 디코더는 쉬프트 연산자를 이용하여 2의 지수 승 개수의 참조 샘플 값들에 대한 평균을 획득할 수 있다. 인코더 및 디코더는 덧셈 연산과 쉬프트 연산만을 사용하여 현재 블록의 DC 값을 획득할 수 있다. 이에 따라, 본 발명의 일 실시예에 따른 인코더 및 디코더는 나눗셈 연산을 이용하여 DC 값을 획득하는 경우에 비해 저 복잡도 하드웨어 또는 소프트웨어로 구현될 수 있다.
한편, 현재 블록이 코딩 트리 유닛으로부터 분할된 방법에 따라 현재 블록의 모양은 정사각형이 아닐 수 있다. 전술한 바와 같이, 코딩 트리 유닛으로부터 분할된 예측 단위의 크기 및 모양은 일정하지 않을 수 있다. 예를 들어, 현재 블록은 현재 블록의 높이와 너비가 서로 다른 직사각형 블록일 수 있다. 현재 블록이 직사각형 블록인 경우, 현재 블록의 상측 변과 좌측 변 각각에 대응하는 참조 샘플들의 개수는 2의 지수 승 개수가 아닐 수 있다. 즉, 현재 블록의 상측 변의 길이에 대응하는 샘플 개수와 좌측 변의 길이에 대응하는 샘플 개수의 합이 2의 지수 승이 아닐 수 있다.
예를 들어, 현재 블록은 높이 및 너비가 각각 '4' 및 '8'인 직사각형 블록일 수 있다. 이 경우, 현재 블록의 상측 변과 좌측 변 각각에 대응하는 참조 샘플들의 개수는 (4+8)개(즉, 12개)이다. DC 값의 획득에 사용되는 참조 샘플들의 개수가 2의 지수 승이 아닌 경우, 인코더 및 디코더는 도 7과 같은 방법으로 DC 값을 획득하기 어려울 수 있다. 즉, 현재 블록의 높이와 너비가 다른 경우, 인코더 및 디코더에서 나눗셈 연산이 구현되어야 할 수 있다. 그러나 프로세싱 과정이 나눗셈 연산을 포함하는 경우, 복잡도 증가로 인해 연산 속도가 저하될 수 있다.
따라서, 현재 블록의 높이와 너비가 서로 다른 경우, 인코더 및 디코더는 현재 블록의 높이와 너비가 동일한 경우와 다른 방법을 이용하여 현재 블록의 DC 값을 획득할 수 있다. 예를 들어, 본 발명의 일 실시예에 따른 인코더 및 디코더는 현재 블록의 좌측 변 및 상측 변 각각에 대응하는 참조 샘플들 중 일부를 포함하는 참조 샘플 세트에 기초하여 현재 블록의 DC 값을 획득할 수 있다. 이때, 참조 샘플 세트가 포함하는 참조 샘플의 개수는 2의 지수 승일 수 있다. 또한, 참조 샘플 세트는 기 설정된 위치의 참조 샘플들로 구성될 수 있다. 참조 샘플 세트는 기 설정된 조건을 만족하는 참조 샘플들로 구성될 수 있다.
도 8은 본 발명의 일 실시예에 따라 현재 블록의 높이와 너비가 다른 경우, 현재 블록의 DC 값을 획득하는 방법을 나타내는 도면이다. 일 실시예에 따라, 인코더 및 디코더는 현재 블록의 제1 변의 길이와 제2 변의 길이를 비교할 수 있다. 본 개시에서, 제1 변은 현재 블록의 상측 변 및 좌측 변 중 어느 하나일 수 있다. 또한, 제2 변은 현재 블록의 상측 변 및 좌측 변 중 다른 하나일 수 있다. 비교 결과에 따라 제1 변의 길이와 제2 변의 길이가 동일한 경우, 인코더 및 디코더는 도 7을 통해 전술한 방법으로 현재 블록의 DC 값을 획득할 수 있다.
반면, 비교 결과에 따라 제1 변의 길이와 제2 변의 길이가 서로 다른 경우, 인코더 및 디코더는 참조 샘플 전체 중 일부를 포함하는 참조 샘플 세트를 구성할 수 있다. 인코더 및 디코더는 현재 블록의 제1 변 측 참조 샘플들 및 제2 변 측 참조 샘플들 중 일부인 2의 지수 승 개수의 참조 샘플들을 포함하는 참조 샘플 세트를 구성할 수 있다. 인코더 및 디코더는 제1 변 측 참조 샘플들 및 제2 변 측 참조 샘플들 중에서 일부가 제외된 2의 지수 승 개수의 참조 샘플들을 포함하는 참조 샘플 세트를 획득할 수 있다. 또한, 인코더 및 디코더는 참조 샘플 세트에 기초하여 현재 블록의 DC 값을 획득할 수 있다. 인코더 및 디코더는 획득된 DC 값에 기초하여 현재 블록을 예측할 수 있다.
도 8에서, 현재 블록(801)은 높이(N)와 너비(M)가 서로 다른 직사각형 블록일 수 있다. 이 경우, 현재 블록(801)의 제1 변 및 제2 변 각각에 대응하는 DC 참조 샘플들의 개수는 (M+N)일 수 있다. 본 개시에서, DC 참조 샘플들은 현재 블록의 상측 변과 좌측 변 각각에 대응하는 복수의 참조 샘플들 전체를 나타내는 용어로 사용될 수 있다. 현재 블록(801)의 DC 값은 (M+N)개의 DC 참조 샘플들 중에서 일부인 (M'+N') 개수의 참조 샘플들을 포함하는 참조 샘플 세트에 기초하여 획득될 수 있다. 이때, (M'+N')는 2^k (이때, k는 정수)로 표현될 수 있다. 또한, (M'+N')는 (M+N) 보다 작을 수 있다. 예를 들어, 참조 샘플 세트는 DC 참조 샘플들 중에서 짧은 변 측의 참조 샘플 중 적어도 일부를 제외한 나머지 참조 샘플들을 포함할 수 있다. 또한, 참조 샘플 세트는 DC 참조 샘플들 중에서 긴 변 측의 참조 샘플 중 적어도 일부를 제외한 나머지 참조 샘플들을 포함할 수 있다. 이하에서는, 현재 블록의 높이와 너비가 서로 다른 경우, 현재 블록의 DC 값을 획득하는 방법에 대해 구체적으로 설명하도록 한다.
본 발명의 일 실시예에 따라, 현재 블록의 DC 값은 적어도 하나의 참조 샘플 세트에 기초하여 획득될 수 있다. 일 실시예에 따라, 인코더 및 디코더는 하나의 참조 샘플 세트에 기초하여 현재 블록의 DC 값을 획득할 수 있다. 예를 들어, 현재 블록(801)의 DC 값은 참조 샘플 세트에 포함된 참조 샘플 값들의 평균에 기초하여 획득될 수 있다. [수학식 2]는 참조 샘플 세트에 기초하여 DC 값이 획득되는 방법을 나타낸다. [수학식 2]를 참조하면, 인코더 및 디코더는 나눗셈을 수행하지 않고 현재 블록의 DC 값을 획득할 수 있다.
[수학식 2]
(SUM(M'+N')+offset)>>log2(M'+N')
[수학식 2]에서, SUM(M'+N')은 현재 블록의 상측 변 및 좌측 변 각각에 대응하는 참조 샘플 값들 중에서 참조 샘플 세트가 포함하는 참조 샘플 값들의 합을 나타낸다. 또한, M'은 상측 변에 대응하는 참조 샘플들 중에서 참조 샘플 세트가 포함하는 참조 샘플이 개수를 나타낸다. N'는 좌측 변에 대응하는 참조 샘플들 중에서 참조 샘플 세트가 포함하는 참조 샘플의 개수를 나타낸다. offset은 평균 값의 소수점 이하 부분을 반올림하기 위한 파라미터일 수 있다. 예를 들어, offset은 '(M'+N')>>1'일 수 있다.
추가적인 실시예에 따라, 인코더 및 디코더는 복수의 참조 샘플 세트에 기초하여 현재 블록의 DC 값을 획득할 수도 있다. 이에 대해서는 도 14를 참조하여 구체적으로 설명하도록 한다. 이하에서는, 현재 블록의 높이와 너비가 서로 다른 경우, 현재 블록의 DC 값 획득을 위한 참조 샘플 세트가 구성되는 다양한 방법에 대해 설명하도록 한다.
도 9, 도 10 및 도 11는 현재 블록의 높이와 너비가 서로 다른 경우, 참조 샘플 세트가 구성되는 방법의 일 실시예를 나타내는 도면이다. 도 9를 참조하면, 현재 블록(901)은 높이 및 너비가 각각 '4' 및 '8'인 직사각형 블록이다. 이 경우, 현재 블록(901)의 상측 변과 좌측 변 각각에 대응하는 참조 샘플들의 전체 개수는 (4+8)개(즉, 12개)이다. 전술한 바와 같이, DC 값의 획득에 사용되는 참조 샘플들의 개수가 2의 지수 승이 아닌 경우 쉬프트 연산자에 의해 나눗셈 연산자가 대체되기 어렵다. 현재 블록(901)의 12개의 참조 샘플들(L0, L1, L2, L3, 0, 1, 2, 3, 4, 5, 6, 7) 전체의 평균에 기초하여 DC 값을 획득하는 경우, 인코더 및 디코더에서 나눗셈 연산이 구현되어야 한다.
전술한 바와 같이, 현재 블록(901)의 DC 값은 현재 블록의 상측 변과 좌측 변 각각에 대응하는 참조 샘플들 중 일부에 기초하여 획득될 수 있다. 이 경우, 인코더 및 디코더는 나눗셈을 구현하지 않고 현재 블록의 DC 값을 획득할 수 있다. 예를 들어, 현재 블록(901)의 DC 값은 12개의 참조 샘플들(L0, L1, L2, L3, 0, 1, 2, 3, 4, 5, 6, 7) 중 일부로 구성된 참조 샘플 세트(DC0)에 기초하여 획득될 수 있다. 인코더 및 디코더는 인코더와 디코더 간에 미리 정의된 규칙에 따라 참조 샘플 세트를 구성할 수 있다. 일 실시예에 따라, 참조 샘플 세트(DC0)는 현재 블록(901)의 상측 변과 좌측 변 각각에 대응하는 참조 샘플들 중 기 설정된 개수의 샘플들이 제외된 나머지 참조 샘플들로 구성될 수 있다. 예를 들어, 인코더 및 디코더는 나머지 참조 샘플들로 구성된 참조 샘플 세트를 구성할 수 있다. 이때, 나머지 참조 샘플들의 개수는 2의 지수 승 개수일 수 있다.
본 발명의 일 실시예에 따라, 기 설정된 개수는 특정 변의 길이에 대응하는 샘플 개수일 수 있다. 현재 블록의 DC 참조 샘플들의 전체 개수는 현재 블록의 너비 및 높이의 합일 수 있다. 예를 들어, 현재 블록의 너비가 M이고, 높이가 N인 경우, 참조 샘플 세트는 M개 또는 N개의 참조 샘플들로 구성될 수 있다. DC 참조 샘플들 전체로부터 특정 변의 길이에 대응하는 샘플 개수의 참조 샘플들이 제외되는 경우, 참조 샘플 세트가 포함하는 참조 샘플의 개수는 2의 지수 승이 될 수 있다. 일 실시예에 따라, 특정 변은 현재 블록의 제1 변과 제2 변 중에서 짧은 변일 수 있다. 이 경우, 참조 샘플 세트는 DC 참조 샘플들 전체로부터 짧은 변의 길이에 대응하는 샘플 개수의 참조 샘플들이 제외된 나머지 참조 샘플들을 포함할 수 있다. 즉, 참조 샘플 세트가 포함하는 참조 샘플의 개수는 현재 블록의 제1 변과 제2 변 중에서 긴 변의 길이에 대응하는 샘플 개수일 수 있다. 현재 블록의 너비가 높이보다 긴 경우, 특정 변은 좌측 변일 수 있다. 또한, 현재 블록의 너비가 높이 보다 작은 경우, 특정 변은 상측 변일 수 있다.
본 발명의 일 실시예에 따라, 참조 샘플 세트는 현재 블록의 DC 참조 샘플들 중에서, 짧은 변의 샘플 개수만큼 제외된 나머지 참조 샘플들로 구성될 수 있다. 이 경우, 도 8을 통해 전술한 [수학식 2]는 (SUM(나머지 참조 샘플 개수)+(긴 변의 길이>>1))>>log2(긴 변의 길이)와 같이 표현될 수 있다. 여기에서, 긴 변의 길이는 현재 블록의 제1 변과 제2 변 중에서 더 긴 변의 길이를 나타낼 수 있다. 전술한 수학식과 같이, 인코더 및 디코더는 현재 블록의 제1 변과 제2 변 중에서 긴 변의 길이에 기초하여 현재 블록의 DC 값을 획득할 수 있다.
도 9에서, 참조 샘플 세트(DC0)는 현재 블록(901)의 좌측 변과 상측 변 각각에 대응하는 참조 샘플들(L1, L2, L3, L4, 0, 1, 2, 3, 4, 5, 6, 7) 중에서 짧은 변의 샘플 개수만큼 제외된 나머지 참조 샘플들(L1, L2, L3, L4, 1, 3, 5, 7)로 구성될 수 있다. 또한, 현재 블록(901)의 DC 값은 참조 샘플 세트(DC0)가 포함하는 참조 샘플 값들의 평균에 기초하여 획득될 수 있다. 이때, 참조 샘플 세트가 포함하는 참조 샘플들 각각의 위치, 또는 참조 샘플 세트에 포함되지 않는 DC 참조 샘플들 각각의 위치를 결정하는 방법에 대해서 후술하도록 한다. 본 개시에서, 참조 샘플의 위치는 현재 블록의 좌상단 샘플의 위치에 대한 상대적인 위치일 수 있다.
일 실시예에 따라, 참조 샘플 세트는 현재 블록의 긴 변 측의 참조 샘플들 중에서 일부와 현재 블록의 짧은 변 측의 참조 샘플들 전체를 포함할 수 있다. 예를 들어, 인코더 및 디코더는 현재 블록의 긴 변 측의 참조 샘플들 중 일부를 선택할 수 있다. 또한, 인코더 및 디코더는 선택된 일부의 긴 변 측의 참조 샘플들과 짧은 변 측의 인접 참조 샘플들을 포함하는 참조 샘플 세트를 구성할 수 있다.
구체적인 실시예에 따라, 긴 변 측의 참조 샘플들(0, 1, 2, 3, 4, 5, 6, 7) 중 일부가 제외될 수 있다. 즉, 참조 샘플 세트는 긴 변 측의 참조 샘플들(0, 1, 2, 3, 4, 5, 6, 7) 중 일부만을 포함할 수 있다. 참조 샘플 세트는 긴 변 측의 참조 샘플들 중에서 특정 위치의 참조 샘플들을 제외한 나머지 참조 샘플들을 포함할 수 있다.
예를 들어, 특정 위치는 현재 블록의 긴 변 대비 짧은 변의 비율에 기초하여 결정될 수 있다. 구체적으로, DC 참조 샘플들 중에서 참조 샘플 세트에 포함되지 않는 참조 샘플들 간의 간격은 현재 블록의 긴 변 대비 짧은 변의 비율에 기초하여 결정될 수 있다. 도 9의 실시예에서, 긴 변 대비 짧은 변의 비율은 '8/4' (즉, '2')일 수 있다. 이 경우, 참조 샘플 세트는 참조 샘플 {1, 3, 5, 7}을 포함할 수 있다. 또는 참조 샘플 세트는 참조 샘플 {0, 2, 4, 6}을 포함할 수 있다.
즉, 참조 샘플 세트는 '(참조 샘플 인덱스% (긴 변 대비 짧은 변의 비율))==(기 설정된 나머지 값)'인 참조 샘플들이 제외된 나머지 참조 샘플들을 포함할 수 있다. '%'는 나머지 연산을 나타낸다. 여기에서, 현재 블록(901)의 상측 변이 좌측 변 보다 긴 경우, 참조 샘플 인덱스는 참조 샘플의 x-좌표를 나타낼 수 있다. 또한, 현재 블록(901)의 좌측 변이 상측 변 보다 긴 경우, 참조 샘플 인덱스는 참조 샘플의 y-좌표를 나타낼 수 있다. 또한, '기 설정된 나머지 값'은 나머지 연산의 피제수인 '긴 변 대비 짧은 변의 비율'에 따라 가능한 나머지 값들 중 어느 하나일 수 있다. '기 설정된 나머지 값'에 따라 DC 참조 샘플들 중에서 참조 샘플 세트에 포함되지 않는 참조 샘플들의 특정 위치가 결정될 수 있다.
도 10의 실시예에서, 현재 블록(1001)의 긴 변 대비 짧은 변의 비율은 '16/4' (즉, '4')일 수 있다. 도 10에서, 참조 샘플 세트(DC0)는 참조 샘플 {0, 2, 3, 4, 6, 7, 8, 10, 11, 12, 14, 15}을 포함할 수 있다. 도 10은, 기 설정된 나머지 값이 '1'인 경우에 구성된 참조 샘플 세트를 나타낸다. 참조 샘플 세트(DC0)는 현재 블록의 상측 변에 대응하는 참조 샘플들 중, 좌측에서부터 두번째에 위치된 참조 샘플부터 등간격인 위치의 참조 샘플들이 제외된 나머지 참조 샘플들을 포함할 수 있다. 그러나 본개시가 이에 제한되는 것은 아니다. 기 설정된 값이 '1'아닌 다른 값인 경우, 제외되는 참조 샘플들 각각의 위치는 달라질 수 있다.
도 11의 실시예에서, 현재 블록(1101)의 긴 변 대비 짧은 변의 비율은 '32/4' (즉, '8')일 수 있다. 이 경우, 참조 샘플 세트(DC0)는 DC 참조 샘플들 중에서 참조 샘플 {0, 8, 16, 24}를 제외한 나머지 참조 샘플들을 포함할 수 있다. 또한, 도 11의 실시예에는 도 9 및 도 10을 통해 설명되는 실시예들이 동일 또는 상응하는 방법으로 적용될 수 있다.
다른 구체적인 실시예에 따라, 참조 샘플 세트는 DC 참조 샘플들 중에서 기 설정된 개수의 연속된 참조 샘플들을 제외한 나머지 참조 샘플들을 포함할 수도 있다. 도 12는 현재 블록(1201)의 높이와 너비가 서로 다른 경우, 참조 샘플 세트가 구성되는 방법의 다른 일 실시예를 나타내는 도면이다. 도 12를 참조하면, 참조 샘플 세트(DC0)는 DC 참조 샘플들 중에서 참조 샘플 {0, 1, 14, 15}를 제외한 나머지 참조 샘플들을 포함할 수 있다.
도 9 내지 도 12에는, 참조 샘플 세트가 현재 블록의 짧은 변 측의 참조 샘플들 전체와 긴 변 측의 참조 샘플들 중에서 일부를 포함하는 것으로 도시되어 있으나 본 개시가 이에 제한되는 것은 아니다. 예를 들어, 참조 샘플 세트는 DC 참조 샘플들 전체로부터 현재 블록의 짧은 변에 측의 참조 샘플들 중 적어도 일부가 제외된 나머지 참조 샘플들을 포함할 수도 있다.
구체적인 실시예에 따라, 참조 샘플 세트는 DC 참조 샘플들 전체로부터 현재 블록의 짧은 변 측의 참조 샘플들이 제외된 나머지 참조 샘플들로 구성될 수 있다. 현재 블록의 짧은 변은 현재 블록의 제1 변 및 제2 변 중에서 짧은 변을 나타낼 수 있다. 즉, 참조 샘플 세트는 현재 블록의 제1 변 및 제2 변 중에서 긴 변 측의 참조 샘플들로 구성될 수 있다. 현재 블록의 DC 값은 제1 변 및 제2 변 중에서 긴 변 측의 참조 샘플들로 구성된 참조 샘플 세트에 기초하여 획득될 수 있다. 또한, 현재 블록의 DC 값은 제1 변 및 제2 변 중에서 길이가 더 긴 변의 길이에 기초하여 획득할 수 있다.
예를 들어, 인코더 및 디코더는 현재 블록의 제1 변의 길이와 제2 변의 길이를 비교할 수 있다. 비교 결과에 따라, 제1 변의 길이가 제2 변의 길이보다 긴 경우, 인코더 및 디코더는 제1 변 측의 참조 샘플들로 구성된 참조 샘플 세트를 획득할 수 있다. 또한, 인코더 및 디코더는 제1 변에 측의 참조 샘플 값들의 평균에 기초하여 현재 블록의 DC 값을 획득할 수 있다. 반대로, 제2 변의 길이가 제1 변의 길이보다 긴 경우, 인코더 및 디코더는 제2 변 측의 참조 샘플들로 구성된 참조 샘플 세트를 획득할 수 있다. 이 경우, 인코더 및 디코더는 제2 변 측의 참조 샘플들로 구성된 참조 샘플 세트에 기초하여 현재 블록의 DC 값을 획득할 수 있다.
추가적인 일 실시예에 따라, 참조 샘플 세트는 긴 변 대비 짧은 변의 비율이 기준 비율 이상인 경우에만 구성될 수도 있다. 도 13은 본 발명의 일 실시예에 따라 현재 블록의 너비와 높이 사이의 비율에 기초하여 현재 블록의 DC 값이 결정되는 방법을 나타내는 도면이다. 도 13을 참조하면, 현재 블록의 DC 값은 긴 변 대비 짧은 변의 비율이 '4' 이상인 경우에만 참조 샘플 세트에 기초하여 획득될 수 있다.
예를 들어, 인코더 및 디코더는 현재 블록의 높이와 너비에 기초하여 긴 변 대비 짧은 변의 비율을 획득할 수 있다. 현재 블록의 긴 변 대비 짧은 변의 비율이 기준 비율 이상인 경우, 인코더 및 디코더는 참조 샘플 세트를 구성할 수 있다. 또한, 인코더 및 디코더는 구성된 참조 샘플 세트에 기초하여 현재 블록의 DC 값을 획득할 수 있다. 반면, 현재 블록의 긴 변 대비 짧은 변의 비율이 기준 비율보다 작은 경우, 인코더 및 디코더는 다른 방법으로 현재 블록의 DC 값을 획득할 수 있다. 예를 들어, 인코더 및 디코더는 현재 블록의 비율에 따른 가중치에 기초하여 현재 블록의 DC 값을 획득할 수 있다. 현재 블록의 높이와 너비가 서로 다른 경우, 인코더 및 디코더가 현재 블록의 비율에 따른 가중치에 기초하여 현재 블록의 DC 값을 획득하는 방법에 대해서는 도 30을 통해 후술하도록 한다.
도 14는 본 발명의 일 실시예에 따라 현재 블록의 높이와 너비가 서로 다른 경우, 참조 샘플 세트가 구성되는 방법의 또 다른 일 실시예를 나타내는 도면이다. 일 실시예에 따라, 참조 샘플 세트를 구성하는 긴 변 측의 참조 샘플과 짧은 변 측의 참조 샘플은 동일한 개수일 수 있다. 인코더 및 디코더는 참조 샘플 세트가 포함하는 참조 샘플의 개수가 2의 지수 승 개수가 되도록 참조 샘플 세트가 포함하는 긴 변 측의 참조 샘플의 개수와 짧은 변 측의 참조 샘플의 개수를 일치시킬 수 있다.
도 14에서, 현재 블록의(1401)의 짧은 변의 길이는 '4'이고, 긴 변의 길이는 '8'일 수 있다. 이 경우, 참조 샘플 세트는 긴 변 측의 참조 샘플들(0, 1, 2, 3, 4, 5, 6, 7) 중에서 특정 4개의 참조 샘플들을 포함할 수 있다. 구체적인 실시예에 따라, 참조 샘플 세트는 긴 변 측의 참조 샘플들(0, 1, 2, 3, 4, 5, 6, 7) 중 우측의 일부 참조 샘플들(4, 5, 6, 7)이 제외된 좌측의 일부 참조 샘플들(0, 1, 2, 3)을 포함할 수 있다. 다른 실시예에 따라, 참조 샘플 세트는 긴 변 측의 참조 샘플들(0, 1, 2, 3, 4, 5, 6, 7) 중 좌측의 일부 참조 샘플들(0, 1, 2, 3)이 제외된 우측의 일부 참조 샘플들(4, 5, 6, 7)을 포함할 수 있다. 그러나 본 개시가 이에 제한되는 것은 아니다. 예를 들어, 참조 샘플 세트는 현재 블록의 긴 변 측의 참조 샘플들 중에서 가장 좌측에 위치된 참조 샘플을 기준으로 홀수 번째 참조 샘플들(0, 2, 4, 6)을 포함할 수 있다. 또는 참조 샘플 세트는 현재 블록의 긴 변 측의 참조 샘플들 중에서 가장 좌측에 위치된 참조 샘플을 기준으로 짝수 번째 참조 샘플들(1, 3, 5, 7)을 포함할 수 있다.
일 실시예에 따라, 현재 블록(1401)의 DC 값은 제1 참조 샘플 세트(DC0) 또는 제2 참조 샘플 세트(DC1) 중 어느 하나에 기초하여 획득될 수 있다. 제1 참조 샘플 세트(DC0)는 {L0, L1, L2, L3, 0, 1, 2, 3}을 포함할 수 있다. 또한, 제2 참조 샘플 세트(DC1)는 {L0, L1, L2, L3, 4, 5, 6, 7}을 포함할 수 있다. 즉, 짧은 변 측의 참조 샘플들(L0, L1, L2, L3)은 제1 참조 샘플 세트(DC0) 및 제2 참조 샘플 세트(DC1) 각각에 공통적으로 포함될 수 있다.
예를 들어, 현재 블록(1401)의 DC 값은 제1 참조 샘플 세트(DC0)에 포함된 참조 샘플 값들의 평균에 기초하여 획득될 수 있다. 또는 현재 블록(1401)의 DC 값은 제2 참조 샘플 세트(DC1)에 포함된 참조 샘플 값들의 평균에 기초하여 획득될 수 있다.
한편, 본 발명의 일 실시예에 따라, 현재 블록의 DC 값은 복수의 참조 샘플 세트에 기초하여 획득될 수도 있다. 예를 들어, 현재 블록의 상측 변과 좌측 변 각각에 대응하는 참조 샘플들에 기초하여 복수의 참조 샘플 세트들이 구성될 수 있다. 이때, 복수의 참조 샘플 세트들 각각이 포함하는 참조 샘플들의 개수는 2의 지수 승 개수일 수 있다. 이 경우, 현재 블록의 DC 값은 복수의 참조 샘플 세트들 중 적어도 둘 이상의 참조 샘플 세트들에 기초하여 획득될 수 있다. 인코더 및 디코더는 복수의 참조 샘플 세트들 중 적어도 둘 이상의 참조 샘플 세트들을 결정할 수 있다. 또한, 인코더 및 디코더는 결정된 참조 샘플 세트 별로, 참조 샘플 세트가 포함하는 참조 샘플들 각각의 샘플 값의 평균을 획득할 수 있다. 또한, 인코더 및 디코더는 참조 샘플 세트 별 평균들 간의 최종 평균에 기초하여 현재 블록의 DC 값을 획득할 수 있다.
구체적인 실시예에 따라, 현재 블록(1401)의 DC 값은 제1 참조 샘플 세트(DC0) 및 제2 참조 샘플 세트(DC1)에 기초하여 획득될 수 있다. 구체적으로, 인코더 및 디코더는 제1 참조 샘플 세트(DC0)에 포함된 참조 샘플 값들 전체의 제1 평균을 획득할 수 있다. 또한, 인코더 및 디코더는 제2 참조 샘플 세트(DC1)에 포함된 참조 샘플 값들 전체의 제2 평균을 획득할 수 있다. 다음으로, 인코더 및 디코더는 제1 평균 및 제2 평균에 기초하여 현재 블록(1401)의 DC 값을 획득할 수 있다. 현재 블록(1401)의 DC 값은 제1 평균과 제2 평균 간의 최종 평균에 기초하여 획득될 수 있다. [수학식 3]은 복수의 참조 샘플 세트에 기초하여 현재 블록의 DC 값이 획득되는 일 실시예를 나타낸다.
[수학식 3]
(Average_DC0+Average_DC1+offset) >> log2(W/H)
[수학식 3]에서, Average_DC0 및 Average_DC1는 각각 제1 평균 및 제2 평균을 나타낸다. 또한, offset은 평균 값의 소수점 이하 부분을 반올림하기 위한 파라미터일 수 있다. [수학식 3]에서 W는 현재 블록의 긴 변의 길이, H는 현재 블록의 짧은 변의 길이를 나타낸다.
도 15 및 도 16은 현재 블록의 높이와 너비가 '4' 및 '16'인 경우, 현재 블록의 DC 값의 획득을 위한 참조 샘플 세트의 일 실시예를 나타내는 도면이다. 도 15를 참조하면, 현재 블록(1501)은 높이 및 너비가 각각 '4' 및 '16'인 직사각형 블록이다. 이 경우, 현재 블록(1501)의 DC 값은 제1 참조 샘플 세트(DC0), 제2 참조 샘플 세트(DC1), 제3 참조 샘플 세트(DC2), 및 제4 참조 샘플 세트(DC3) 중 적어도 하나에 기초하여 획득될 수 있다. 제1 참조 샘플 세트(DC0)는 {L0, L1, L2, L3, 0, 1, 2, 3}을 포함할 수 있다. 제2 참조 샘플 세트(DC1)는 {L0, L1, L2, L3, 4, 5, 6, 7}을 포함할 수 있다. 제3 참조 샘플 세트(DC0)는 {L0, L1, L2, L3, 8, 9, 10, 11}을 포함할 수 있다. 또한, 제4 참조 샘플 세트(DC1)는 {L0, L1, L2, L3, 12, 13, 14, 15}을 포함할 수 있다.
[수학식 4]
(Average_DC0+Average_DC1+Average_DC2+Average_DC3+offset)>>log2(W/H)
인코더 및 디코더가 복수의 참조 샘플 세트에 기초하여 현재 블록의 DC 값을 획득하는 경우, [수학식 4]와 같이 연산될 수 있다. [수학식 4]에서, Average_DC0는 제1 참조 샘플 세트(DC0)에 포함된 참조 샘플 값들의 제1 평균을 나타낸다. Average_DC1는 제2 참조 샘플 세트(DC1)에 포함된 참조 샘플 값들의 제2 평균을 나타낸다. Average_DC2는 제3 참조 샘플 세트(DC2)에 포함된 참조 샘플 값들의 제3 평균을 나타낸다. Average_DC3는 제4 참조 샘플 세트(DC3)에 포함된 참조 샘플 값들의 제4 평균을 나타낸다. offset은 평균 값의 소수점 이하 부분을 반올림하기 위한 파라미터일 수 있다. [수학식 4]에서 W는 긴 변의 길이, H는 짧은 변의 길이를 나타낸다.
추가적인 실시예에 따라, 제1 참조 샘플 세트(DC0)를 구성하는 참조 샘플들 이외의 참조 샘플들로 구성된 제5 참조 샘플 세트(DC4)가 구성될 수도 있다. 도 16을 참조하면, 현재 블록(1601)의 DC 값은 제1 참조 샘플 세트(DC0) 및 제5 참조 샘플 세트(DC4)에 기초하여 획득될 수 있다. 이 경우, 도 14 및 도 15를 통해 설명한 바와 같이, 제1 참조 샘플 세트(DC0)에 포함된 참조 샘플 값들의 제1 평균과 제5 참조 샘플 세트(DC4)에 포함된 참조 샘플 값들의 제5 평균에 기초하여 현재 블록(1701)의 DC 값이 획득될 수 있다. 설명의 편의를 위해, 제1 참조 샘플 세트(DC0)를 예로 들어 설명하였으나, 본 개시가 이에 제한되는 것은 아니다. 예를 들어, 도 15의 제2 참조 샘플 세트(DC1)를 구성하는 참조 샘플들 이외의 참조 샘플들로 구성된 참조 샘플 세트가 구성될 수도 있다.
도 17 및 도 18은 현재 블록의 높이와 너비가 '4' 및 '32'인 경우, 현재 블록의 DC 값의 획득을 위한 참조 샘플 세트의 일 실시예를 나타내는 도면이다. 도 17을 참조하면, 현재 블록(1701)은 높이 및 너비가 각각 '4' 및 '32'인 직사각형 블록이다. 이 경우, 현재 블록(1701)의 DC 값은 제1 참조 샘플 세트(DC0), 제2 참조 샘플 세트(DC1), 제3 참조 샘플 세트(DC2), 제4 참조 샘플 세트(DC3), 제5 참조 샘플 세트(DC4), 제6 참조 샘플 세트(DC5), 제7 참조 샘플 세트(DC6), 및 제8 참조 샘플 세트(DC7) 중 적어도 하나에 기초하여 획득될 수 있다.
추가적인 실시예에 따라, 현재 블록(1801)의 긴 변 측의 참조 샘플들 중에서 제1 참조 샘플 세트(DC0)가 포함하는 참조 샘플들 이외의 참조 샘플들을 포함하는 제9 참조 샘플 세트(DC8)가 구성될 수도 있다. 도 18을 참조하면, 제9 참조 샘플 세트(DC8)는 현재 블록(1701)의 짧은 변 측의 참조 샘플들을 더 포함할 수 있다. 이 경우, 도 14를 통해 설명한 바와 같이, 제1 참조 샘플 세트(DC0)에 포함된 참조 샘플 값들의 제1 평균과 제9 참조 샘플 세트(DC8)에 포함된 참조 샘플 값들의 제9 평균에 기초하여 현재 블록(1801)의 DC 값이 획득될 수 있다.
한편, 본 발명의 일 실시예에 따라, 참조 샘플 세트는 현재 블록의 제1 변과 제2 변 중에서 어느 하나에 대응하는 참조 샘플들로 구성될 수 있다. 즉, 참조 샘플 세트는 현재 블록의 제1 변 및 제2 변 중에서 어느 한 변에 대응하는 참조 샘플들을 포함하지 않을 수 있다. 이때, 참조 샘플 세트가 포함하는 참조 샘플의 개수는 2의 지수 승일 수 있다. 예를 들어, 참조 샘플 세트는 DC 참조 샘플들 중에서 현재 블록의 특정 변 측의 참조 샘플들을 제외한 나머지 변 측의 참조 샘플들을 포함할 수 있다. 특정 변은 현재 블록의 제1 변과 제2 변 중에서 어느 하나일 수 있다.
일 실시예에 따라, 특정 변은 현재 블록의 제1 변과 제2 변 중에서 짧은 변일 수 있다. 이 경우, 참조 샘플 세트는 제1 변과 제2 변 중에서 길이가 더 긴 변에 대응하는 참조 샘플들로 구성될 수 있다. 예를 들어, 현재 블록의 너비가 높이보다 큰 경우, 특정 변은 좌측 변일 수 있다. 또한, 현재 블록의 너비가 높이 보다 작은 경우, 특정 변은 상측 변일 수 있다.
구체적인 실시예에 따라, 인코더 및 디코더는 현재 블록의 제1 변의 길이와 제2 변의 길이를 비교할 수 있다. 비교 결과에 따라 현재 블록의 제1 변이 제2 변 보다 긴 경우, 인코더 및 디코더는 제1 변 측의 참조 샘플들로 구성된 상기 참조 샘플 세트를 획득할 수 있다. 또한, 인코더 및 디코더는 제1 변 측의 참조 샘플들로 구성된 참조 샘플 세트에 기초하여 현재 블록의 DC 값을 획득할 수 있다. 반대로, 제2 변의 길이가 제1 변의 길이보다 긴 경우, 인코더 및 디코더는 제2 변 측의 참조 샘플들로 구성된 참조 샘플 세트를 획득할 수 있다. 이 경우, 인코더 및 디코더는 제2 변 측의 참조 샘플들로 구성된 참조 샘플 세트에 기초하여 현재 블록의 DC 값을 획득할 수 있다.
도 19, 도 20 및 도 21는 현재 블록의 높이와 너비가 서로 다른 경우, 현재 블록의 DC 값의 획득을 위한 참조 샘플 세트의 다른 일 실시예를 나타내는 도면이다. 도 19를 참조하면, 현재 블록(1901)은 높이 및 너비가 각각 '4' 및 '8'인 직사각형 블록이다. 인코더 및 디코더는 짧은 변 측의 참조 샘플들로 구성된 제1 참조 샘플 세트(DC0)를 구성할 수 있다. 또한, 인코더 및 디코더는 현재 블록(1901)의 긴 변 측의 참조 샘플들 중 적어도 일부를 포함하는 참조 샘플 세트를 구성할 수 있다.
도 19에서, 제2 참조 샘플 세트(DC1), 제3 참조 샘플 세트(DC2), 및 제4 참조 샘플 세트(DC3) 각각은 현재 블록(1901)의 긴 변 측의 참조 샘플들 중 적어도 일부로 구성된 참조 샘플들이다. 도 19에서, 제2 참조 샘플 세트(DC1), 제3 참조 샘플 세트(DC2), 및 제4 참조 샘플 세트(DC3)는 각각 4개의 참조 샘플을 포함한다. 그러나 본 개시가 이에 제한되는 것은 아니다. 예를 들어, 현재 블록의 긴 변에 기반한 참조 샘플 세트가 포함하는 참조 샘플의 개수는 긴 변의 길이 이하이면서 2의 지수 승에 해당하는 개수일 수 있다. 즉, 참조 샘플 세트는 2개 또는 8개의 참조 샘플들로 구성될 수도 있다. 일 실시예에 따라, 인코더 및 디코더는 제1 참조 샘플 세트(DC0), 제2 참조 샘플 세트(DC1), 제3 참조 샘플 세트(DC2), 및 제4 참조 샘플 세트(DC3) 중 어느 하나에 기초하여 현재 블록의 DC 값을 획득할 수 있다.
한편, DC 값의 획득에 사용되는 복수의 참조 샘플 세트들의 개수가 2의 지수 승이 아닌 경우, 참조 샘플 세트 별 평균들 간의 최종 평균을 획득하는 과정에서 별도의 나눗셈 연산이 필요할 수 있다. 전술한 바와 같이, 나눗셈 연산으로 인해 인코더 및 디코더의 복잡도 및 연산량이 증가할 수 있다. 이에 따라, 현재 블록의 DC 값이 복수의 참조 샘플 세트에 기초하여 획득되는 경우, 복수의 참조 샘플 세트의 개수는 2의 지수 승 개수일 수 있다.
일 실시예에 따라, 현재 블록의 DC 값은 하나의 단측 참조 샘플 세트 및 기 설정된 개수의 장측 참조 샘플 세트에 기초하여 획득될 수 있다. 본 개시에서, 단측 참조 샘플 세트는 현재 블록의 짧은 변 측의 참조 샘플들 중 적어도 일부로 구성된 참조 샘플 세트를 나타낼 수 있다. 또한, 장측 참조 샘플 세트는 현재 블록의 긴 변 측의 참조 샘플 세트들 중 적어도 일부로 구성된 참조 샘플 세트를 나타낼 수 있다. 장측 참조 샘플 세트의 개수는 현재 블록의 DC 값의 획득에 사용되는 참조 샘플 세트들 전체 개수가 2의 지수 승이 되도록 설정된 개수일 수 있다. 예를 들어, 장측 참조 샘플 세트의 개수는 ((2^n)-1)일 수 있다. 이때, n은 정수일 수 있다.
도 19에서, 현재 블록(1901)의 짧은 변 측의 참조 샘플들만 포함하는 제1 참조 샘플 세트(DC0)가 구성될 수 있다. 또한, 현재 블록(1901)의 긴 변 측의 참조 샘플들 중에서 일부를 포함하는 3개의 장측 참조 샘플 세트가 구성될 수 있다. 예를 들어, 인코더 및 디코더는 제2 참조 샘플 세트(DC1), 제3 참조 샘플 세트(DC2) 및 제4 참조 샘플 세트(DC3)를 구성할 수 있다. 이때, 제2 참조 샘플 세트(DC1), 제3 참조 샘플 세트(DC2) 및 제4 참조 샘플 세트(DC3) 중 어느 둘을 구성하는 참조 샘플 중 일부는 중복될 수 있다. 또한, 복수의 참조 샘플 세트들 각각이 포함하는 참조 샘플의 개수는 서로 다를 수 있다. 예를 들어, DC0는 4개, DC1은 8개, DC2는 4개, DC3는 4개로 구성될 수 있다.
다음으로, 인코더 및 디코더는 제1 참조 샘플 세트(DC0), 제2 참조 샘플 세트(DC1), 제3 참조 샘플 세트(DC2) 및 제4 참조 샘플 세트(DC3) 각각의 참조 샘플 세트 별 평균을 획득할 수 있다. 또한, 인코더 및 디코더는 도 8를 통해 전술한 방법으로 참조 샘플 세트 별 평균들에 대한 최종 평균에 기초하여 현재 블록의 DC 값을 획득할 수 있다. 전술한 방법들은 도 20 및 도 21의 실시예에서도 동일 또는 상응하는 방법으로 적용될 수 있다.
도 20을 참조하면, 현재 블록(2001)은 높이 및 너비가 각각 '4' 및 '16'인 직사각형 블록이다. 이 경우, 현재 블록(2001)의 DC 값은 하나의 단측 참조 샘플 세트인 제1 참조 샘플 세트(DC0), 3개의 장측 참조 샘플 세트인 제2 참조 샘플 세트(DC1), 제3 참조 샘플 세트(DC2), 및 제4 참조 샘플 세트(DC3) 중 적어도 하나에 기초하여 획득될 수 있다.
도 21을 참조하면, 현재 블록(2101)은 높이 및 너비가 각각 '4' 및 '32'인 직사각형 블록이다. 이 경우, 현재 블록(2101)의 DC 값은 하나의 단측 참조 샘플 세트인 제1 참조 샘플 세트(DC0), 3개의 장측 참조 샘플 세트인 제2 참조 샘플 세트(DC1), 제3 참조 샘플 세트(DC2), 및 제4 참조 샘플 세트(DC3) 중 적어도 하나에 기초하여 획득될 수 있다.
본 발명의 일 실시예에 따르면, 참조 샘플 세트는 현재 블록의 짧은 변 및 긴 변 측의 참조 샘플들 전체 중에서, 짧은 변의 샘플 개수만큼 제외된 나머지 참조 샘플들로 구성될 수 있다. 도 22, 도 23 및 도 24는 현재 블록의 높이와 너비가 '4' 및 '16'인 경우, 현재 블록의 DC 값의 획득을 위한 참조 샘플 세트의 다른 일 실시예를 나타내는 도면이다.
도 22에서, 현재 블록(2201)은 높이 및 너비가 각각 '4' 및 '16'인 직사각형 블록이다. 일 실시예에 따라, 인코더 및 디코더는 (16+4-4)개수(즉, 16개)의 참조 샘플들을 포함하는 참조 샘플 세트를 구성할 수 있다. 예를 들어, 인코더 및 디코더는 현재 블록의 짧은 변 측의 참조 샘플들(L0, L1, L2, L3) 및 현재 블록의 긴 변 측의 참조 샘플들 중 일부(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)를 포함하는 제1 참조 샘플 세트(DC0)를 구성할 수 있다. 인코더 및 디코더는 현재 블록의 짧은 변 측의 참조 샘플들(L0, L1, L2, L3) 및 현재 블록(2201)의 긴 변 측의 참조 샘플들 중 일부(4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)를 포함하는 제2 참조 샘플 세트(DC1)를 구성할 수 있다. 그러나 본 개시가 이에 제한되는 것은 아니다.
예를 들어, 참조 샘플 세트는 현재 블록의 긴 변 측의 참조 샘플들(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)로만 구성될 수 있다. 참조 샘플 세트는 현재 블록의 짧은 변 측의 참조 샘플들(L0, L1, L2, L3)을 포함하지 않을 수 있다. 다른 실시예에 따라, 인코더 및 디코더는 참조 샘플들 각각의 샘플 값에 기초하여 참조 샘플 세트를 구성할 수도 있다. 예를 들어, 참조 샘플 세트는 현재 블록의 상측 변 및 좌측 변 각각에 대응하는 참조 샘플들 중에서 샘플 값이 가장 큰 참조 샘플을 포함하지 않을 수 있다. 또한, 참조 샘플 세트는 현재 블록의 상측 변 및 좌측 변 각각에 대응하는 참조 샘플들 중에서 샘플 값이 가장 작은 참조 샘플을 포함하지 않을 수 있다.
추가적인 실시예에 따라, 현재 블록의 상측 변 및 좌측 변 각각에 대응하는 참조 샘플들 중에서, 제1 참조 샘플 세트(DC0)가 포함하는 참조 샘플들 이외의 참조 샘플들을 포함하는 제3 참조 샘플 세트(DC2)가 구성될 수도 있다. 도 23을 참조하면, 제1 참조 샘플 세트(DC0)는 현재 블록(2301)의 긴 변 및 짧은 변 각각에 대응하는 참조 샘플들 중에서 긴 변에 대응하는 참조 샘플들 일부가 제외된 나머지 참조 샘플들로 구성될 수 있다. 이 경우, 상기 제외된 일부의 참조 샘플들(12, 13, 14, 15)을 포함하는 제3 참조 샘플 세트(DC2)가 구성될 수 있다.
추가적으로, 도 24를 참조하면 제3 참조 샘플 세트'(DC2')는 짧은 변 측의 참조 샘플들을 더 포함할 수 있다. 또한, 현재 블록(2401)의 DC 값은 제1 참조 샘플 세트(DC0) 및 제3 참조 샘플 세트(DC2)에 기초하여 획득될 수 있다. 이 경우, 도 14 및 도 15을 통해 설명한 바와 같이, 제1 참조 샘플 세트(DC0)에 포함된 참조 샘플 값들의 제1 평균과 제3 참조 샘플 세트(DC2)에 포함된 참조 샘플 값들의 제3 평균에 기초하여 현재 블록(2401)의 DC 값이 획득될 수 있다.
도 25 및 도 26은 현재 블록의 높이와 너비가 '4' 및 '32'인 경우, 현재 블록의 DC 값의 획득을 위한 참조 샘플 세트의 일 실시예를 나타내는 도면이다. 도 25에서, 현재 블록(2501)은 높이 및 너비가 각각 '4' 및 '32'인 직사각형 블록이다. 도 25 및 도 26의 실시예에는 도 22을 통해 설명한 실시예들이 적용될 수 있다. 예를 들어, 인코더 및 디코더는 (32+4-4)개수(즉, 32개)의 참조 샘플들을 포함하는 참조 샘플 세트를 구성할 수 있다. 구체적으로, 인코더 및 디코더는 현재 블록의 긴 변 및 짧은 변 각각에 대응하는 전체 참조 샘플들 중에서 긴 변의 참조 샘플 일부(28, 29, 30, 31)가 제외된 나머지 참조 샘플들을 포함하는 제1 참조 샘플 세트를 획득할 수 있다.
추가적인 실시예에 따라, 도 26을 참조하면, 제1 참조 샘플 세트(DC0)가 포함하는 참조 샘플들 이외의 참조 샘플들(0, 1, 2, 3)을 포함하는 제3 참조 샘플 세트(DC2)가 구성될 수도 있다. 또한, 현재 블록(2601)의 DC 값은 제1 참조 샘플 세트(DC0) 및 제2 참조 샘플 세트(DC1)에 기초하여 획득될 수 있다.
본 발명의 일 실시예에 따라, 현재 블록의 DC 값은 현재 블록의 짧은 변 측의 참조 샘플들 중 일부 및 현재 블록의 긴 변 측의 참조 샘플들 중 일부를 포함하는 참조 샘플 세트에 기초하여 획득될 수 있다. 인코더 및 디코더는 참조 샘플 세트가 포함하는 단측 참조 샘플들의 개수 및 장측 참조 샘플들의 개수를 각각 결정할 수 있다. 인코더 및 디코더는 참조 샘플 세트가 포함하는 단측 참조 샘플들의 개수와 장측 참조 샘플들의 개수의 합이 2의 지수 승이 되도록 단측 참조 샘플들의 제1 개수와 장측 참조 샘플들의 제2 개수를 결정할 수 있다. 인코더 및 디코더는 결정된 제1 개수 및 제2 개수에 기초하여 2의 지수 승 개수의 참조 샘플들을 포함하는 참조 샘플 세트를 구성할 수 있다.
도 27, 도 28 및 도 29는 본 발명의 일 실시예에 따라, 현재 블록의 짧은 변 측의 참조 샘플들 중 일부 및 현재 블록의 긴 변 측의 참조 샘플들 중 일부를 포함하는 참조 샘플 세트를 나타내는 도면이다. 도 27에서, 현재 블록(2701)은 높이 및 너비가 각각 '4' 및 '8'인 직사각형 블록이다. 일 실시예에 따라, 참조 샘플 세트는 2개의 단측 참조 샘플들 및 6개의 장측 참조 샘플들을 포함할 수 있다. 예를 들어, 단측 참조 샘플들 중 상측에 위치된 2개의 참조 샘플들(L0, L1) 및 장측 참조 샘플들 중 좌측부터 6개의 참조 샘플들(0, 1, 2, 3, 4, 5)을 포함하는 제1 참조 샘플 세트(DC0)가 구성될 수 있다. 또한, 단측 참조 샘플들 중 하측에 위치된 2개의 참조 샘플들(L2, L3) 및 장측 참조 샘플들 중 우측부터 6개의 참조 샘플들(2, 3, 4, 5, 6, 7)을 포함하는 제2 참조 샘플 세트(DC1)가 구성될 수 있다.
도 28에서, 현재 블록(2801)은 높이 및 너비가 각각 '4' 및 '8'인 직사각형 블록이다. 일 실시예에 따라, 참조 샘플 세트는 1개의 단측 참조 샘플들 및 3개의 장측 참조 샘플들을 포함할 수 있다. 예를 들어, 단측 참조 샘플들 중 가장 상측에 위치된 참조 샘플(L0) 및 장측 참조 샘플들 중 좌측부터 3개의 참조 샘플들(0, 1, 2)을 포함하는 제1 참조 샘플 세트(DC0)가 구성될 수 있다. 또한, 단측 참조 샘플들 중 상측부터 두번째에 위치된 참조 샘플(L1) 및 장측 참조 샘플들 중 3개의 참조 샘플들(2, 3, 4)을 포함하는 제2 참조 샘플 세트(DC1)가 구성될 수 있다.
도 29에서, 현재 블록(2901)은 높이 및 너비가 각각 '4' 및 '16'인 직사각형 블록이다. 일 실시예에 따라, 참조 샘플 세트는 1개의 단측 참조 샘플들 및 7개의 장측 참조 샘플들을 포함할 수 있다. 예를 들어, 단측 참조 샘플들 중 가장 상측에 위치된 참조 샘플(L0) 및 장측 참조 샘플들 중 좌측부터 7개의 참조 샘플들(0, 1, 2, 3, 4, 5, 6)을 포함하는 제1 참조 샘플 세트(DC0)가 구성될 수 있다.
한편, 전술한 바와 같이, 현재 블록의 DC 값은 복수의 참조 샘플 세트들 중 적어도 하나에 기초하여 획득될 수 있다. 구체적인 실시예에 따라, 복수의 참조 샘플 세트 각각은 현재 블록의 제1 변 및 제2 변 중에서 어느 한 변에 대응하는 참조 샘플들로 구성될 수 있다. 예를 들어, 제1 참조 샘플 세트는 현재 블록의 제1 변 및 제2 변 중에서 길이가 더 긴 변 측의 참조 샘플들로 구성될 수 있다. 또한, 제2 참조 샘플 세트는 현재 블록의 제1 변 및 제2 변 중에서 길이가 더 짧은 변 측의 참조 샘플들로 구성될 수 있다. 또한, 현재 블록의 DC 값은 제1 참조 샘플 세트 또는 제2 참조 샘플 세트 중 적어도 하나에 기초하여 획득될 수 있다.
예를 들어, 현재 블록의 DC 값은 제1 참조 샘플 세트 및 제2 참조 샘플 세트 모두에 기초하여 획득될 수 있다. 이 경우, 현재 블록의 DC 값은 도 14를 통해 전술한 바와 같이 참조 샘플 세트 별 평균에 기초하여 획득될 수 있다. 구체적으로, 현재 블록의 DC 값은 제1 평균과 제2 평균에 대한 최종 평균에 기초하여 획득될 수 있다. 이때, 제1 평균은 제1 참조 샘플 세트가 포함하는 참조 샘플들의 평균일 수 있다. 또한, 제2 평균은 제2 참조 샘플 세트가 포함하는 참조 샘플들의 평균일 수 있다. 한편, 제2 참조 샘플 세트가 포함하는 참조 샘플들의 개수는 제1 참조 샘플 세트가 포함하는 참조 샘플들의 개수 보다 적을 수 있다. 이 경우, 최종 평균은 긴 변 측의 참조 샘플들의 값들 보다 짧은 변 측의 참조 샘플들의 값들에 더 큰 영향을 받을 수 있다. 따라서, 본 발명의 일 실시예에 따른 인코더 및 디코더는 제1 평균 및 제2 평균 각각에 가중치를 적용하여 최종 평균을 획득할 수 있다.
도 30은 본 발명의 일 실시예에 따라 참조 샘플 세트 별 평균에 가중치가 적용되는 방법을 나타내는 흐름도이다. 단계 S3002에서, 인코더 및 디코더는 현재 블록의 긴 변 대비 짧은 변의 비율에 기초하여 제1 정수값 및 제2 정수값을 획득할 수 있다. 여기에서, 제1 정수값은 현재 블록의 긴 변 측의 참조 샘플들의 샘플 값들의 제1 평균에 적용되는 정수화된 가중치일 수 있다. 또한, 제2 정수값은 현재 블록의 짧은 변 측의 참조 샘플들의 샘플 값들의 제2 평균에 적용되는 정수화된 가중치일 수 있다. 예를 들어, 인코더 및 디코더는 현재 블록의 긴 변 대비 짧은 변의 비율에 기초하여 제1 가중치 및 제2 가중치를 획득할 수 있다. 제1 가중치 및 제2 가중치는 제1 평균 및 제2 평균 각각을 위한 가중치일 수 있다. 다음으로, 인코더 및 디코더는 제1 가중치 및 제2 가중치를 정수화하여 제1 정수값 및 제2 정수값을 획득할 수 있다. 제1 가중치 및 제2 가중치는 아래 [수학식 5]와 같을 수 있다.
[수학식 5]
제1 가중치: 2*W/(H+W) (긴 변)
제2 가중치: 2*H/(H+W) (짧은 변)
구체적인 실시예에 따라, 긴 변(W) 대비 짧은 변(H)의 비율에 따른 가중치들은 아래와 같을 수 있다. 이때, 각각의 가중치들은 부동 소수점 형태의 값로 표현될 수 있다.
1) WxH=1:2
제1 가중치: 1.3333
제2 가중치 : 0.66667
2) WxH=1:4
제1 가중치: 1.5873
제2 가중치: 0.4
3) WxH=1:8
제1 가중치: 1.7921
제2 가중치: 0.22222
4) WxH=1:16
제1 가중치: 1.8382
제2 가중치: 0.11765
상기 현재 블록의 모양에 따른 가중치들은 예시적인 것으로 본 개시가 이에 제한되는 것은 아니다. 또한, 소수점 이하 반올림이 수행되는 자리는 달라질 수 있다. 예를 들어, 소수점 이하 반올림이 수행되는 자리는 정확도 또는 스케일링 수의 크기 중 적어도 하나에 기초하여 결정될 수 있다.
다음으로, 인코더 및 디코더는 기 설정된 지수 값에 기초하여 제1 가중치 및 제2 가중치를 정수화할 수 있다. 인코더 및 디코더는 기 설정된 지수 값을 제1 가중치 및 제2 가중치 각각에 곱하여 제1 정수값 및 제2 정수값을 획득할 수 있다. 기 설정된 지수 값은 2의 지수 승일 수 있다. 예를 들어, 기 설정된 지수 값은 2의 16승일 수 있다. 이하에서는 기 설정된 지수 값이 2의 16승인 경우, 제1 정수값 및 제2 정수값을 획득하는 방법에 대해 설명하도록 한다.
기 설정된 지수 값이 16일때, 긴 변 대비 짧은 변의 비율이 각각 1:2, 1:4, 1:8, 1:16인 경우, 제1 가중치에 기 설정된 지수 값을 곱하면 아래와 같다.
1) WxH=1:2 : 2/3 * 2^16= 43690.6666666667
2) WxH=1:4 : 4/5 * 2^16= 52428.8000000000
3) WxH=1:8 : 8/9 * 2^16= 58254.2222222222
4) WxH=1:16 : 16/17 * 2^16= 61680.9411764706
상기 기 설정된 지수 값이 곱해진 비율 별 제1 가중치들을 소수점을 포함한 실수 값 형태이다. 인코더 및 디코더는 기 설정된 지수 값이 곱해진 제1 가중치를 정수화할 수 있다. 이때, 인코더 및 디코더는 반올림, 올림 및 내림 중 어느 하나를 이용하여 기 설정된 지수 값이 곱해진 제1 가중치를 정수화할 수 있다. 일 실시예에 따라, 제1 가중치 및 제2 가중치에 대해 동일한 방법을 적용할 수도 있고, 복수개의 방법을 적용할 수도 있다. 예를 들어, 제1가중치 값은 반올림을 적용하고 제2 가중치 값은 올림을 적용하는 것도 가능하다.
일 실시예에 따라, 기 설정된 지수 값이 곱해진 제1 가중치에 반올림을 적용하는 경우, 인코더 및 디코더는 아래와 같은 제1 정수값들을 획득할 수 있다.
1) WxH=1:2 : 43690.6666666667 은 43691 이 된다.
2) WxH=1:4 : 52428.8000000000 은 52429 가 된다.
3) WxH=1:8 : 58254.2222222222 은 58254 가 된다.
4) WxH=1:16 : 61680.9411764706 은 61681 이 된다.
다른 일 실시예에 따라, 기 설정된 지수 값이 곱해진 제1 가중치에 올림을 적용하는 경우, 인코더 및 디코더는 아래와 같은 제1 정수값들을 획득할 수 있다.
1) WxH=1:2 : 43690.6666666667 은 43691 이 된다.
2) WxH=1:4 : 52428.8000000000 은 52429 가 된다.
3) WxH=1:8 : 58254.2222222222 은 58255 가 된다.
4) WxH=1:16 : 61680.9411764706 은 61681 이 된다.
또 다른 일 실시예에 따라, 기 설정된 지수 값이 곱해진 제1 가중치에 버림을 적용하는 경우, 인코더 및 디코더는 아래와 같은 제1 정수값들을 획득할 수 있다.
1) WxH=1:2 : 43690.6666666667 은 43690 이 된다.
2) WxH=1:4 : 52428.8000000000 은 52428 가 된다.
3) WxH=1:8 : 58254.2222222222 은 58254 가 된다.
4) WxH=1:16 : 61680.9411764706 은 61680 이 된다.
단계 S3004에서, 인코더 및 디코더는 제1 평균 및 제2 평균을 획득할 수 있다. 이때, 제1 평균 및 제2 평균은 반올림된 값일 수 있다. 단계 S3006에서, 인코더 및 디코더는 제1 평균, 제2 평균, 제1 정수값 및 제2 정수값에 기초하여 현재 블록의 DC 값을 획득할 수 있다. 예를 들어, 인코더 및 디코더는 제1 평균에 제1 정수값을 적용하여 제1 중간 값을 획득할 수 있다. 또한, 인코더 및 디코더는 제2 평균에 제2 정수값을 적용하여 제2 중간 값을 획득할 수 있다. 다음으로, 인코더 및 디코더는 제1 중간 값 및 제2 중간 값의 평균에 기초하여 현재 블록의 DC 값을 획득할 수 있다. 또한, 인코더 및 디코더는 획득된 DC 값에 기초하여 현재 블록을 예측할 수 있다.
한편, 현재 블록의 너비 및 높이 중 적어도 하나는 2의 지수 승이 아닐 수 있다. 이 경우, 전술한 실시예들과 마찬가지로, 현재 블록의 상측 변과 좌측 변 각각에 대응하는 참조 샘플들의 개수는 2의 지수 승 개수가 아닐 수 있다. 도 31은 본 발명의 일 실시예에 따라 현재 블록의 제1 변 및 제2 변 중 어느 한 변의 길이가 2의 지수 승이 아닌 경우, DC 값을 획득되는 방법을 나타내는 도면이다. 도 31에서, 현재 블록(3101)은 높이 및 너비가 각각 '4' 및 '24'인 직사각형 블록이다. 또한, 현재 블록(3101)의 긴 변 대비 짧은 변의 비율은 '6'일 수 있다. 이 경우, 현재 블록(3101)의 DC 값은 도 30을 통해 전술한 방법을 사용하여 획득될 수 있다.
예를 들어, 인코더 및 디코더는 현재 블록(3101)의 긴 변 측의 참조 샘플 값들의 제1 평균을 획득할 수 있다. 인코더 및 디코더는 현재 블록(3101)의 짧은 변 측의 참조 샘플 값들의 제2 평균을 획득할 수 있다. 제1 평균 및 제2 평균 각각을 위한 제2 가중치 및 제1 가중치는 짧은 변의 길이 및 긴 변의 길이에 기초하여 획득될 수 있다. 인코더 및 디코더는 전술한 기 설정된 지수 값에 기초하여 제1 가중치 및 제2 가중치를 정규화할 수 있다. 또한, 인코더 및 디코더는 제1 가중치 및 제2 가중치를 정규화하여 제1 정수값 "G 제2 정수값을 획득할 수 있다. 또한, 인코더 및 디코더는 제1 평균 및 제2 평균 각각에 제1 정수값 및 제2 정수값을 적용하여 현재 블록의 DC 값을 획득할 수 있다.
전술한 현재 블록의 DC 값을 획득하는 방법들은 인코더 및 디코더에서 사용될 수 있다. 또한, 인코더는 DC 값을 구하는 단계에서 나눗셈 연산 없이 덧셈과 시프트 연산을 이용하여 DC 값을 획득할 수 있다. 디코더는 비트스트림으로부터 해당 블록의 예측 모드를 획득할 수 있다. 또한, 디코더는 현재 블록의 예측 모드가 DC 모드인 경우, 나눗셈 연산 없이 덧셈과 시프트 연산을 이용하여 DC 값을 획득할 수 있다.
한편, 전술한 바와 같이, 현재 유닛은 해당 이미지 영역에 대응하는 루마 성분과 크로마 성분을 모두 포함할 수 있다. 이하에서는, 본 발명의 일 실시예에 따라 현재 유닛의 크로마 블록이 예측되는 방법에 대해 도 32 내지 도 41를 통해 설명하도록 한다. 도 32는 현재 유닛의 루마 블록과 크로마 블록의 일 실시예를 나타낸다. 본 발명의 일 실시예에 따라, 현재 유닛의 특정 성분에 대응하는 예측 블록은 현재 유닛의 다른 성분의 복원된 샘플 값을 이용하여 획득될 수 있다. 이러한 방법은 크로스-콤포넌트 선형 모델(Cross-component Linear Model, CCLM) 방법으로 지칭될 수 있다. 이를 통해, 본 개시에 따른 인코더 및 디코더는 비디오 신호의 압축 성능을 향상시킬 수 있다.
예를 들어, 현재 유닛은 제1 성분과 제2 성분을 포함할 수 있다. 이 경우, 인코더 및 디코더는 제1 성분의 복원된 샘플 값에 기초하여 제2 성분에 대응하는 예측 블록을 획득할 수 있다. 일 실시예에 따라, 인코더 및 디코더는 현재 유닛의 제1 성분과 제2 성분 간의 관계를 나타내는 관계 모델을 획득할 수 있다. 예를 들어, 관계 모델은 수학적 관계식일 수 있다. 또한, 인코더 및 디코더는 획득된 관계 모델에 기초하여 제1 성분의 복원된 샘플 값으로부터 제2 성분에 대응하는 예측 블록을 획득할 수 있다.
본 발명의 일 실시예에 따라, 제1 성분과 제2 성분 간의 관계를 나타내는 관계 모델은 현재 유닛의 참조 샘플들에 기초하여 획득될 수 있다. 예를 들어, 현재 유닛은 제1 성분에 대응하는 제1 블록과 제2 성분에 대응하는 제2 블록을 포함할 수 있다. 도 32와 같이, 제1 블록과 제2 블록의 크기는 서로 다를 수 있다. 또한, 인코더 및 디코더는 제1 블록 주변의 제1 참조 샘플들과 제2 블록 주변의 제2 참조 샘플들에 기초하여 제1 성분과 제2 성분 간의 관계를 나타내는 관계 모델을 획득할 수 있다. 또한, 제2 블록은 제1 블록 및 획득된 관계 모델을 이용하여 예측될 수 있다. 일 실시예에 따라, 제1 성분은 루마 성분 및 크로마 성분들(즉, Cb 및 Cr) 중 어느 하나일 수 있다. 또한, 제2 성분은 루마 성분 및 크로마 성분들 중 제1 성분과 다른 어느 하나일 수 있다. 예를 들어, 제1 성분은 루마 성분을 나타낼 수 있다. 또한, 제2 성분은 크로마 성분들 중 어느 하나를 나타낼 수 있다. 또한, 인코더 및 디코더는 둘 이상의 성분의 복원된 샘플 값에 기초하여 다른 하나의 성분을 예측할 수도 있다. 예를 들어, 인코더 및 디코더는 크로마 인트라 예측(Chroma intra prediction)에 전술한 방법을 사용할 수도 있다.
이하에서는, CCLM 방법을 사용하여 현재 유닛의 크로마 블록을 예측하는 방법에 대해 설명하도록 한다. 일 실시예에 따라, CCLM 방법에서 사용되는 관계 모델은 [수학식 6]과 같이 선형 모델로 표현될 수 있다. [수학식 6]에서, predC(i, j)은 크로마 블록의 (i, j) 위치의 예측 샘플 값을 나타낸다. 또한, recL(I, j)은 현재 유닛의 루마 블록의 (i, j) 위치의 복원된 샘플 값을 나타낸다.
[수학식 6]
Figure PCTKR2019005750-appb-img-000001
이때, 루마 블록이 포함하는 샘플 개수 보다 크로마 블록이 포함하는 샘플 개수가 작을 수 있다. 예를 들어, 인코더 및 디코더에 의해 처리되는 비디오 신호의 YCbCr 샘플링 비율이 4:2:0 일 수 있다. 이 경우, 크로마 블록의 예측 블록은 하향 샘플링된 루마 샘플 값들에 기초하여 획득될 수 있다. 또한, 파라미터 α 와 β는 루마 블록 주변의 루마 참조 샘플들과 크로마 블록 주변의 크로마 참조 샘플들 간의 관계에 기초하여 획득될 수 있다.
[수학식 7]
Figure PCTKR2019005750-appb-img-000002
[수학식 8]
Figure PCTKR2019005750-appb-img-000003
[수학식 7]에서, L(n)은 n번째 루마 참조 샘플을 나타내고, C(n)은 n번째 크로마 참조 샘플을 나타낸다. 또한, 루마 참조 샘플의 개수가 크로마 참조 샘플의 개수보다 많은 경우, 다운 샘플링된 루마 참조 샘플이 사용될 수도 있다. [수학식 8]에서, N은 크로마 참조 샘플의 개수를 나타낼 수 있다. 예를 들어, C(n)은 크로마 블록의 상측 및 좌측의 크로마 참조 샘플들 중 n번째 크로마 참조 샘플일 수 있다.
본 발명의 일 실시예에 따라, 관계 모델의 획득에 사용되는 복수의 참조 샘플들을 포함하는 모델링 그룹은 다양한 방법으로 구성될 수 있다. 모델링 그룹은 현재 블록의 참조 샘플들 중에서 관계 모델의 획득에 사용되는 복수의 참조 샘플들을 포함할 수 있다. 또한, 모델링 그룹은 루마 참조 샘플들을 포함하는 루마 모델링 그룹 및 크로마 참조 샘플들을 포함하는 크로마 모델링 그룹을 포함할 수 있다. 예를 들어, 현재 유닛의 크로마 성분은 루마 성분이 예측된 방향과 유사한 방향으로 예측될 확률이 높을 수 있다. 이에 따라, 모델링 그룹은 루마 블록의 예측 모드에 기초하여 구성될 수 있다. 루마 블록의 예측 모드는 루마 성분의 예측에 사용된 예측 모드일 수 있다.
일 실시예에 따라, 루마 성분의 예측 모드가 각도 모드가 아닌 경우, 도 35, 도 36 또는 도 38에 도시된 위치의 참조 샘플들이 관계 모델의 획득에 사용될 수 있다. 예를 들어, 각도 모드가 아닌 예측 모드는 평면 모드, DC 모드 중 어느 하나일 수 있다. 또한, 루마 성분의 예측 모드가 대각 모드 또는 대각 모드 주변의 각도 모드인 경우에도, 도 35, 도 36 또는 도 38에 도시된 위치의 참조 샘플들이 관계 모델의 획득에 사용될 수 있다.
다른 일 실시예에 따라, 루마 블록의 예측 모드가 수평 모드 또는 수평 모드 주변의 각도 모드인 경우 도 37에 도시된 위치의 참조 샘플들이 관계 모델의 획득에 사용될 수 있다. 또 다른 일 실시예에 따라, 루마 블록의 예측 모드가 수직 모드 또는 수직 모드 주변의 각도 모드인 경우 도 39에 도시된 위치의 참조 샘플들이 관계 모델의 획득에 사용될 수 있다.
한편, 인코더는 전술한 모델링 그룹이 구성되는 방법을 시그널링할 수 있다. 이하에서는, 모델링 그룹을 구성하는 방법이 시그널링되는 방법에 대해 설명하도록 한다. 본 발명의 일 실시예에 따라, 모델링 그룹이 구성되는 방법은 루마 예측 모드에 기초하여 시그널링될 수 있다. 일 실시예에 따라, 모델링 그룹을 구성하는 방법은 제1 구성 방법, 제2 구성 방법 및 제3 구성 방법을 포함할 수 있다. 이 경우, 제1 구성 방법, 제2 구성 방법 및 제3 구성 방법 각각은 제1 시그널링, 제2 시그널링 및 제3 시그널링을 통해 시그널링될 수 있다. 이때, 각각의 시그널링 방법들은 루마 블록의 예측 모드에 기초하여 시그널링될 수 있다.
일 실시예에 따라, 모델링 그룹이 구성되는 방법은 가변 길이 비트로 시그널링될 수 있다. 예를 들어, 제1 구성 방법, 제2 구성 방법 및 제3 구성 방법은 각각 0, 10, 11(또는 1, 01, 00)과 같은 비트를 통해 시그널링될 수 있다. 도 35 내지 도 36 또는 도 38에 도시된 모델링 그룹 구성 방법을 제1 구성 방법, 도 37에 도시된 모델링 그룹 구성 방법을 제2 구성 방법, 도 39에 도시된 모델링 그룹 구성 방법을 제3 구성 방법이라고 할 수 있다. 이때, 루마 성분 예측 모드에 기초하여 가장 적은 비트로 시그널링되는 모델링 그룹 구성 방법이 결정될 수 있다. 예를 들어, 루마 블록의 예측 모드가 수평 모드인 경우, 인코더는 제2 구성 방법을 가장 적은 개수의 비트로 시그널링할 수 있다. 또한, 루마 블록의 예측 모드가 수직 모드인 경우, 인코더는 제3 구성 방법은 가장 적은 개수의 비트로 시그널링 할 수 있다.
한편, 픽쳐(타일 또는 슬라이스) 내에서 루마 블록과 크로마 블록은 서로 독립적인 방법으로 분할될 수 있다. 이에 따라, 크로마 블록에 대응하는 루마 블록의 예측 모드는 복수개일 수 있다. 이 경우, 인코더 및 디코더는 복수의 예측 모드들 중 어느 하나인 대표 예측 모드를 결정할 수 있다. 이와 관련하여서는 도 33를 참조하여 후술하도록 한다. 또한, 현재 유닛의 크로마 블록에 대응하는 루마 블록의 예측 모드가 복수인 경우 복수의 루마 예측 모드 각각에 대응하는 서브-블록마다 다른 위치의 참조 샘플이 사용될 수 있다.
이하, 본 발명의 일 실시예에 따라 모델링 그룹이 구성되는 방법에 대해 도 33 내지 도 39을 참조하여 구체적으로 설명하도록 한다. 도 33은 루마 블록과 크로마 블록이 서로 다른 형태로 분할되는 실시예를 나타내는 도면이다. 현재 유닛은 I-픽쳐(타일/ 슬라이스)에 포함될 수 있다. 또한, 현재 유닛의 YCbCr의 샘플링 비율은 4:2:0일 수 있다.
본 발명의 일 실시예에 따라, 루마 블록과 크로마 블록이 분할된 구조에 따라 모델링 그룹을 구성하는 방법이 달라질 수 있다. 현재 유닛의 루마 블록과 크로마 블록이 싱글 트리(Single tree) 방법에 따라 분할되는 경우, 현재 유닛의 크로마 블록과 루마 블록은 1:1 대응될 수 있다. 싱글 트리 방법은 현재 유닛의 루마 블록과 크로마 블록이 동일한 방법으로 분할되는 방법을 나타낼 수 있다. 이때, 모델링 그룹은 현재 유닛의 루마 블록의 인트라 예측 모드에 기초하여 구성될 수 있다.
반면, 현재 유닛의 루마 블록과 크로마 블록이 분리 트리 방법에 따라 분할되는 경우, 현재 유닛의 크로마 블록과 루마 블록은 도 33과 같이 서로 다른 구조로 분할될 수 있다. 분리 트리 방법은 현재 유닛의 루마 블록과 크로마 블록이 서로 다른 구조로 분할되는 방법을 나타낼 수 있다. 이 경우, 현재 유닛의 크로마 블록과 루마 블록은 일대일 대응되기 어려울 수 있다. 도 33(b)에서 좌측의 크로마 블록(3301)과 크로마 블록(3301)에 대응되는 루마 블록(3302)은 서로 다른 방법으로 분할될 수 있다. 이에 따라, 루마 블록의 대표 예측 모드를 결정하는 방법이 필요할 수 있다.
일 실시예에 따라, 특정 위치를 포함하는 루마 서브-블록 각각에 대응하는 인트라 예측 모드 정보에 기초하여 모델링 그룹을 구성하는 방법이 결정될 수 있다. 예를 들어, 5개의 기 설정된 위치는 상좌(Top-Left, TL), 상우(Top-Right, RT), 중심(Center-Right, CR), 좌하(BL), 우하(Below-Right, BR)일 수 있다. 인코더 및 디코더는 기 설정된 위치들 각각을 포함하는 루마 서브-블록들의 인트라 예측 모드들 중에서 루마 블록의 대표 예측 모드를 결정할 수 있다. 예를 들어, 인코더 및 디코더는 기 설정된 위치를 포함하는 루마 서브-블록들의 인트라 예측 모드들 중에서 기 설정된 순서에 따라 가장 우선순위에 있는 각도 모드를 대표 예측 모드로 사용할 수 있다.
다른 일 실시예에 따라, 기 설정된 위치를 포함하는 루마 서브-블록의 인트라 예측 모드를 대표 예측 모드로 사용할 수 있다. 예를 들어, 기 설정된 위치는 전술한 5개의 기 설정된 위치 중 어느 하나일 수 있다. 예를 들어, 기 설정된 위치는 BR일 수 있다. BR은 참조 샘플들로부터 가장 먼 위치일 수 있다.
또 다른 일 실시예에 따라, 적어도 둘 이상의 기 설정된 위치 각각을 포함하는 루마 서브-블록들의 인트라 예측 모드에 기초하여 대표 예측 모드가 획득될 수 있다. 예를 들어, 인코더 및 디코더는 두 개의 기 설정된 위치 각각에 대응하는 제1 인트라 예측 모드 및 제2 인트라 예측 모드 각각의 인덱스의 평균에 기초하여 대표 예측 모드를 획득할 수 있다.
또 다른 일 실시예에 따라, 도 33(a)의 5개의 기 설정된 위치 각각에 대응하는 인트라 예측 모드들의 빈도수에 기초하여 대표 예측 모드가 획득될 수 있다. 예를 들어, 인코더 및 디코더는 TL, TR, CR, BL, BR 각각에 대응하는 인트라 예측 모드들 중에서 인트라 예측 모드 별 빈도수를 획득할 수 있다. 또한, 인코더 및 디코더는 인트라 예측 모드 별 빈도수에 기초하여 빈도수가 높은 인트라 예측 모드를 대표 예측 모드로 사용할 수 있다.
추가적인 실시예에 따라, 인코더 및 디코더는 인트라 예측 모드들을 그룹화하여 예측 모드 그룹 별 빈도수를 획득할 수 있다. 도 34는 본 발명의 일 실시예에 따라 인트라 예측 모드들을 영역 별로 분류한 도면이다. 도 34는 각도 모드들을 3개의 예측 모드 그룹들(M0, M1, M2)로 그룹화한 일 실시예를 나타낸 도면이다. 그러나 본 개시가 이에 제한되는 것은 아니며, 인코더 및 디코더는 각도 모드들의 각도에 따라 3개 이하 또는 3개 이상의 예측 모드 그룹으로 그룹화할 수도 있다.
예를 들어, 5개의 기 설정된 위치 각각에 대응하는 인트라 예측 모드들 중에서 제1 예측 모드 그룹(M0)에 속한 인트라 예측 모드가 가장 많을 수 있다. 이 경우, 인코더 및 디코더는 제1 예측 모드 그룹(M0)에 속한 인트라 예측 모드들 중 어느 하나를 대표 예측 모드로 사용할 수 있다.
도 35는 본 발명의 일 실시예에 따라 현재 유닛의 루마 블록의 대표 예측 모드가 각도 모드가 아닌 경우의 모델링 그룹을 나타내는 도면이다. 일 실시예에 따라, 현재 유닛의 루마 블록의 대표 예측 모드가 각도 모드가 아닌 경우, 인코더 및 디코더는 크로마 블록의 좌측 변 및 상측 변 각각에 대응하는 참조 샘플들을 사용하여 루마 블록과 크로마 블록 간의 관계 모델을 획득할 수 있다.
도 36은 본 발명의 다른 일 실시예에 따른 모델링 그룹을 나타내는 도면이다. 일 실시예에 따라, 현재 유닛의 루마 블록의 대표 예측 모드가 무방향성 모드인 경우 도 36와 같이 확장된 모델링 그룹을 사용할 수 있다. 또는 루마 서브-블록 마다 서로 다른 위치의 참조 샘플들을 이용하여 관계 모델을 획득하려는 경우, 도 36과 같이 확장된 모델링 그룹이 사용될 수 있다. 도 36의 모델링 그룹을 통해, 인코더 및 디코더는 도 35에서 나타낸 모델링 그룹에 비해 더 넓은 범위의 참조 샘플들을 사용하여 제1 성분과 제2 성분 간의 관계 모델을 획득할 수 있다.
도 37, 도 38, 및 도 39는 본 발명의 또 다른 일 실시예에 따른 모델링 그룹을 나타내는 도면이다. 도 37은 현재 유닛의 루마 블록의 대표 예측 모드가 도 34의 제1 예측 모드 그룹(M0)에 속하는 경우, 현재 유닛의 제1 성분과 제2 성분의 관계 모델에 사용되는 모델링 그룹을 나타낼 수 있다. 제1 예측 모드 그룹(M0)에 속하는 인트라 예측 모드들은 현재 블록의 좌측 경계의 참조 샘플들을 사용하여 예측될 수 있다. 따라서, 관계 모델은 도 35의 모델링 그룹 대비 현재 블록의 좌측 경계에 인접한 라인 상의 참조 샘플들을 더 포함하는 제1 모델링 그룹에 기초하여 획득될 수 있다.
도 38은 현재 유닛의 루마 블록의 대표 예측 모드가 도 34의 제2 예측 모드 그룹(M1)에 속하는 경우, 현재 유닛의 제1 성분과 제2 성분의 관계 모델에 사용되는 모델링 그룹을 나타낼 수 있다. 루마 블록의 인트라 예측 모드가 제2 예측 모드 그룹(M1)에 속하는 경우, 현재 블록의 샘플들의 값은 현재 블록의 상좌측의 샘플들의 값과 유사할 수 있다. 따라서, 관계 모델은 도 35의 모델링 그룹 대비 현재 블록의 상좌측(upper-left)에 위치된 샘플을 더 포함하는 제2 모델링 그룹에 기초하여 획득될 수 있다. 크로마 참조 샘플들 중에서, 상좌 샘플의 위치는 서브 샘플링 방법에 따라 달라질 수 있다.
도 39는 현재 유닛의 루마 블록의 대표 예측 모드가 도 34의 제3 예측 모드 그룹(M2)에 속하는 경우, 현재 유닛의 제1 성분과 제2 성분의 관계 모델에 사용되는 모델링 그룹을 나타낼 수 있다. 제3 예측 모드 그룹(M2)에 속하는 인트라 예측 모드들은 현재 블록의 상측 경계의 참조 샘플들을 사용하여 예측될 수 있다. 따라서, 관계 모델은 도 35의 모델링 그룹 대비 현재 블록의 상측 경계에 인접한 라인 상의 참조 샘플들을 더 포함하는 제3 모델링 그룹에 기초하여 획득될 수 있다.
도 40은 본 발명의 일 실시예에 따라, 복수의 관계 모델에 기초하여 크로마 블록을 복원하는 방법을 나타내는 도면이다. 전술한 바와 같이, 현재 유닛이 분리 트리 방법으로 분할되는 경우, 크로마 블록에 대응하는 루마 블록의 예측 모드는 복수일 수 있다. 이 경우, CCLM 방법은 루마 블록의 예측 모드가 동일한 영역들로 분할하여 적용될 수 있다.
도 40을 참조하면, 현재 유닛은 제1 영역 및 제2 영역으로 분할될 수 있다. 일 실시예에 따라, 현재 유닛은 루마 블록의 예측 모드에 기초하여 제1 영역 및 제2 영역으로 분할될 수 있다. 또한, 루마 블록과 크로마 블록 간의 관계 모델은 제1 영역 및 제2 영역 각각에 대해 별도로 획득될 수 있다. 예를 들어, 제1 영역에 대응하는 제1 관계 모델 및 제2 영역에 대응하는 제2 관계 모델은 서로 독립적일 수 있다. 또한, 인코더 및 디코더는 제1 관계 모델 및 제2 관계 모델을 서로 다른 방법으로 획득할 수 있다. 예를 들어, 인코더 및 디코더는 제1 영역의 예측 모드에 기초하여 제1 관계 모델을 획득할 수 있다. 또한, 인코더 및 디코더는 제2 영역의 예측 모드에 기초하여 제2 관계 모델을 획득할 수 있다. 다음으로, 인코더 및 디코더는 크로마 블록에서 제1 영역에 대응하는 부분의 샘플들을 제1 관계 모델에 기초하여 복원할 수 있다. 또한, 인코더 및 디코더는 크로마 블록에서 제2 영역에 대응하는 부분의 샘플들을 제2 관계 모델에 기초하여 복원할 수 있다.
일 실시예에 따라, 현재 유닛에서 샘플들의 위치에 따라 서로 다른 복수의 관계 모델들이 사용될 수도 있다. 예를 들어, 기준 대각선 상측에 위치된 샘플들은 상측 관계 모델을 사용하여 복원될 수 있다. 이때, 기준 대각선은 현재 유닛의 좌상단 샘플의 위치와 우하단 샘플의 위치를 연결하는 대각선을 나타낼 수 있다. 또한, 상측 관계 모델은 현재 유닛의 상측에 위치된 참조 샘플들에 기초하여 획득된 모델일 수 있다. 여기에서, 현재 유닛의 상측에 위치된 참조 샘플들은 현재 유닛의 크로마 블록 및 루마 블록 각각의 상측에 위치된 참조 샘플들을 나타낼 수 있다. 기준 대각선 하측에 위치된 샘플들은 좌측 관계 모델을 사용하여 복원될 수 있다. 이때, 좌측 관계 모델은 현재 유닛의 좌측 참조 샘플들에 기초하여 획득된 모델일 수 있다. 여기에서, 현재 유닛의 좌측 참조 샘플들은 현재 유닛의 크로마 블록 및 루마 블록 각각의 좌측 참조 샘플들을 나타낼 수 있다.
도 41은 크로마 블록이 복수의 관계 모델에 기초하여 복원되는 방법의 구체적인 실시예를 나타내는 도면이다. 도 41을 참조하면, 현재 유닛은 제1 영역 및 제2 영역으로 분할될 수 있다. 이때, 제1 영역을 위한 제1 관계 모델은 도 41(b)와 같이 구성된 모델링 그룹에 기초하여 획득될 수 있다. 또한, 제2 영역을 위한 제2 관계 모델은 도 41(c)와 같이 구성된 모델링 그룹에 기초하여 획득될 수 있다.
예를 들어, 인코더 및 디코더는 현재 유닛의 상측에 위치된 참조 샘플들에 기초하여 제1 관계 모델을 획득할 수 있다. 또한, 인코더 및 디코더는 현재 유닛의 좌측에 위치된 참조 샘플들에 기초하여 제2 관계 모델을 획득할 수 있다. 다음으로, 인코더 및 디코더는 크로마 블록에서 제1 영역에 대응하는 부분의 샘플들을 제1 관계 모델에 기초하여 복원할 수 있다. 또한, 인코더 및 디코더는 크로마 블록에서 제2 영역에 대응하는 부분의 샘플들을 제2 관계 모델에 기초하여 복원할 수 있다.
한편, 전술한 바와 같이, 현재 블록의 인트라 예측을 위해 복수의 참조 라인들 상의 샘플들이 사용될 수 있다. 도 42는 현재 블록의 예측 모드가 DC 모드인 경우, 참조 샘플들의 일 실시예를 나타내는 도면이다. 도 42를 참조하면, 현재 블록은 4X4 크기의 정사각형 블록이다. 현재 블록의 예측 모드가 DC 모드인 경우, 인코더 및 디코더는 복수의 참조 라인들(refIdx_0, refIdx_1, refIdx_3) 중 어느 하나의 라인 상의 DC 참조 샘플들에 기초하여 현재 블록의 DC 값을 획득할 수 있다.
일 실시예에 따라, 인코더는 복수의 참조 라인들 중 어느 하나를 지시하는 참조 라인 인덱스를 시그널링할 수 있다. 디코더는 복수의 참조 라인들 중 어느 하나를 지시하는 참조 라인 인덱스를 획득할 수 있다. 구체적으로, 디코더는 비트스트림을 파싱하여 intra_luma_ref_Idx[x0][y0]를 획득할 수 있다. 또한, 디코더는 intra_luma_ref_Idx[x0][y0]로부터 참조 라인 인덱스 (IntraLumaRefLineIdx[x0][y0])를 획득할 수 있다. 예를 들어, 참조 라인 인덱스가 '0'인 경우, 참조 라인 인덱스는 현재 블록의 경계에 인접한 참조 라인을 지시할 수 있다. 또한, 참조 라인 인덱스가 '1'인 경우, 참조 라인 인덱스는 현재 블록의 경계로부터 한 개의 샘플만큼 이격된 참조 라인을 지시할 수 있다. 또한, 참조 라인 인덱스가 '3'인 경우, 참조 라인 인덱스는 현재 블록의 경계로부터 세 개의 샘플만큼 이격된 참조 라인을 지시할 수 있다.
일 실시예에 따라, 참조 라인 인덱스가 'refIdx'인 경우, 현재 블록의 DC 값은 참조 샘플들의 위치가 x=-1-refIdx 이면서, y=0..nTbH-1인 좌변 측의 참조 샘플들 및 x=0..nTbW-1 이면서, y=-1-refIdx인 상변 측의 참조 샘플들에 기초하여 획득될 수 있다. 이때, nTbW 및 nTbH는 각각 현재 블록의 너비 및 높이를 나타낼 수 있다.
도 43 및 도 44는 현재 블록이 직사각형 블록인 경우, DC 값 획득에 사용되는 참조 샘플들의 일 실시예를 나타내는 도면이다. 현재 블록의 높이와 너비가 서로 다른 경우, 현재 블록의 DC 값은 전술한 도 8 내지 도 31을 통해 설명된 방법들로 획득될 수 있다. 예를 들어, 도 43에 도시된 바와 같이, 현재 블록의 좌변 보다 상변의 길이가 긴 경우, 현재 블록의 DC 값은 상변 측의 참조 샘플들로 구성된 참조 샘플 세트에 기초하여 획득될 수 있다. 참조 라인 인덱스가 'refIdx'인 경우, 현재 블록의 DC 값은 참조 샘플들의 위치가 x=0..nTbW-1 이면서, y=-1-refIdx인 상변 측의 참조 샘플들에 기초하여 획득될 수 있다.
도 44에 도시된 바와 같이, 현재 블록의 상변 보다 좌변의 길이가 긴 경우, 현재 블록의 DC 값은 좌변 측의 참조 샘플들로 구성된 참조 샘플 세트에 기초하여 획득될 수 있다. 참조 라인 인덱스가 'refIdx'인 경우, 현재 블록의 DC 값은 참조 샘플들의 위치가 x==-1-refIdx 이면서, y=0..nTbH-1인 좌변 측의 참조 샘플들에 기초하여 획득될 수 있다.
상술한 본 발명의 실시예들은 다양한 수단을 통해 구현될 수 있다. 예를 들어, 본 발명의 실시예들은 하드웨어, 펌웨어(firmware), 소프트웨어 또는 그것들의 결합 등에 의해 구현될 수 있다.
하드웨어에 의한 구현의 경우, 본 발명의 실시예들에 따른 방법은 하나 또는 그 이상의 ASICs(Application Specific Integrated Circuits), DSPs(Digital Signal Processors), DSPDs(Digital Signal Processing Devices), PLDs(Programmable Logic Devices), FPGAs(Field Programmable Gate Arrays), 프로세서, 컨트롤러, 마이크로 컨트롤러, 마이크로 프로세서 등에 의해 구현될 수 있다.
펌웨어나 소프트웨어에 의한 구현의 경우, 본 발명의 실시예들에 따른 방법은 이상에서 설명된 기능 또는 동작들을 수행하는 모듈, 절차 또는 함수 등의 형태로 구현될 수 있다. 소프트웨어 코드는 메모리에 저장되어 프로세서에 의해 구동될 수 있다. 상기 메모리는 프로세서의 내부 또는 외부에 위치할 수 있으며, 이미 공지된 다양한 수단에 의해 프로세서와 데이터를 주고받을 수 있다.
일부 실시예는 컴퓨터에 의해 실행되는 프로그램 모듈과 같은 컴퓨터에 의해 실행가능한 명령어를 포함하는 기록 매체의 형태로도 구현될 수 있다. 컴퓨터 판독 가능 매체는 컴퓨터에 의해 액세스될 수 있는 임의의 가용 매체일 수 있고, 휘발성 및 비휘발성 매체, 분리형 및 비분리형 매체를 모두 포함한다. 또한, 컴퓨터 판독 가능 매체는 컴퓨터 저장 매체 및 통신 매체를 모두 포함할 수 있다. 컴퓨터 저장 매체는 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보의 저장을 위한 임의의 방법 또는 기술로 구현된 휘발성 및 비휘발성, 분리형 및 비분리형 매체를 모두 포함한다. 통신 매체는 전형적으로 컴퓨터 판독가능 명령어, 데이터 구조 또는 프로그램 모듈과 같은 변조된 데이터 신호의 기타 데이터, 또는 기타 전송 메커니즘을 포함하며, 임의의 정보 전달 매체를 포함한다.
전술한 본 발명의 설명은 예시를 위한 것이며, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적인 것이 아는 것으로 해석해야 한다. 예를 들어, 단일형으로 설명되어 있는 각 구성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 구성 요소들도 결합된 형태로 실시될 수 있다.
본 발명의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.

Claims (22)

  1. 비디오 신호 처리 방법에 있어서,
    현재 블록 주변의 기 복원된 샘플들에 기초하여 상기 현재 블록의 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들을 획득하는 단계;
    상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들 중 적어도 일부로 구성된 참조 샘플 세트에 기초하여 상기 현재 블록의 예측을 위한 직류(direct current, DC) 값을 획득하는 단계, 상기 제1 변의 길이와 상기 제2 변의 길이가 서로 다른 경우, 상기 참조 샘플 세트는 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들 중에서, 일부가 제외된 2의 지수 승 개수의 참조 샘플들을 포함함; 및
    상기 DC 값에 기초하여 상기 현재 블록을 복원하는 단계를 포함하는, 비디오 신호 처리 방법.
  2. 제1 항에 있어서,
    상기 참조 샘플 세트는, 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들 전체로부터, 상기 제1 변과 상기 제2 변 중에서 더 짧은 변의 길이에 대응하는 샘플 개수의 참조 샘플들이 제외된 2의 지수 승 개수의 참조 샘플들을 포함하는, 비디오 신호 처리 방법.
  3. 제2 항에 있어서,
    상기 참조 샘플 세트는, 상기 현재 블록의 제1 변과 제2 변 중에서 어느 한 변 측의 참조 샘플들로 구성된, 비디오 신호 처리 방법.
  4. 제3 항에 있어서,
    상기 참조 샘플 세트는, 상기 제1 변과 제2 변 중에서 더 긴 변 측의 참조 샘플들로 구성된, 비디오 신호 처리 방법.
  5. 제3 항에 있어서,
    상기 참조 샘플 세트는, 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들로부터, 상기 제1 변과 제2 변 중에서 더 짧은 변 측의 참조 샘플들이 제외된 나머지 참조 샘플들로 구성된, 비디오 신호 처리 방법.
  6. 제3 항에 있어서,
    상기 DC 값을 획득하는 단계는,
    상기 제1 변의 길이와 제2 변의 길이를 비교하는 단계;
    상기 비교 결과에 따라, 상기 제1 변의 길이가 상기 제2 변의 길이 보다 긴 경우, 상기 제1 변 측의 참조 샘플들로 구성된 상기 참조 샘플 세트에 기초하여 상기 DC 값을 획득하는 단계를 포함하는, 비디오 신호 처리 방법.
  7. 제6 항에 있어서,
    상기 DC 값을 획득하는 단계는,
    상기 제1 변의 길이가 상기 제2 변의 길이 보다 긴 경우, 상기 제1 변 측의 참조 샘플들의 평균에 기초하여 상기 DC 값을 획득하는 단계를 포함하는, 비디오 신호 처리 방법.
  8. 제6 항에 있어서,
    상기 DC 값을 획득하는 단계는,
    상기 비교 결과에 따라, 상기 제1 변과 상기 제2 변 중에서 변의 길이가 더 긴 변의 길이에 기초하여 상기 DC 값을 획득하는 단계를 포함하는, 비디오 신호 처리 방법.
  9. 비디오 신호 디코딩 장치에 있어서,
    프로세서를 포함하고,
    상기 프로세서는,
    현재 블록 주변의 기 복원된 샘플들에 기초하여 상기 현재 블록의 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들을 획득하고,
    상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들 중 적어도 일부로 구성된 참조 샘플 세트에 기초하여 상기 현재 블록의 예측을 위한 직류(direct current, DC) 값을 획득하되, 상기 현재 블록의 제1 변의 길이와 제2 변의 길이가 서로 다른 경우, 상기 참조 샘플 세트는 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들 중에서, 일부가 제외된 2의 지수 승 개수의 참조 샘플들을 포함하며,
    상기 DC 값에 기초하여 상기 현재 블록을 복원하는, 비디오 신호 디코딩 장치.
  10. 제9 항에 있어서,
    상기 참조 샘플 세트는, 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들 전체로부터, 상기 제1 변과 상기 제2 변 중에서 더 짧은 변의 길이에 대응하는 샘플 개수의 참조 샘플들이 제외된 2의 지수 승 개수의 참조 샘플들을 포함하는, 비디오 신호 디코딩 장치.
  11. 제10 항에 있어서,
    상기 참조 샘플 세트는, 상기 현재 블록의 제1 변과 제2 변 중에서 어느 한 변 측의 참조 샘플들로 구성된, 비디오 신호 디코딩 장치.
  12. 제11 항에 있어서,
    상기 참조 샘플 세트는, 상기 제1 변과 제2 변 중에서 더 긴 변 측의 참조 샘플들로 구성된, 비디오 신호 디코딩 장치.
  13. 제11 항에 있어서,
    상기 참조 샘플 세트는, 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들로부터, 상기 제1 변과 제2 변 중에서 더 짧은 변 측의 참조 샘플들이 제외된 나머지 참조 샘플들로 구성된, 비디오 신호 디코딩 장치.
  14. 제11 항에 있어서,
    상기 프로세서는,
    상기 제1 변의 길이와 제2 변의 길이를 비교하고,
    상기 비교 결과에 따라, 상기 제1 변의 길이가 상기 제2 변의 길이 보다 긴 경우, 상기 제1 변 측의 참조 샘플들로 구성된 상기 참조 샘플 세트에 기초하여 상기 DC 값을 획득하는, 비디오 신호 디코딩 장치.
  15. 제14 항에 있어서,
    상기 프로세서는,
    상기 제1 변의 길이가 상기 제2 변의 길이 보다 긴 경우, 상기 제1 변 측의 참조 샘플들의 평균에 기초하여 상기 DC 값을 획득하는, 비디오 신호 디코딩 장치.
  16. 제14 항에 있어서,
    상기 프로세서는,
    상기 비교 결과에 따라, 상기 제1 변과 상기 제2 변 중에서 변의 길이가 더 긴 변의 길이에 기초하여 상기 DC 값을 획득하는, 비디오 신호 디코딩 장치.
  17. 비디오 신호 인코딩 장치에 있어서,
    프로세서를 포함하고,비디오 신호 인코딩 장치에 있어서,
    프로세서를 포함하고,
    상기 프로세서는,
    현재 블록 주변의 기 복원된 샘플들에 기초하여 상기 현재 블록의 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들을 획득하고,
    상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들 중 적어도 일부로 구성된 참조 샘플 세트에 기초하여 상기 현재 블록의 예측을 위한 DC 값을 획득하되, 상기 현재 블록의 제1 변의 길이와 제2 변의 길이가 서로 다른 경우, 상기 참조 샘플 세트는 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들 중에서, 일부가 제외된 2의 지수 승 개수의 참조 샘플들을 포함하며,
    상기 DC 값에 기초하여 상기 현재 블록의 예측 블록을 생성하고,
    상기 예측 블록에 기초하여 상기 현재 블록의 잔차 신호를 획득하고,
    상기 현재 블록의 잔차 신호를 포함하는 비트스트림 생성하는, 비디오 신호 인코딩 장치.
  18. 제17 항에 있어서,
    상기 참조 샘플 세트는, 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들 전체로부터, 상기 제1 변과 상기 제2 변 중에서 더 짧은 변의 길이에 대응하는 샘플 개수의 참조 샘플들이 제외된 2의 지수 승 개수의 참조 샘플들을 포함하는, 비디오 신호 인코딩 장치.
  19. 제18 항에 있어서,
    상기 참조 샘플 세트는, 상기 현재 블록의 제1 변과 제2 변 중에서 어느 한 변 측의 참조 샘플들로 구성된, 비디오 신호 인코딩 장치.
  20. 제19 항에 있어서,
    상기 참조 샘플 세트는, 상기 제1 변과 제2 변 중에서 더 긴 변 측의 참조 샘플들로 구성된, 비디오 신호 인코딩 장치.
  21. 제19 항에 있어서,
    상기 참조 샘플 세트는, 상기 제1 변 측의 참조 샘플들과 제2 변 측의 참조 샘플들로부터, 상기 제1 변과 제2 변 중에서 더 짧은 변 측의 참조 샘플들이 제외된 나머지 참조 샘플들로 구성된, 비디오 신호 인코딩 장치.
  22. 제19 항에 있어서,
    상기 프로세서는,
    상기 제1 변의 길이와 제2 변의 길이를 비교하고,
    상기 비교 결과에 따라, 상기 제1 변의 길이가 상기 제2 변의 길이 보다 긴 경우, 상기 제1 변 측의 참조 샘플들로 구성된 상기 참조 샘플 세트에 기초하여 상기 DC 값을 획득하는, 비디오 신호 인코딩 장치.
PCT/KR2019/005750 2018-05-12 2019-05-13 참조 샘플을 이용하는 비디오 신호 처리 방법 및 장치 WO2019221472A1 (ko)

Priority Applications (9)

Application Number Priority Date Filing Date Title
CN201980031531.8A CN112106364B (zh) 2018-05-12 2019-05-13 使用参考样本的视频信号处理方法及设备
CN202211073026.XA CN115623196A (zh) 2018-05-12 2019-05-13 使用参考样本的视频信号处理方法及设备
CN202211073320.0A CN115623199A (zh) 2018-05-12 2019-05-13 使用参考样本的视频信号处理方法及设备
KR1020217042299A KR20210158432A (ko) 2018-05-12 2019-05-13 참조 샘플을 이용하는 비디오 신호 처리 방법 및 장치
CN202211073272.5A CN115623198A (zh) 2018-05-12 2019-05-13 使用参考样本的视频信号处理方法及设备
CN202211073245.8A CN115623197A (zh) 2018-05-12 2019-05-13 使用参考样本的视频信号处理方法及设备
KR1020207031515A KR102344190B1 (ko) 2018-05-12 2019-05-13 참조 샘플을 이용하는 비디오 신호 처리 방법 및 장치
US17/089,267 US11044470B2 (en) 2018-05-12 2020-11-04 Video signal processing method and device using reference sample
US17/313,987 US20210266527A1 (en) 2018-05-12 2021-05-06 Video signal processing method and device using reference sample

Applications Claiming Priority (8)

Application Number Priority Date Filing Date Title
KR10-2018-0054588 2018-05-12
KR1020180054588A KR20190129641A (ko) 2018-05-12 2018-05-12 참조 샘플의 평균값 구하는 방법을 이용한 비디오 신호 처리 방법 및 장치
KR20180059797 2018-05-25
KR10-2018-0059797 2018-05-25
KR10-2018-0067786 2018-06-12
KR20180067786 2018-06-12
KR20180076740 2018-07-02
KR10-2018-0076740 2018-07-02

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/089,267 Continuation US11044470B2 (en) 2018-05-12 2020-11-04 Video signal processing method and device using reference sample

Publications (1)

Publication Number Publication Date
WO2019221472A1 true WO2019221472A1 (ko) 2019-11-21

Family

ID=68540466

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2019/005750 WO2019221472A1 (ko) 2018-05-12 2019-05-13 참조 샘플을 이용하는 비디오 신호 처리 방법 및 장치

Country Status (4)

Country Link
US (2) US11044470B2 (ko)
KR (2) KR102344190B1 (ko)
CN (5) CN115623197A (ko)
WO (1) WO2019221472A1 (ko)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020257559A1 (en) * 2019-06-20 2020-12-24 Qualcomm Incorporated Dc intra mode prediction in video coding

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116033149A (zh) * 2018-08-09 2023-04-28 Oppo广东移动通信有限公司 视频图像分量的预测方法和装置、及计算机存储介质
WO2020060185A1 (ko) * 2018-09-19 2020-03-26 한국전자통신연구원 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
CN117201774A (zh) * 2019-01-13 2023-12-08 Lg 电子株式会社 用于执行基于mrl的帧内预测的图像编译方法和装置
US20220337875A1 (en) * 2021-04-16 2022-10-20 Tencent America LLC Low memory design for multiple reference line selection scheme
WO2024005480A1 (ko) * 2022-06-29 2024-01-04 엘지전자 주식회사 다중 참조 라인에 기반한 영상 부호화/복호화 방법, 비트스트림을 전송하는 방법 및 비트스트림을 저장한 기록 매체

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101348544B1 (ko) * 2011-08-17 2014-01-10 주식회사 케이티 단거리 화면 내 예측 모드에서 화면 내 예측 방법 및 이러한 방법을 사용하는 장치
KR20170026276A (ko) * 2015-08-28 2017-03-08 주식회사 케이티 비디오 신호 처리 방법 및 장치
KR20180009318A (ko) * 2016-07-18 2018-01-26 한국전자통신연구원 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
KR20180030791A (ko) * 2015-07-20 2018-03-26 엘지전자 주식회사 비디오 코딩 시스템에서 인트라 예측 방법 및 장치
KR20180040577A (ko) * 2015-08-17 2018-04-20 엘지전자 주식회사 인트라 예측 모드 기반 영상 처리 방법 및 이를 위한 장치

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9503716B2 (en) * 2011-12-19 2016-11-22 Broadcom Corporation Block size dependent filter selection for motion compensation
WO2016006894A1 (ko) * 2014-07-06 2016-01-14 엘지전자 주식회사 비디오 신호의 처리 방법 및 이를 위한 장치
KR20170066411A (ko) * 2014-10-08 2017-06-14 엘지전자 주식회사 3d 비디오 코딩을 위한 움직임 정보 압축 방법 및 장치
CN109076241B (zh) * 2016-05-04 2023-06-23 微软技术许可有限责任公司 利用样本值的非相邻参考线进行帧内图片预测
US10230961B2 (en) * 2016-06-03 2019-03-12 Mediatek Inc. Method and apparatus for template-based intra prediction in image and video coding
KR102410032B1 (ko) * 2016-06-24 2022-06-16 주식회사 케이티 비디오 신호 처리 방법 및 장치
EP3496399A4 (en) * 2016-08-03 2020-02-19 KT Corporation VIDEO SIGNAL PROCESSING METHOD AND DEVICE
KR20190029732A (ko) * 2016-08-08 2019-03-20 엘지전자 주식회사 인트라 예측 모드 기반 영상 처리 방법 및 이를 위한 장치
KR102607660B1 (ko) * 2016-11-03 2023-11-30 삼성전자주식회사 전자 장치 및 이의 제어 방법
US10742975B2 (en) * 2017-05-09 2020-08-11 Futurewei Technologies, Inc. Intra-prediction with multiple reference lines
AU2019286133B2 (en) * 2018-06-15 2023-02-16 Huawei Technologies Co., Ltd. Method and apparatus for intra prediction
CN117201774A (zh) * 2019-01-13 2023-12-08 Lg 电子株式会社 用于执行基于mrl的帧内预测的图像编译方法和装置
US11496748B2 (en) * 2019-03-21 2022-11-08 Tencent America LLC Method and apparatus for improved planar and DC modes for non-zero reference lines

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101348544B1 (ko) * 2011-08-17 2014-01-10 주식회사 케이티 단거리 화면 내 예측 모드에서 화면 내 예측 방법 및 이러한 방법을 사용하는 장치
KR20180030791A (ko) * 2015-07-20 2018-03-26 엘지전자 주식회사 비디오 코딩 시스템에서 인트라 예측 방법 및 장치
KR20180040577A (ko) * 2015-08-17 2018-04-20 엘지전자 주식회사 인트라 예측 모드 기반 영상 처리 방법 및 이를 위한 장치
KR20170026276A (ko) * 2015-08-28 2017-03-08 주식회사 케이티 비디오 신호 처리 방법 및 장치
KR20180009318A (ko) * 2016-07-18 2018-01-26 한국전자통신연구원 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020257559A1 (en) * 2019-06-20 2020-12-24 Qualcomm Incorporated Dc intra mode prediction in video coding
US11277616B2 (en) 2019-06-20 2022-03-15 Qualcomm Incorporated DC intra mode prediction in video coding

Also Published As

Publication number Publication date
CN115623197A (zh) 2023-01-17
US20210266527A1 (en) 2021-08-26
CN112106364B (zh) 2022-09-30
CN115623196A (zh) 2023-01-17
US20210051319A1 (en) 2021-02-18
KR20200130864A (ko) 2020-11-20
CN112106364A (zh) 2020-12-18
CN115623199A (zh) 2023-01-17
CN115623198A (zh) 2023-01-17
KR20210158432A (ko) 2021-12-30
KR102344190B1 (ko) 2021-12-28
US11044470B2 (en) 2021-06-22

Similar Documents

Publication Publication Date Title
WO2019221472A1 (ko) 참조 샘플을 이용하는 비디오 신호 처리 방법 및 장치
WO2019125093A1 (ko) 비디오 신호 처리 방법 및 장치
WO2018070790A1 (ko) 영상의 부호화/복호화 방법 및 장치
WO2018128323A1 (ko) 이차 변환을 이용한 비디오 신호의 인코딩/디코딩 방법 및 장치
WO2018066849A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2017065525A2 (ko) 영상을 부호화 또는 복호화하는 방법 및 장치
WO2018236028A1 (ko) 인트라 예측 모드 기반 영상 처리 방법 및 이를 위한 장치
WO2017209328A1 (ko) 영상 코딩 시스템에서 인트라 예측 방법 및 장치
WO2018236031A1 (ko) 인트라 예측 모드 기반 영상 처리 방법 및 이를 위한 장치
WO2017086765A2 (ko) 비디오 신호를 엔트로피 인코딩, 디코딩하는 방법 및 장치
WO2019190211A1 (ko) 모션 보상을 이용하는 비디오 신호 처리 방법 및 장치
WO2016129872A1 (ko) 그래프 기반 변환을 이용하여 비디오 신호를 처리하는 방법 및 장치
WO2013157825A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2014171713A1 (ko) 인트라 예측을 이용한 비디오 부호화/복호화 방법 및 장치
WO2020162737A1 (ko) 이차 변환을 이용하는 비디오 신호 처리 방법 및 장치
WO2011016702A2 (ko) 영상의 부호화 방법 및 장치, 그 복호화 방법 및 장치
WO2018062880A1 (ko) 영상 처리 방법 및 이를 위한 장치
WO2018070713A1 (ko) 크로마 성분에 대한 인트라 예측 모드를 유도하는 방법 및 장치
WO2020050702A1 (ko) 다중 변환 커널을 사용하는 비디오 신호 처리 방법 및 장치
WO2019107998A1 (ko) 비디오 신호의 처리 방법 및 장치
WO2020130600A1 (ko) 예측 모드를 시그널링하는 비디오 신호 처리 방법 및 장치
WO2020076142A1 (ko) 교차성분 선형 모델을 이용한 비디오 신호 처리 방법 및 장치
WO2019022537A1 (ko) 인트라 예측 모드 기반 영상 처리 방법 및 이를 위한 장치
WO2019245261A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2017065422A1 (ko) 영상 처리 방법 및 이를 위한 장치

Legal Events

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

Ref document number: 19803649

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 20207031515

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19803649

Country of ref document: EP

Kind code of ref document: A1