WO2020004900A1 - 화면내 예측 방법 및 장치 - Google Patents

화면내 예측 방법 및 장치 Download PDF

Info

Publication number
WO2020004900A1
WO2020004900A1 PCT/KR2019/007651 KR2019007651W WO2020004900A1 WO 2020004900 A1 WO2020004900 A1 WO 2020004900A1 KR 2019007651 W KR2019007651 W KR 2019007651W WO 2020004900 A1 WO2020004900 A1 WO 2020004900A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
pixel
mode
prediction
information
Prior art date
Application number
PCT/KR2019/007651
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 to BR112020026381-8A priority Critical patent/BR112020026381A2/pt
Priority to CN202310350961.4A priority patent/CN116437082A/zh
Priority to CN202310352558.5A priority patent/CN116456096A/zh
Priority to JP2020571752A priority patent/JP7373509B2/ja
Priority to CN202110406581.9A priority patent/CN113347423B/zh
Priority to MX2020014112A priority patent/MX2020014112A/es
Priority to CN202310350781.6A priority patent/CN116471409A/zh
Priority to EP19827016.7A priority patent/EP3800883A4/en
Priority to CN201980042368.5A priority patent/CN112740670A/zh
Priority to CA3105023A priority patent/CA3105023C/en
Priority to CN202310351940.4A priority patent/CN116456095A/zh
Priority to KR1020217002317A priority patent/KR20210016472A/ko
Priority to AU2019292266A priority patent/AU2019292266B2/en
Priority to SG11202013040VA priority patent/SG11202013040VA/en
Application filed by 김기백 filed Critical 김기백
Publication of WO2020004900A1 publication Critical patent/WO2020004900A1/ko
Priority to IL279503A priority patent/IL279503A/en
Priority to US17/130,601 priority patent/US11528505B2/en
Priority to PH12020552258A priority patent/PH12020552258A1/en
Priority to ZA2021/00055A priority patent/ZA202100055B/en
Priority to US17/818,448 priority patent/US11930210B2/en
Priority to US17/818,462 priority patent/US11936908B2/en
Priority to US17/818,452 priority patent/US11936906B2/en
Priority to US17/818,456 priority patent/US11936907B2/en
Priority to JP2023182108A priority patent/JP2023179784A/ja
Priority to JP2023182104A priority patent/JP2023179782A/ja
Priority to JP2023182107A priority patent/JP2023179783A/ja
Priority to JP2023182099A priority patent/JP2023179781A/ja

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/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • 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
    • 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/117Filters, e.g. for pre-processing or post-processing
    • 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/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/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/167Position within a video image, e.g. region of interest [ROI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/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/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/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression

Definitions

  • the present invention relates to a video encoding and decoding technique, and more particularly, to a method and apparatus for encoding / decoding in intra prediction.
  • HD high definition
  • UHD ultra high definition
  • An inter-screen prediction technique for predicting pixel values included in the current picture from a picture before or after the current picture using an image compression technology an intra-prediction technology for predicting pixel values included in the current picture using pixel information in the current picture
  • the present invention relates to a video encoding and decoding technique, and more particularly, to a method and apparatus for encoding / decoding in intra prediction.
  • the intra prediction method and apparatus derives an intra prediction mode of a current block, determines a pixel line for intra prediction of the current block among a plurality of pixel lines, the intra prediction mode and the An intra prediction of the current block may be performed based on the determined pixel line.
  • the intra prediction method and apparatus according to the present invention may filter the first reference pixel of the determined pixel line.
  • the filtering may be selectively performed based on a first flag indicating whether filtering is performed on the first reference pixel for the intra prediction.
  • the first flag is derived by the decoding apparatus based on the encoding parameter of the current block, and the encoding parameter is a block size, a component type, an intra prediction mode, or It may include at least one of whether intra prediction on a sub-block basis is applied.
  • the intra prediction method and apparatus may correct a prediction pixel of the current block according to the intra prediction.
  • the correcting may further include determining at least one of a second reference pixel or a weight for the correction, based on a position of a prediction pixel of the current block. It may include.
  • the correcting includes: performing intra prediction on a pixel line position of the current block, intra prediction mode of the current block, or sub block unit of the current block. It may be selectively performed in consideration of at least one of whether to perform.
  • the intra prediction is performed in a unit of a sub block of the current block, and the sub block includes a second flag, a split direction information, or the number of divisions, whether or not the split is performed. It may be determined based on at least one of the information.
  • the intra prediction mode of the current block may be derived based on a predetermined default mode or a plurality of MPM candidates.
  • encoding / decoding efficiency can be improved through prediction in units of subblocks.
  • the encoding / decoding efficiency of the intra prediction may be improved through the intra pixel prediction based on the multiple pixel lines.
  • the encoding / decoding efficiency of the intra prediction may be improved by filtering the reference pixel.
  • the encoding / decoding efficiency of the intra prediction may be improved by correcting the intra prediction pixels.
  • the encoding / decoding efficiency of the intra prediction mode can be improved by deriving the intra prediction mode based on the default mode or the MPM candidate.
  • FIG. 1 is a block diagram of an image encoding apparatus according to an embodiment of the present invention.
  • FIG. 2 is a block diagram of an image decoding apparatus according to an embodiment of the present invention.
  • FIG. 3 is an exemplary diagram illustrating a tree-based block form.
  • FIG. 4 is an exemplary diagram illustrating a type-based block shape.
  • FIG. 5 is an exemplary view showing the shape of various blocks that can be obtained by the block divider of the present invention.
  • FIG. 6 is an exemplary diagram for explaining tree-based partitioning according to an embodiment of the present invention.
  • FIG. 7 is an exemplary diagram for describing tree-based partitioning according to an embodiment of the present invention.
  • FIG. 8 illustrates a block partitioning process according to an embodiment of the present invention.
  • FIG. 9 is an exemplary diagram illustrating an intra prediction mode pre-defined in an image encoding / decoding apparatus.
  • FIG. 10 shows an example of pixels that are compared between color spaces to obtain correlation information.
  • FIG. 11 is an exemplary diagram for explaining a configuration of a reference pixel used for intra prediction.
  • FIG. 12 is an exemplary diagram for describing a reference pixel range used for intra prediction.
  • FIG. 13 is a diagram illustrating a block adjacent to a current block in relation to prediction block generation.
  • 16 is an exemplary diagram illustrating various cases of block division.
  • FIG 17 shows an example of block division according to an embodiment of the present invention.
  • FIG. 18 shows various examples of intra prediction mode candidate group setting of a block in which prediction information is generated (prediction block. 2N ⁇ N in this example).
  • 19 illustrates various examples of intra-picture prediction mode candidate group setting of a block in which prediction information is generated (in this example, prediction block. N ⁇ 2N).
  • 21 and 22 illustrate various examples of setting an intra prediction mode candidate group of a block in which prediction information is generated.
  • 23 to 25 show examples of prediction block generation according to prediction modes of a neighboring block.
  • 26 is an exemplary diagram of a relationship between a current block and a neighboring block.
  • 27 and 28 illustrate intra prediction in consideration of the direction of the prediction mode.
  • 29 is an exemplary diagram for describing a configuration of a reference pixel used for intra prediction.
  • the intra prediction method and apparatus derives an intra prediction mode of a current block, determines a pixel line for intra prediction of the current block among a plurality of pixel lines, the intra prediction mode and the An intra prediction of the current block may be performed based on the determined pixel line.
  • the intra prediction method and apparatus according to the present invention may filter the first reference pixel of the determined pixel line.
  • the filtering may be selectively performed based on a first flag indicating whether filtering is performed on the first reference pixel for the intra prediction.
  • the first flag is derived by the decoding apparatus based on the encoding parameter of the current block, and the encoding parameter is a block size, a component type, an intra prediction mode, or It may include at least one of whether intra prediction on a sub-block basis is applied.
  • the intra prediction method and apparatus may correct a prediction pixel of the current block according to the intra prediction.
  • the correcting may further include determining at least one of a second reference pixel or a weight for the correction, based on a position of a prediction pixel of the current block. It may include.
  • the correcting includes: performing intra prediction on a pixel line position of the current block, intra prediction mode of the current block, or sub block unit of the current block. It may be selectively performed in consideration of at least one of whether to perform.
  • the intra prediction is performed in a unit of a sub block of the current block, and the sub block includes a second flag, a split direction information, or the number of divisions, whether or not the split is performed. It may be determined based on at least one of the information.
  • the intra prediction mode of the current block may be derived based on a predetermined default mode or a plurality of MPM candidates.
  • first, second, A, and B may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another.
  • the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component.
  • the video encoding device and the decoding device include a personal computer (PC), a notebook computer, a personal digital assistant (PDA), a portable multimedia player (PMP), and a PlayStation Portable (PSP).
  • PC personal computer
  • PDA personal digital assistant
  • PMP portable multimedia player
  • PSP PlayStation Portable
  • Wireless Communication Terminal Smart Phone, TV, Virtual Reality (VR), Augmented Reality (AR), Mixed Reality (MR), Head It may be a user terminal such as a head mounted display (HMD) or smart glasses, or a server terminal such as an application server and a service server, and a communication device such as a communication modem for communicating with various devices or wired / wireless communication networks.
  • HMD head mounted display
  • server terminal such as an application server and a service server
  • a communication device such as a communication modem for communicating with various devices or wired / wireless communication networks.
  • Program to encode or decode an image, or to predict an intra-screen or inter-screen for encoding or decoding It may include various devices including a memory for storing RAM and data, and a processor for executing and controlling a program by executing a program.
  • the image encoded in the bitstream by the video encoding apparatus is real-time or non-real-time through the wired or wireless communication network (Network), such as the Internet, local area wireless communication network, wireless LAN network, WiBro network, mobile communication network, etc. It may be transmitted to an image decoding apparatus through various communication interfaces such as a universal serial bus (USB), and the like, may be decoded by the image decoding apparatus, reconstructed, and played back.
  • Network such as the Internet, local area wireless communication network, wireless LAN network, WiBro network, mobile communication network, etc.
  • USB universal serial bus
  • an image encoded in a bitstream by the image encoding apparatus may be transferred from the encoding apparatus to the decoding apparatus through a computer-readable recording medium.
  • the above-described image encoding apparatus and the image decoding apparatus may be separate apparatuses, but may be made of one image encoding / decoding apparatus according to implementation.
  • some components of the image encoding apparatus may be implemented to include at least the same structure or to perform at least the same function as substantially the same technical elements as some components of the image decoding apparatus.
  • the image decoding apparatus corresponds to a computing device applying the image encoding method performed by the image encoding apparatus to the decoding, the following description will focus on the image encoding apparatus.
  • the computing device may include a memory for storing a program or software module for implementing an image encoding method and / or an image decoding method, and a processor connected to the memory and executing a program.
  • the image encoding apparatus may be referred to as an encoder, and the image decoding apparatus may be referred to as a decoder.
  • an image may be configured as a series of still images, and the still images may be classified into a group of pictures (GOP), and each still image may be referred to as a picture.
  • the picture may represent one of a frame and a field in a progressive signal and an interlace signal, and when the encoding / decoding is performed in units of frames, the image may be a 'frame', a field. When executed in units, it can be represented as a 'field'.
  • the present invention assumes and describes a progressive signal, it may be applicable to an interlaced signal.
  • a unit such as a GOP or a sequence may exist, and each picture may be divided into predetermined regions such as slices, tiles, blocks, and the like.
  • one GOP may include units such as an I picture, a P picture, and a B picture.
  • An I picture may refer to a picture that is encoded / decoded by itself without using a reference picture, and a P picture and a B picture use a reference picture to perform a process such as motion estimation and motion compensation. This may mean a picture to be encoded / decoded by performing.
  • I picture and P picture can be used as reference picture
  • B picture I picture and P picture can be used as reference picture, but the above definition is also changed by the setting of encoding / decoding. Can be.
  • the picture referred to for encoding / decoding is referred to as a reference picture, and the referred block or pixel is referred to as a reference block and a reference pixel.
  • the reference data may be not only pixel values of a spatial domain but also coefficient values of a frequency domain and various encoding / decoding information generated and determined during an encoding / decoding process.
  • intra prediction prediction information or motion related information in the prediction unit, transform related information in the transform unit / inverse transform unit, quantization information in the quantization unit / dequantizer, and encoding / decoding related information in the encoder / decoder ( Context information), the filter related information, etc. may correspond to the in-loop filter unit.
  • the minimum unit constituting the image may be a pixel, and the number of bits used to represent one pixel is called a bit depth.
  • the bit depth may be 8 bits and may support more bit depths according to encoding settings.
  • the bit depth may support at least one bit depth according to a color space.
  • at least one color space may be configured according to a color format of an image. It may consist of one or more pictures with a certain size or one or more pictures with other sizes, depending on the color format. For example, in the case of YCbCr 4: 2: 0, it may be composed of one luminance component (Y in this example) and two chrominance components (Cb / Cr in this example).
  • the composition ratio may have a length of 1: 2.
  • 4: 4: 4 may have the same ratio of width and length.
  • the setting independent of each color space may mean having a setting of the corresponding color space irrespective of the composition ratio of each component or independently. In the present invention, depending on the encoder / decoder, some components may have independent settings or dependent settings.
  • Configuration information or syntax elements required in the video encoding process may be determined at the unit level of a video, sequence, picture, slice, tile, block, and the like. These include VPS (Video Parameter Set), SPS (Sequence Parameter Set), Setting information transmitted from the encoder by parsing in the same level unit in the bit stream in units such as Picture Parameter Set (PPS), Slice Header, Tile Header, Block Header, etc. It can be used to reconstruct the image decoding process. In addition, related information may be transmitted in a bitstream, parsed, and used in the form of Supplementary Enhancement Information (SEI) or Metadata. Each parameter set has a unique ID value, and a lower parameter set may have an ID value of a higher parameter set to be referred to.
  • SEI Supplementary Enhancement Information
  • the lower parameter set may refer to information of an upper parameter set having a matching ID value among one or more higher parameter sets.
  • a unit corresponding to a case in which any one of the examples of the various units mentioned above includes one or more other units may be referred to as an upper unit, and the included unit may be referred to as a lower unit.
  • each of the units may include the contents of the independent settings or the contents of the settings depending on the previous, subsequent or higher units.
  • the dependent setting may be understood to indicate setting information of a corresponding unit as flag information (for example, 1 if a bit is 1 and 0 if not) according to a setting of a higher unit before and after.
  • the setting information in the present invention will be described mainly on the example of the independent setting, but the example of adding or replacing the content of the relationship depending on the setting information of the previous or subsequent units or higher units of the current unit May be included.
  • 1 is a block diagram of an image encoding apparatus according to an embodiment of the present invention.
  • 2 is a block diagram of an image decoding apparatus according to an embodiment of the present invention.
  • the image encoding apparatus may include a predictor, a subtractor, a transformer, a quantizer, an inverse quantizer, an inverse transformer, an adder, an in-loop filter, a memory, and / or an encoder.
  • the image decoding apparatus may include a decoder, a predictor, an inverse quantizer, an inverse transform unit, an adder, an in-loop filter unit, and / or a memory, and some of the above components are necessarily included. Not all of them may be included, optionally, some or all of them may be included, and some additional components not shown may be included.
  • the image encoding apparatus and the image decoding apparatus may be separate apparatuses, but may be made of one image encoding / decoding apparatus according to implementation.
  • some components of the image encoding apparatus may be implemented to include at least the same structure or to perform at least the same function as substantially the same technical elements as some components of the image decoding apparatus. Therefore, detailed descriptions of the corresponding technical elements and their operating principles will be omitted.
  • the image decoding apparatus corresponds to a computing device applying the image encoding method performed by the image encoding apparatus to the decoding, the following description will focus on the image encoding apparatus.
  • the image encoding apparatus may be referred to as an encoder, and the image decoding apparatus may be referred to as a decoder.
  • the prediction unit may include an intra prediction unit performing intra prediction and an inter prediction unit performing inter prediction.
  • Intra-prediction may configure an intra-prediction mode by configuring pixels of adjacent blocks of the current block as reference pixels, and generate a predictive block using the intra-prediction mode, and inter-prediction may generate one or more reference images.
  • the prediction block may be generated by determining motion information of the current block using the motion information, and performing motion compensation using the motion information. Determine whether to use in-screen prediction or inter-screen prediction for the current block (coding unit or prediction unit), and determine specific information (e.g., intra-picture prediction mode, motion vector, reference) for each prediction method. Video, etc.).
  • the processing unit for which the prediction is performed the processing method for which the prediction method and the details are determined may be determined according to the encoding / decoding setting. For example, a prediction method, a prediction mode, and the like are determined in a prediction unit (or coding unit), and the prediction is performed in a prediction block unit (or coding unit, transformation unit).
  • the subtraction unit subtracts the prediction block from the current block to generate a residual block. That is, the subtractor calculates a difference between the pixel value of each pixel of the current block to be encoded and the predicted pixel value of each pixel of the prediction block generated through the predictor to generate a residual block that is a residual signal in the form of a block. .
  • the transform unit may convert a signal belonging to a spatial domain into a signal belonging to a frequency domain, and a signal obtained through a transformation process is called a transformed coefficient.
  • a transform block having a transform coefficient may be obtained by transforming the residual block having the residual signal received from the subtractor, but the input signal is determined according to an encoding setting, which is not limited to the residual signal.
  • the transform unit can transform the residual block using transformation techniques such as a Hadamard transform, a Discrete Sine Transform (DST Based-Transform), or a Discrete Cosine Transform (DCT Based-Transform).
  • transformation techniques such as a Hadamard transform, a Discrete Sine Transform (DST Based-Transform), or a Discrete Cosine Transform (DCT Based-Transform).
  • DST Based-Transform a Discrete Sine Transform
  • DCT Based-Transform Discrete Cosine Transform
  • At least one of the transform schemes may be supported, and at least one detailed transform scheme may be supported in each transform scheme.
  • the at least one detailed transformation technique may be a transformation technique in which a part of the basis vector is configured differently in each transformation technique.
  • DST-based and DCT-based transformations can be supported as a conversion technique.
  • DST, DST-I, DST-II, DST-III, DST-V, DST-VI, DST-VII, DST Detailed conversion techniques such as -VIII can be supported, and detailed conversion techniques such as DCT-I, DCT-II, DCT-III, DCT-V, DCT-VI, DCT-VII, and DCT-VIII are supported for DCT. Can be.
  • One of the transforms may be set as a basic transform technique, and an additional transform technique (for example, multiple transform schemes) Conversion techniques).
  • additional transform techniques for example, multiple transform schemes
  • Whether to support additional transform schemes may be determined in units of sequence, picture, slice, tile, etc. so that related information may be generated in the above units, and when support for additional transform schemes is supported, transform scheme selection information is determined in units such as blocks. Related information may be generated.
  • the conversion can be performed in the horizontal / vertical direction.
  • a pixel value of a spatial domain may be transformed into a frequency domain by performing a one-dimensional transformation in a horizontal direction using a basis vector in the transformation and a total two-dimensional transformation by performing a one-dimensional transformation in a vertical direction.
  • the conversion in the horizontal / vertical direction can be performed adaptively.
  • whether to perform adaptive operation may be determined according to at least one encoding setting.
  • DCT-I may be applied in the horizontal direction and DST-I in the vertical direction when the prediction mode is the horizontal mode
  • DCT-VI can be applied in the vertical direction, DCT-II in the horizontal direction, DCT-V in the vertical direction, and in the horizontal direction in the case of Diagonal down left.
  • DST-I, DST-VI may be applied in the vertical direction.
  • the size and shape of each transform block may be determined according to the encoding cost for each candidate of the size and shape of the transform block, and information such as image data of the determined transform block and the size and shape of the determined transform block may be encoded.
  • a square transform among the transform forms may be set as a basic transform form, and an additional transform form (for example, a rectangular form) may be supported.
  • an additional transform form for example, a rectangular form
  • Whether to support the additional transform type may be determined in units of a sequence, a picture, a slice, a tile, and the like, and related information may be generated in the unit, and the transform type selection information may be determined in a unit such as a block to generate related information.
  • support in the form of transform blocks may be determined according to encoding information.
  • the encoding information may correspond to a slice type, an encoding mode, a size and shape of a block, a block division scheme, and the like. That is, one transform type may be supported according to at least one encoded information, and a plurality of transform types may be supported according to at least one encoded information.
  • the former may be an implicit situation, and the latter may be an explicit situation.
  • adaptive selection information indicating an optimal candidate group among a plurality of candidate groups may be generated and recorded in the bitstream.
  • the encoded information when the encoded information is explicitly generated, it may be understood that the information is stored in the bitstream in various units, and the decoder parses the related information in various units and restores the decoded information. have.
  • the encoder and the decoder are processed by the same process and rule.
  • the rectangular support may be determined based on the slice type.
  • the supported transformation may be a square transformation
  • the transformation may be a square or rectangular transformation.
  • a rectangular transform support may be determined according to an encoding mode.
  • the supported conversion form may be a square form
  • the supported transformation form may be a square form or a rectangular form.
  • the rectangular support may be determined based on the size and shape of the block.
  • the transform type supported in blocks of a predetermined size or more may be a square type transform, and the transform type supported in a block smaller than a predetermined size may be a square or rectangular type of transform.
  • the rectangular support may be determined based on the block division scheme.
  • the supported transform type may be a square type transform, or a block obtained through a binary tree splitting method.
  • the type of transform supported may be a square or rectangular type of transform.
  • the above example is an example of transform type support according to one piece of encoding information, and a plurality of pieces of information may be combined to participate in additional transform type support setting.
  • the above example is not limited to the above, but is an example of additional transform type support according to various encoding settings, and various modification examples may be possible.
  • the conversion process may be omitted depending on the encoding setting or the characteristics of the image.
  • a conversion process (including an inverse process) may be omitted according to an encoding setting (assuming lossless compression environment in this example).
  • the conversion process may be omitted when the compression performance through the conversion is not performed according to the characteristics of the image.
  • the omitted transform may be an entire unit, or one of horizontal and vertical units may be omitted, and it may be determined whether such omission is supported according to the size and shape of the block.
  • the conversion skip flag when the conversion skip flag is 1, the conversion is not performed in the horizontal and vertical directions, and when 0, the conversion may be performed in the horizontal and vertical directions.
  • the first conversion skip flag when the first conversion skip flag is 1, the conversion is not performed in the horizontal direction, and when 0 is converted, the conversion is performed in the horizontal direction, and the second conversion skip flag is performed. If 1, no transformation is performed in the vertical direction. If 0, the transformation is performed in the vertical direction.
  • the conversion omission may be supported.
  • the conversion omission may not be supported.
  • M (m) and N (n) may be the same or different.
  • the transformation related setting may be determined in units of a sequence, a picture, a slice, and the like.
  • the transformation scheme setting may be determined according to at least one encoding information.
  • the encoding information may correspond to a slice type, an encoding mode, a size and shape of a block, a prediction mode, and the like.
  • support of a transformation scheme may be determined according to an encoding mode.
  • the conversion technique supported may be DCT-I, DCT-III, DCT-VI, DST-II, DST-III.
  • the conversion technique supported is DCT-II, DCT-III, DST. -III.
  • support of the conversion scheme may be determined according to the slice type.
  • the conversion schemes supported may be DCT-I, DCT-II, or DCT-III
  • the transformation schemes may be DCT-V, DST-V, or DST-VI.
  • the conversion scheme supported may be DCT-I, DCT-II, or DST-III.
  • support of a transformation scheme may be determined according to a prediction mode.
  • the conversion scheme supported in prediction mode A may be DCT-I, DCT-II
  • the conversion scheme supported in prediction mode B may be DCT-I, DST-I
  • the conversion scheme supported in prediction mode C is DCT. May be -I.
  • the prediction modes A and B may be a directional mode and the prediction mode C may be a non-directional mode.
  • support of the conversion scheme may be determined according to the size and shape of the block.
  • Conversion schemes supported on blocks of a certain size may be DCT-II
  • transformation schemes supported on blocks of a certain size may be DCT-II, DST-V, and supported on blocks above and below a certain size.
  • the conversion technique may be DCT-I, DCT-II, or DST-I.
  • the conversion scheme supported in the square form may be DCT-I, DCT-II
  • the transformation scheme supported in the rectangular form may be DCT-I, DST-I.
  • the above example is an example of supporting a transformation scheme according to one piece of encoding information, and a plurality of pieces of information may be combined to participate in additional transformation scheme support setting. It is not limited only to the above examples, but modifications to other examples may be possible.
  • the transformer may transmit information necessary to generate a transform block to the encoder to encode the information, and store the information in the bitstream and transmit the information to the decoder, and the decoder of the decoder parses the information and inversely transforms the information. Can be used for the process.
  • the quantization unit may quantize the input signal, and the signal obtained through the quantization process is called a quantized coefficient.
  • a quantization block having a quantization coefficient may be obtained by quantizing a residual block having a residual transform coefficient received from a transform unit.
  • the received signal is determined according to an encoding setting, which is not limited to the residual transform coefficient.
  • the quantization unit may quantize the transformed residual block by using quantization techniques such as dead zone uniform threshold quantization, quantization weighted matrix, and the like, but are not limited thereto. Quantization techniques can be used.
  • the quantization unit may transmit information necessary for generating a quantization block to the encoding unit and encode the information.
  • the quantization unit stores the information in a bitstream and transmits the information to the decoder, and the decoder of the decoder parses the information and dequantizes it. Can be used for the process.
  • the residual block may be transformed from the residual signal to generate a residual block having transform coefficients, and the quantization process may not be performed. Not only may the quantization process be performed without converting the residual signal into transform coefficients, but neither the transformation nor the quantization process may be performed. This may be determined according to the encoder setting.
  • the encoder scans the generated quantization coefficients, transform coefficients, or residual signals according to at least one scan order (eg, zigzag scan, vertical scan, horizontal scan, etc.), and then performs quantization coefficient sequence, transform coefficient sequence, Alternatively, the signal sequence may be generated and encoded by using at least one entropy coding technique.
  • the information about the scan order may be determined according to an encoding setting (eg, an encoding mode, a prediction mode, etc.), and may implicitly or explicitly generate related information. For example, one of a plurality of scanning orders may be selected according to the intra prediction mode. In this case, the scan pattern may be set to one of various patterns such as zigzag, diagonal, and raster.
  • encoded data including encoded information transmitted from each component may be generated and output as a bitstream, which may be implemented by a multiplexer (MUX).
  • MUX multiplexer
  • the coding scheme may be based on methods such as Exponential Golomb, Context Adaptive Variable Length Coding (CAVLC), and Context Adaptive Binary Arithmetic Coding (CABAC).
  • CAVLC Context Adaptive Variable Length Coding
  • CABAC Context Adaptive Binary Arithmetic Coding
  • the present invention can be encoded, and the present invention is not limited thereto, and various encoding techniques improved and modified may be used.
  • the entropy encoding apparatus is a binarizer or a context modeler ( Context Modeler) and Binary Arithmetic Coder.
  • the binary arithmetic coding unit may include a regular coding unit and a bypass coding unit.
  • the regular coding unit may be a process performed in relation to the context modeler, and the bypass coding unit may be a process performed regardless of the context modeler.
  • the binarization unit may output a bin string composed of 0 or 1 by binarizing the syntax elements.
  • the bin represents a bit composed of 0 or 1 and may be encoded through a binary arithmetic encoder.
  • one of the regular coding unit or the bypass coding unit may be selected based on the occurrence probability of 0 and 1, which may be determined according to the sub / decoding setting. If the syntax elements are data with the same frequency of 0 and 1, the bypass coding unit can be used. Otherwise, the regular coding unit can be used, and can be referred to when performing the next regular coding unit through context modeling (or context information update). .
  • the context is information about a probability of occurrence of bin
  • the context modeling is a process of estimating the probability of a bin required for binary arithmetic coding by inputting a bin which is a result of binarization.
  • information about a syntax element of a bin, an index of a location of a bin in an empty string, and a probability of a bin included in a block around a block may be used, and at least one context table may be used.
  • a plurality of context tables may be used as information for some flags according to a combination of whether a flag of a neighboring block is used.
  • Various methods may be used when performing binarization on the syntax element. For example, it can be divided into Fixed Length Binarization and Variable Length Binarization, and in the case of Variable Length Binarization, Unary Binarization, Trunacted Unary Binarization, Rice Binarization, K-th Exp-Golomb binarization and Truncated binary binarization can be used.
  • signed or unsigned binarization may be performed according to a range of values of syntax elements.
  • the binarization process for the syntax element occurring in the present invention may be performed including not only the binarization mentioned in the above example but also other additional binarization methods.
  • the inverse quantization unit and the inverse transform unit may be implemented by inversely performing the processes of the transform unit and the quantization unit.
  • the inverse quantization unit may inverse quantize the quantized transform coefficients generated by the quantization unit, and the inverse transform unit may inverse transform the inverse quantized transform coefficients to generate a reconstructed residual block.
  • the adder reconstructs the current block by adding the prediction block and the reconstructed residual block.
  • the reconstructed block can be stored in memory and used as reference data (prediction section, filter section, etc.).
  • the in-loop filter unit may include at least one post-processing filter process such as a deblocking filter, a pixel adaptive offset (SAO), an adaptive loop filter (ALF), and the like.
  • the deblocking filter may remove block distortion occurring at boundaries between blocks in the reconstructed image.
  • the ALF may perform filtering based on a value obtained by comparing the restored image with the input image.
  • the filtering may be performed based on a value obtained by comparing the reconstructed image with the input image.
  • the filtering may be performed based on a value obtained by comparing the reconstructed image with the input image after the block is filtered through SAO.
  • the memory may store the restored block or picture.
  • the reconstructed block or picture stored in the memory may be provided to a prediction unit that performs intra prediction or inter prediction.
  • the encoder may process a storage space in the form of a queue of a compressed bitstream as a coded picture buffer (CPB), and decode the space for storing the decoded image in picture units. It can be processed by placing it in a decoded picture buffer (DPB).
  • CPB coded picture buffer
  • decoding units are stored according to decoding order, and the decoding unit can be emulated in the encoder, and the compressed bitstream can be stored in the emulation process, and the bitstream output from the CPB is restored through the decoding process.
  • the image is stored in the DPB, and the pictures stored in the DPB can be referenced later during the image encoding and decoding process.
  • the decoder may be implemented by inversely performing the process of the encoder. For example, a quantization coefficient sequence, a transform coefficient sequence, or a signal sequence may be received from the bitstream and decoded.
  • the decoded data including the decoding information may be parsed and transmitted to each component.
  • a block divider may be further included.
  • Information about a basic coding unit may be obtained from a picture splitter, and the basic coding unit may mean a basic (or start) unit for prediction, transformation, quantization, etc. in an image encoding / decoding process.
  • the coding unit may include one luminance coding block and two color difference coding blocks according to a color format (YCbCr in this example), and the size of each block may be determined according to the color format.
  • the description will be made based on the block (luminance component in this example). In this case, it is assumed that the block is a unit that can be obtained after each unit is determined, and it will be described on the assumption that similar settings are applicable to other types of blocks.
  • the block divider may be set in relation to each component of the image encoding apparatus and the decoding apparatus, and the size and shape of the block may be determined through this process.
  • the set block may be defined differently according to the configuration unit, and the prediction block in the prediction unit, the transform block in the transform unit, and the quantization block in the quantization unit may correspond thereto.
  • block units according to other components may be further defined.
  • the size and shape of the block may be defined by the width and length of the block.
  • a block may be expressed as M ⁇ N, and a maximum value and a minimum value of each block may be obtained within a range.
  • the block type supports squares, and if the maximum value of the block is 256 ⁇ 256 and the minimum value is 8 ⁇ 8, a block of size 2 m ⁇ 2 m (in this example, m is an integer from 3 to 8).
  • 8 ⁇ 8, 16 ⁇ 16, 32 ⁇ 32, 64 ⁇ 64, 128 ⁇ 128, 256 ⁇ 256, or a block of size 2m ⁇ 2m (in this example, m is an integer from 4 to 128) or A block of size m ⁇ m (in this example, m is an integer from 8 to 256) can be obtained.
  • the block shape is square and rectangular, and has the same range as the above example, a block of size 2 m ⁇ 2 n (m and n are integers from 3 to 8 in this example.
  • a block obtainable may be determined according to a sub / decoding setting (for example, a type of a block, a division scheme, a division setting, etc.).
  • a coding block is 2 m ⁇ 2 n blocks
  • a prediction block is 2 m ⁇ 2 n or m ⁇ n blocks
  • a transform block is 2 m ⁇ 2 n.
  • a block of size can be obtained. Based on the setting, information such as a block size and a range (for example, information related to an index and a multiple) may be generated.
  • the above range (in this example, the maximum value and the minimum value) may be determined.
  • range information of blocks may be explicitly generated, and in some blocks, range information of blocks may be implicitly determined.
  • related information may be explicitly generated in an encoding and transform block, and related information may be implicitly processed in a prediction block.
  • At least one range information may be generated.
  • information on a range may generate information on a maximum value and a minimum value.
  • the method may be generated based on a difference between the maximum value and a predetermined minimum value (eg, 8) (eg, generated based on the setting.
  • the difference value information of the exponent of the maximum value and the minimum value may be generated.
  • range information may be obtained based on a sub / decoding setting (for example, a type of a block, a division method, a division setting, etc.).
  • a sub / decoding setting for example, a type of a block, a division method, a division setting, etc.
  • the splitting setting of the prediction block in the coding block (the maximum size M ⁇ N of the coding block in this example, the minimum size m ⁇ n in this example) (quad tree split + split depth 0 in this example)
  • the maximum value and the minimum value information can be obtained with a candidate group obtainable as (M ⁇ N and m / 2 ⁇ n / 2 in this example).
  • the size and shape of the initial (or starting) block of the block division may be determined from higher units.
  • a basic coding block obtained from a picture splitter may be an initial block
  • a coding block in the case of a prediction block, a coding block may be an initial block
  • a transform block in the case of a transform block
  • a coding block or a prediction block may be an initial block. It can be determined according to the negative / decryption setting.
  • the prediction block may be an upper unit of the transform block
  • Inter the prediction block may be an independent unit of the transform block.
  • the initial block may be divided into blocks of small size as a start unit of the partition.
  • the block may be determined as an initial block of lower units.
  • the former case may be a coding block
  • the latter case (subunit) may be a prediction block or a transform block.
  • a partitioning process for searching for a block having an optimal size and shape like the upper unit may be performed.
  • the block division unit may divide the basic coding unit (or the largest coding unit) into at least one coding unit (or the lower coding unit).
  • the coding unit may perform division in at least one prediction unit and may perform division in at least one transformation unit.
  • the coding unit may perform division into at least one coding block, the coding block may perform division into at least one prediction block, and may perform division into at least one transform block.
  • the prediction unit may perform division into at least one prediction block, and the transform unit may perform division into at least one transform block.
  • mode information for example, partition information
  • the mode information may be transmitted in the bitstream together with information (for example, prediction related information and transformation related information) generated in the component to which the block belongs, and transmitted to the decoder. Can be used in the video decoding process.
  • the block divider may support various split schemes. For example, it may support tree-based partitioning or type-based partitioning, and other methods may be applied. In the case of tree-based partitioning, partition information may be generated using a partition flag, and in the case of type-based partitioning, partition information may be generated using index information for a block type included in a preset candidate group.
  • FIG. 3 is an exemplary diagram illustrating a tree-based block form.
  • a is 2N ⁇ 2N without splitting
  • b is some splitting flag (horizontal splitting of the binary tree in this example)
  • 2N ⁇ N and c are some splitting flags (this example).
  • two N ⁇ 2N are obtained through the vertical division of the binary tree in d
  • four N ⁇ N are obtained through some division flags (four divisions of the quad tree or horizontal and vertical division of the binary tree in this example).
  • the shape of the block to be obtained may be determined according to the tree type used for splitting. For example, when quad tree splitting is performed, the candidate blocks obtainable may be a and d.
  • Candidate blocks that can be obtained when performing binary tree split may be a, b, c, and d.
  • the binary tree supports a plurality of splitting flags, one of which may be a flag indicating whether to split or not, one of which may be a flag indicating whether or not to split horizontally or vertically, and one of which is a horizontal / vertical splitting. It may be a flag indicating whether to allow duplication.
  • the candidate blocks obtainable when overlapping is allowed may be a, b, c, and d.
  • the candidate blocks obtainable when overlapping are not allowed may be a, b, and c.
  • the quad tree may be a basic tree-based partitioning scheme.
  • a tree splitting scheme (a binary tree in this example) may be included in the tree-based partitioning scheme.
  • a flag allowing additional tree splitting is activated implicitly or explicitly, a plurality of tree splitting may be performed.
  • Tree-based partitioning may be a method in which recursive partitioning is possible. That is, the partitioned block may be set as an initial block again and tree-based partitioning may be performed, which may be determined according to partitioning settings such as a partition range and a partitioning allowable depth. This may be an example of a hierarchical partitioning scheme.
  • FIG. 4 is an exemplary diagram illustrating a type-based block shape.
  • a block is divided into 1 division (a in this example), 2 divisions (b, c, d, e, f, and g in this example), and 4 divided forms (h in this example).
  • Candidate groups can be configured through various configurations.
  • the candidate group may be configured by a, b, c, n or a, b to g, n or a, n, q, and the like of FIG. 5, but is not limited thereto.
  • An example may be possible.
  • Blocks supported when the flag allowing the symmetric partition is activated may be FIGS.
  • Type-based partitioning may be a method of supporting one partitioning. Compared with tree-based partitioning, blocks obtained through type-based partitioning may not be able to further partition further. This may be an example where the splitting allowance depth is zero (eg, single layer splitting).
  • FIG. 5 is an exemplary view showing the shape of various blocks that can be obtained by the block divider of the present invention.
  • blocks a through s may be obtained according to division setting and division schemes, and an additional block type not shown may be possible.
  • asymmetric partitioning may be allowed for tree-based partitioning.
  • a block such as when divided into a plurality of blocks in this example (Fig. 5b, c) may be possible, or a block such as Fig. 5b to g (divided into a plurality of blocks in this example) If so) may be possible.
  • the candidate blocks obtainable may be b or c (this example assumes not allowing horizontal and vertical overlapping splitting) and is asymmetric.
  • the candidate blocks obtainable when the flag allowing division is activated may be b, d, e (horizontal division in this example) or c, f, g (vertical division in this example).
  • This example may correspond to a case in which a division direction is determined by a horizontal or vertical division flag and a block shape is determined according to an asymmetric allowable flag.
  • the present invention is not limited thereto and may be modified in other examples.
  • additional tree splitting may be allowed for tree-based splitting.
  • it may be possible to divide a triple tree, a quad type tree, an octa tree, and the like, thereby obtaining n partition blocks (3, 4, 8. n are integers in this example).
  • the supported block if divided into multiple blocks in this example
  • the supported block may be h to m
  • the supported block in the case of a quad type tree, the supported block may be n to p
  • a supported block May be q.
  • Whether to support the tree-based partitioning may be implicitly determined or explicitly related information may be generated according to the encoding / decoding.
  • a binary tree blocks such as those of FIGS. 5B and C may be possible, and when a binary tree and a triple tree are mixed (this example partially overlaps the usage range of the binary tree and the usage range of the triple tree). Assume a case) blocks such as b, c, i, and l may be possible.
  • the candidate blocks obtainable may be b or c, and when activated, the candidate blocks obtainable are b, i or b, h, i, j (horizontal division in this example) or c, l or c, k, l, m (vertical division in this example).
  • This example may correspond to a case in which a division direction is determined by a horizontal or vertical division flag and a block shape is determined according to a flag that allows additional division.
  • the present invention is not limited thereto and may be modified in other examples.
  • a non-rectangular partition may be allowed for a type-based block.
  • splitting in the form of r, s may be possible.
  • a, b, c, h, r, s or a to h, r may be a supported block.
  • a block supporting n divisions such as h to m (eg, n is an integer. In this example, 3 except 1, 2, and 4) may be included in the candidate group.
  • the division method may be determined according to the negative / decoding settings.
  • the partitioning scheme may be determined according to the type of block.
  • coding blocks and transform blocks may use tree-based partitioning
  • prediction blocks may use type-based partitioning.
  • a combination of two types of splitting schemes may be used.
  • the prediction block may use a partitioning scheme that mixes tree-based partitioning and type-based partitioning, and the partitioning scheme applied to at least one range of the block may be different.
  • the partitioning scheme may be determined according to the size of the block. For example, some ranges (e.g., axb to cxd. If the latter is larger) between the maximum and minimum values of the block include tree-based partitioning, and some ranges (e.g. e X f to g x h) may be divided based on type. In this case, range information according to the division scheme may be explicitly generated or may be determined implicitly.
  • a partitioning scheme may be determined according to the shape of a block (or a block before partitioning). For example, if the block shape is square, tree-based partitioning and type-based partitioning may be possible. Alternatively, tree-based partitioning may be possible when the block is rectangular.
  • the division setting may be determined according to the encoding / decoding setting.
  • the division setting may be determined according to the type of the block.
  • a coding tree and a prediction block may use quad tree, and a transform block may use binary tree partition.
  • the partitioning allowable depth may be m
  • the partitioning allowable depth is n
  • the partitioning allowable depth may be set to o, and m, n and o may or may not be the same.
  • the division setting may be determined according to the size of the block.
  • some ranges of blocks e.g., axb to cxd
  • some ranges e.g. exf to gxh.
  • Cxd in this example is g Binary tree splitting may be possible
  • the range may include all ranges between the maximum value and the minimum value of the block, and the range may have settings that do not overlap each other or may have settings that overlap.
  • the minimum value of some ranges may be equal to the maximum value of some ranges, or the minimum value of some ranges may be less than the maximum value of some ranges.
  • a partitioning scheme having a higher maximum value may have priority. That is, whether or not to perform the partitioning method having a lower priority may be determined according to the partitioning result in the partitioning method having the priority. In this case, range information according to the tree type may be explicitly generated or may be determined implicitly.
  • Type-based partitioning with some candidate groups in some ranges may be possible.
  • the range may include all ranges between the maximum value and the minimum value of the block, and the range may have a setting that does not overlap each other.
  • the division setting may be determined according to the shape of the block. For example, quadtree splitting may be possible when a block has a square shape. Alternatively, binary tree splitting may be possible when a block is rectangular.
  • the division setting may be determined according to sub / decoding information (eg, slice type, color component, encoding mode, etc.). For example, if the slice type is I, quad tree (or binary tree) splitting may be for some ranges (e.g. axb to cxd), and for P some ranges (e.g. exf to g). Xh), in the case of B, it may be possible in some range (eg, i ⁇ j to k ⁇ l).
  • the partitioning allowable depth m of the quad tree (or binary tree) partitioning may be set to n, the partitioning allowable depth n for P, and the partitioning allowable depth o for B, and m and n and o may be the same. May not be the same.
  • Some slice types may have the same configuration as other slices (for example, P and B slices).
  • the quadtree (or binary tree) division allowable depth may be set to m, and in the case of a chrominance component, m and n may or may not be the same.
  • the range of quad tree (or binary tree) splitting e.g., axb to cxd
  • e x f to g x h may or may not be the same.
  • the quadtree (or binary tree) splitting depth may be m, n may be n (assuming n is greater than m in this example), and m and n may or may not be the same. Can be.
  • the range of quad tree (or binary tree) splitting and the encoding mode when Inter is the range of quad tree (or binary tree) splitting may or may not be the same.
  • information on whether to support adaptive segmentation candidate group configuration based on encoding / decoding information may be explicitly generated or implicitly determined.
  • the division method and the division setting are determined according to the encoding / decoding setting.
  • the above example shows some cases according to each element, and variations to other cases may also be possible.
  • the division method and the division setting may be determined according to the combination by a plurality of elements.
  • the division scheme and the division setting may be determined based on the type, size, shape, sub / decoding information, and the like of the block.
  • elements involved in the partitioning scheme, setting, etc. may be determined implicitly or explicitly to generate information to determine whether to allow the adaptive case as in the above example.
  • the splitting depth of the splitting setup means the number of times of spatial division based on the initial block (in this example, the splitting depth of the initial block is 0), and the splitting depth may be divided into smaller blocks as the splitting depth increases. This may vary the depth related setting according to the division method. For example, among tree-based partitioning methods, one common depth may be used for the quadtree splitting depth and the binary tree splitting depth, and individual depths according to the tree types may be used.
  • the split depth when the individual split depth is used according to the type of the tree, the split depth may be set to 0 at the split start position of the tree (the block before performing the split in this example).
  • the split depth can be calculated around the start of splitting, not based on the split range of each tree (maximum value in this example).
  • FIG. 6 is an exemplary diagram for explaining tree-based partitioning according to an embodiment of the present invention.
  • a shows an example of quad tree and binary tree splitting.
  • the upper left block of a shows a quad tree split
  • the upper right block and the lower left block show a quad tree and a binary tree split
  • the lower right block shows a binary tree split.
  • the solid line (Quad1 in this example) represents the boundary line divided into quad trees
  • the dotted line (Binary1 in this example) represents the boundary line divided into binary trees
  • the thick solid line (Binary2 in this example) represents the boundary line divided into binary trees. it means.
  • the difference between the dashed line and the thick solid line is the difference in the division method.
  • the upper left block has a quadtree splitting depth of 3.
  • the current block is N ⁇ N
  • splitting is performed until either horizontal or vertical reaches (N >> 3), but the splitting information is (N> Generate split information up to> 2), which is common to the examples described below: assume that the maximum and minimum values of the quad tree are N ⁇ N and (N >> 3) ⁇ (N >> 3).
  • the tree split may be divided into four blocks each having a length of 1/2 of a length and a length.
  • the partition flag may have a value of '1' when partitioning is activated and '0' when partitioning is inactive. According to the setting, the division flag of the upper left block may occur together with the upper left block of b.
  • the upper right block has a quadtree splitting allowance depth of 0.
  • the binary tree splitting allowance depth is 4.
  • the maximum and minimum values of quadtree splitting are N ⁇ N, (N >> 2) ⁇ (N >> 2).
  • the maximum and minimum values of the binary tree are (N >> 1) ⁇ (N >> 1), (N >> 3) ⁇ (N >> 3)).
  • the idol block performs quad tree splitting on the initial block.
  • the block may be divided into four blocks each having a length of 1/2 of a length and a length.
  • the size of the partitioned block is (N >> 1) ⁇ (N >> 1), which means that binary tree splitting (in this example is larger than the minimum value of the quadtree splitting, but the limiting splitting depth is limited), depends on the settings in this example.
  • this example may be an example in which overlapping of quad tree partitioning and binary tree partitioning is impossible.
  • the partition information of the binary tree of this example may be composed of a plurality of partition flags. Some flags can be horizontal split flags (corresponding to x of x / y in this example), and some flags can be vertical split flags (corresponding to x / y in y in this example). It may have a similar setting (eg whether it is active or not). In this example, the two flags may be activated in duplicate.
  • flag information is generated with '-' in the figure, '-' may be an implicit processing of flags that may occur when additional splitting is not possible due to conditions such as maximum, minimum, and splitting depths according to tree splitting. have. According to the setting, the division flag of the upper right block may occur together with the upper right block of b.
  • the lower left block has a quadtree splitting allowance depth 3.
  • the binary tree splitting allowance depth is 2.
  • the maximum and minimum values of quadtree splitting are N ⁇ N, (N >> 3) ⁇ (N >> 3).
  • the maximum and minimum values of binary tree partitions are (N >> 2) ⁇ (N >> 2), (N >> 4) ⁇ (N >> 4) .
  • the partition priority is given to quad tree partitions.
  • the quadtree splitting is performed on the initial block, the lower left block may be divided into four blocks each having a length of 1/2 of the horizontal and vertical lengths.
  • the size of the divided block is (N >> 1) ⁇ (N >>), which may be quad tree splitting and binary tree splitting according to the configuration of the present example.
  • this example may be an example in which overlapping of quad tree partitioning and binary tree partitioning is possible.
  • whether or not to perform binary tree partitioning may be determined according to the quad tree partitioning result given priority.
  • the quad tree split is performed, the binary tree split is not performed.
  • the binary tree split may be performed. If the quad tree split is not performed, even if the split is possible under the above configuration, the quad tree split may not be possible further.
  • the partition information of the binary tree of this example may be composed of a plurality of partition flags.
  • Some flags may be split flags (corresponding to x in x / y in this example) and some flags may be split-direction flags (corresponding to y in x / y in this example, where x may determine whether to generate y information).
  • the split flag may have a setting similar to quad tree split. In this example, the horizontal division and the vertical division do not overlap each other. When flag information is generated as '-' in the figure, '-' may have a setting similar to the above example. According to the setting, the division flag of the lower left block may occur together with the lower left block of b.
  • the lower right block assumes that the binary tree partitioning allowed depth is 5.
  • the maximum and minimum values of the binary tree split are N ⁇ N, (N >> 2) ⁇ (N >> 3)).
  • it may be split into two blocks having a length of 1/2 of a horizontal or vertical length.
  • the division flag setting of this example may be the same as the lower left block.
  • '-' may have a setting similar to the above example.
  • This example shows a case where the minimum horizontal and vertical values of the binary tree are set differently. According to the setting, the partition flag of the lower right block may occur together with the lower right block of b.
  • the division method and the division setting according to the division can be determined, and the division process can be performed accordingly. Can be.
  • FIG. 7 is an exemplary diagram for describing tree-based partitioning according to an embodiment of the present invention.
  • the thick solid line L0 denotes the largest coding block
  • the block partitioned by the thick solid line and the other lines L1 to L5 means the divided coding block, and the number inside the block is divided.
  • the position of the sub block (following the Raster Scan order in this example), and the number of '-' may mean the division depth of the block, and the number of boundary lines between the blocks may mean the number of divisions. For example, if it is divided into four (quad tree in this example), then in the order of UL (0) -UR (1) -DL (2) -DR (3), if it is divided into two (binary tree in this example) L Or U (0) -R or D (1), which can be defined at each division depth.
  • An example to be described later illustrates a case where the obtainable coding block is limited.
  • the maximum coding block of a is 64 ⁇ 64
  • the minimum coding block is 16 ⁇ 16
  • quad tree partitioning is used.
  • 2-3-0, 2-3-1, 2-3-2 because 2-0, 2-1, 2-2 blocks (16 ⁇ 16 size in this example) are equal to the minimum coding block size.
  • block division information is not generated in blocks 2-0, 2-1, 2-2, and 2-3 because the obtainable block has 16 ⁇ 16 blocks, that is, one candidate group.
  • the maximum coding block of b is 64 ⁇ 64
  • the minimum coding block is 8 horizontally or vertically
  • the allowable splitting depth is 3.
  • the 1-0-1-1 (16 ⁇ 16 size in this example, division depth is 3) block satisfies the minimum coding block condition, it may be divided into smaller blocks.
  • it since it is equal to the allowable dividing depth, it may not be divided into higher dividing depth blocks (1-0-1-0-0, 1-0-1-0-1 blocks in this example).
  • the block partitioning information is not generated because the obtainable block has 16x8 blocks, that is, one candidate group.
  • quad tree partitioning or binary tree partitioning may be supported depending on the encoding / decoding.
  • quad tree splitting and binary tree splitting may be supported.
  • one of the above schemes or a mixture thereof may be supported depending on the block size, the partition depth, and the like.
  • the block belongs to the first block range a quad tree may be supported, and if the block belongs to the second block range, binary tree partitioning may be supported.
  • the plurality of division schemes may have at least one setting such as a maximum coding block size, a minimum coding block size, an allowable division depth, and the like.
  • the range may or may not be set by overlapping the ranges of each other.
  • a setting in which one range includes another range may also be possible. Settings for this may be determined according to individual or mixed factors such as a slice type, an encoding mode, and a color component.
  • the division setting may be determined according to the slice type.
  • the partition configuration supported may include partitioning in the range of 128 ⁇ 128 to 32 ⁇ 32 for a quad tree and partitioning in the range of 32 ⁇ 32 to 8 ⁇ 8 for a binary tree.
  • the block division setting supported may support partitioning in the range of 128 ⁇ 128 to 32 ⁇ 32 for quad trees and partitioning in the range of 64 ⁇ 64 to 8 ⁇ 8 for binary trees.
  • the division setting may be determined according to an encoding mode.
  • the partition setting supported may support two partitions in the 64 ⁇ 64 to 8 ⁇ 8 range and an allowable partition depth in the binary tree.
  • the supported partition configuration can support 3 in the range of 32 ⁇ 32 to 8 ⁇ 8 and allowable partition depth in the binary tree.
  • the division setting may be determined according to the color component.
  • the luminance component a division in the range of 256 ⁇ 256 to 64 ⁇ 64 in the case of the quad tree and a division in the range of 64 ⁇ 64 to 16 ⁇ 16 in the case of the binary tree can be supported.
  • the same setting as the luminance component in the quad tree in this example, the length of each block is proportional to the color difference format
  • the binary tree in the range of 64 ⁇ 64 to 4 ⁇ 4
  • the range in the same luminance component may support division in 128 ⁇ 128 to 8 ⁇ 8.4: 2: 0).
  • some blocks may be combined with other blocks to perform one partitioning process.
  • a partitioning process is performed to obtain an optimal block size and shape, which is optimized for the transform block as well as the optimal size and shape of the coding block. Size and shape.
  • the coding block and the transform block may be combined in one unit, the prediction block and the transform block may be combined in one unit, the coding block, the prediction block and the transform block may be combined in one unit, Combination of other blocks may be possible.
  • the generated information will be recorded in the bitstream in at least one unit of a sequence, a picture, a slice, a tile, etc. in the encoder, and the decoder will parse related information from the bitstream.
  • an input pixel value may be different from an output pixel value, and an adjustment of a pixel value may be performed to prevent distortion due to an operation error.
  • the pixel value adjusting method is a process of adjusting a pixel value exceeding a range of pixel values within a range of pixel values, and may be referred to as clipping.
  • Table 1 is an example code for a clipping function Clip_x in which pixel value adjustment is performed.
  • the input pixel value pixel_val and the minimum value minI and the maximum value maxI of the allowable pixel value range may be input as parameters of the clipping function Clip_x.
  • the minimum value minI may be 0
  • the maximum value maxI may be 2 bit_depth ⁇ 1.
  • the range of pixel values is determined according to the bit depth, but the pixel values constituting the image (for example, picture, slice, tile, block, etc.) are different depending on the type and characteristics of the image, so all pixel value ranges must be used. It does not happen within.
  • the range of pixel values constituting the actual image may be used in the image encoding / decoding process.
  • the minimum value minI of the clipping function may be used as the smallest value among the pixel values constituting the actual image, and the maximum value of the clipping function maxI constitutes the actual image.
  • the largest value among the pixel values can be used.
  • the image encoding / decoding apparatus may include a pixel value adjusting method based on a bit depth and / or a pixel value adjusting method based on a pixel value range constituting an image.
  • flag information for deciding whether to support an adaptive pixel value adjusting method may be supported.
  • pixel value adjusting method selection information may be generated, and '0'.
  • a preset pixel value adjustment method in this example, a method based on bit depth
  • the pixel value related information of the image may be included. For example, it may be an example of information on minimum and maximum values of each image according to color components, and a median value described later.
  • Information generated in relation to pixel value adjustment may be recorded and transmitted in units of video, sequence, picture, slice, tile, block, etc. of the encoder, and information related to the decoder may be parsed to restore related information in the same unit. have.
  • the range of the pixel value including the minimum value and the maximum value of the pixel value is changed (determined or defined) by adjusting the pixel value based on the bit depth or adjusting the pixel value based on the range of pixel values constituting the image through the above process. Additional pixel value range information may also be changed (determined or defined). For example, the maximum and minimum values of the pixel values constituting the actual image may be changed, and the median value of the pixel values constituting the actual image may also be changed.
  • minI may mean the minimum pixel value of the image
  • maxI may mean the maximum pixel value of the image
  • I may mean the color component
  • medianI may mean the center pixel value of the image.
  • minI may be 0, maxI may be (1 ⁇ bit_depth) -1, medianI may be 1 ⁇ (bit_depth-1), and median may be obtained in other forms including the above example according to a negative / decoding setting.
  • the median value is only one term for explanation in the present invention and may be one piece of information indicating pixel value range information that may be changed (determined or defined) according to the pixel value adjustment process in the image encoding / decoding process.
  • minI may be the minimum pixel value of the image
  • maxI may be the maximum pixel value of the image
  • medianI may be the center pixel value of the image.
  • the medianI may be an average of pixel values in the image, a value located at the center when aligning pixels of the image, and a value obtained according to pixel value range information of the image.
  • At least one minI, maxI medianI can be derived. That is, medianI may be one pixel value existing within the pixel value range of the image.
  • medianI is the pixel value range of the image such as (minI + maxI) / 2 or (minI + maxI) >> 1, (minI + maxI + 1) / 2, (minI + maxI + 1) >> 1, etc. It may be a value obtained according to information (minI, maxI in this example), and median may be obtained in other forms including the above example according to a negative / decoding setting.
  • the basic bit depth is 8 bits (0 to 255) and the pixel value adjusting process based on the range of pixel values constituting the image ⁇ in this example, the minimum value 10, the maximum value 190.
  • the setting that is derived from the minimum value and the maximum value (average ), The median 100 ⁇ is selected, and if the current block position is the first block in the image (picture in this example), the neighboring block to be used for sub / decoding (left, bottom left, top left, top, top right) Since the reference pixel does not exist, the reference pixel may be filled with the median value 100.
  • An intra prediction process may be performed according to a prediction mode using the reference pixel.
  • the default bit depth is 10 bits (0 to 1023), and the pixel value adjustment process based on the range of pixel values constituting the image (in this example, the median 600. Related syntax elements are present) is selected, and the position of the current block is In the case of the first block in the image (slice, tile in this example), there is no neighboring block (left, bottom left, top left, top, top right in this example) to be used for sub / decoding, so the reference pixel is the median 600.
  • the intra-prediction process may be performed according to a prediction mode using the reference pixel.
  • the basic bit depth is 10 bits
  • a pixel value adjustment process in this example, a median 112. related syntax element is present
  • a coding mode intra prediction / intra prediction
  • Setting to determine whether the pixel of the block is available for prediction of the current block according to inter prediction is enabled (in this example, when the encoding mode of the block is intra prediction, it can be used as a reference pixel of the current block) Not available for inter prediction. If this setting is deactivated, it can be used as a reference pixel of the current block regardless of the encoding mode of the corresponding block.
  • the related syntax element is constrained_intra_pred_flag and can occur in P or B image type. If the current block is located on the left side of the image, neighboring blocks (left, bottom left, top left in this example) to be used for sub / decoding are present. If there is a neighboring block (upper and upper right in this example) to be used for encoding / decoding, but the reference mode is not available because the encoding mode of the block is inter-screen prediction, use is prohibited by the above setting. Can be filled with a median (112 in this example). That is, since there is no reference pixel available, it may be filled with the median value of the image pixel value range. An intra prediction process may be performed according to a prediction mode using the reference pixel.
  • the prediction unit has shown various cases related to the median value, but this may be included in another configuration of video encoding / decoding.
  • the present invention is not limited only to the above embodiments and may be modified and expanded in various cases.
  • the pixel value adjustment process may be applied to the encoding / decoding process of the prediction unit, the transformation unit, the quantization unit, the inverse quantization unit, the inverse transformation unit, the filter unit, and the memory.
  • the input pixel in the pixel value adjusting method may be a reference sample or a prediction pixel in a prediction process, and a reconstructed sample in a transform, quantization, inverse transform, and inverse quantization process. May be).
  • the pixel may be a reconstructed pixel in the in-loop filter process, or may be a storage pixel in the memory.
  • the reconstructed pixel in the transformation, quantization, and vice versa may refer to the reconstructed pixel before the in-loop filter is applied.
  • the reconstructed pixel in the in-loop filter may mean a reconstructed pixel after applying the in-loop filter.
  • the reconstructed pixel in the deblocking filter process may mean a reconstructed pixel after the deblocking filter is applied.
  • the reconstructed pixel in the SAO process may mean a reconstructed pixel after applying the SAO.
  • the reconstructed pixel in the ALF process may mean a reconstructed pixel after applying the ALF. Examples of the various cases as described above have been described, but the present invention is not limited thereto and may be applied in the input, middle, and output stages of all the sub / decoding processes in which the pixel value adjusting process is called.
  • the prediction unit may be classified into intra prediction and inter prediction, and intra prediction and inter prediction may be defined as follows.
  • the intra prediction may be a technique of generating a prediction value from an area where sub / decoding of the current image (eg, a picture, a slice, a tile, etc.) is completed, and the inter screen prediction may include at least one sub / decoding before the current image. It may be a technique of generating a prediction value from a completed image (eg, a picture, a slice, a tile, etc.).
  • the intra prediction may be a technique of generating a prediction value from an area where the encoding / decoding of the current image is completed, but some prediction methods (for example, a method of generating the prediction value from the reference image).
  • Block Matching, Template Matching, etc. ⁇ may be a prediction that excludes
  • the inter prediction may be a technique of generating a prediction value from at least one sub / decoded image.
  • the completed image may be configured to include the current image.
  • FIG. 8 illustrates a block partitioning process according to an embodiment of the present invention.
  • the thick solid line represents the basic coding block
  • the thick dotted line represents the quad tree segmentation boundary
  • the double solid line represents the symmetric binary tree segmentation boundary
  • the solid line represents the ternary tree segmentation boundary
  • the thin dashed line represents the asymmetric binary tree segmentation boundary.
  • the division setting for example, division type, division information, division information configuration order, etc.
  • the division setting described below is not limited only to the corresponding example, and various modification examples may be possible.
  • the upper left, upper right, lower left and lower right blocks (N x N. 64 x 64) have separate block division settings based on the basic coding block (2N x 2N. 128 x 128).
  • the maximum coding block is 128 x 128 with the splitting setting on the quad tree.
  • the minimum coded block is 8 x 8 and the maximum partition depth is 4, which is a setting commonly applied to each block.
  • the size and shape of a block that can be obtained through one block partitioning setting such as maximum coding block, minimum coding block, splitting depth, etc. may be determined. Can be.
  • the division information required for one division operation (based on 4M x 4N before the division, an increase of division depth 1) is determined whether or not division is performed.
  • a flag indicating (in this example, division x if 0. division o if 1) and the available candidates may be 4M x 4N and 2M x 2N.
  • the size and shape of a block obtainable through a plurality of block partitioning settings may be determined.
  • the maximum coding block is 64 x 64
  • the minimum coding block has one length of 4 and a maximum partition depth of 4.
  • the partition information required for one division operation is a flag indicating whether or not to divide.
  • the flag indicating the flag, the flag indicating the partition type, the flag indicating the partition direction, and the possible candidates are 4M x 4N, 4M x 2N, 2M x 4N, 4M x N / 4M x 3N, 4M x 3N / 4M x N, M x 4N / 3M x 4N, 3M x 4N / M x 4N.
  • partition information may be divided into the following cases. That is, when a block supported according to each partition setting is obtainable by a plurality of partitioning methods, partitioning information may be generated by classifying as follows.
  • a means a flag indicating whether quad tree split or not, and if 1, quad tree split (QT) is performed. If the flag is 0, b, which is a flag indicating whether a binary tree is split, is checked. If b is 0, no split is performed in the block (No Split). If b is 1, binary tree split is performed.
  • c is a flag indicating the division direction
  • 0 means horizontal division (hor)
  • 1 means vertical division (ver)
  • d is a division type flag
  • 0 means symmetric division (SBT.Symmetric Binary Tree)
  • 1 means asymmetry.
  • ABT Asymmetric Binary Tree Only when d is 1, the information on the subdivision ratio (1/4 or 3/4) in the asymmetric division is checked.When 0, the ratio of 1/4 in the left and upper blocks in the left / right or up / down blocks is obtained. The right and lower blocks have a ratio of 3/4, and 1 has the opposite ratio.
  • the partition information may be expressed using flags b to e except a.
  • the quadtree splitting is possible in the pre-split blocks A7 to A11 (that is, when the quadtree splitting is possible but the binary tree splitting is performed instead of the quadtree splitting). This is the case when information is generated.
  • multi-tree partitioning (quad tree, binary tree, ternary tree in this example) is supported, and the size and shape of a block obtainable through a plurality of block partitioning settings may be determined.
  • the maximum coding block is 64 x 64 in the case of the binary tree / tunary, and the minimum coding block is 4 in length and 4 in the maximum partition depth.
  • the division information required for one division operation is a flag indicating whether division is performed, a flag indicating division type, and a division direction.
  • the candidate flag may be 4M ⁇ 4N, 4M ⁇ 2N, 2M ⁇ 4N, 4M ⁇ N / 4M ⁇ 2N / 4M ⁇ N, and M ⁇ 4N / 2M ⁇ 4N / M ⁇ 4N.
  • the split information may be divided into the following cases.
  • a is a flag indicating whether or not to split a quad tree, and if 1, quad tree split is performed. If the flag is 0, b is a flag indicating whether a binary tree or a ternary tree is split. If b is 0, no further partitioning is performed on the block, and if 1, binary tree or ternary tree partitioning is performed.
  • c is a flag indicating the split direction, where 0 means horizontal partition, 1 indicates vertical partition, d means binary partition (BT), and 1 indicates ternary tree partition (TT). .
  • partition information may be expressed using flags b to d except a.
  • the A12 and A15 blocks correspond to a case in which the quadtree splitting is possible in the pre-division blocks A12 to A15, so that the split information in (1) is generated.
  • A13 and A14 correspond to a case in which the partition information in (2) is generated since the partition is divided into the ternary tree instead of the quad tree in the pre-division blocks A13 and A14.
  • multi-tree partitioning (quad tree, binary tree, ternary tree in this example) is supported, and the size and shape of a block obtainable through a plurality of block partitioning settings may be determined.
  • the maximum coding block is 64 x 64 in the case of the binary tree / Turnary tree, and the minimum coding block is 4 in length and 4 in maximum division depth.
  • the flag indicating whether to divide by the split information required for one division operation is 4M x 4N, 4M x 2N, 2M x 4N, 4M x N / 4M x 3N, 4M x 3N / 4M x N, M x 4N / 3M x 4N, 3M ⁇ 4N / M ⁇ 4N, 4M ⁇ N / 4M ⁇ 2N / 4M ⁇ N, M ⁇ 4N / 2M ⁇ 4N / M ⁇ 4N.
  • the split information may be divided into the following cases.
  • a denotes a flag indicating whether quad tree is split or not, and if 1, quad tree split is performed. If the flag is 0, b, which is a flag indicating whether a binary tree is split, is checked. If b is 0, no further partitioning is performed on the block. If 1, binary tree or ternary tree partitioning is performed.
  • c is a flag indicating the division direction, 0 means horizontal division, 1 means vertical division, d means ternary division, and 1 means binary tree division.
  • d 1
  • d ternary division
  • 1 binary tree division.
  • the partition information may be expressed using flags b to f except a.
  • the A20 block corresponds to a case in which the partition information in (1) is generated since the quad tree division is possible in the pre-division blocks A16 to A19.
  • A16 to A19 corresponds to a case in which the partition information in (2) is generated since the binary tree partitioning is not performed in the pre-partition blocks A16 to A19.
  • FIG. 9 is an exemplary diagram illustrating an intra prediction mode pre-defined in an image encoding / decoding apparatus.
  • 67 prediction modes are composed of prediction mode candidate groups for intra prediction, of which 65 are directional modes (Nos. 2 to 66) and two are non-directional modes (DC, Planar). to be.
  • the directional mode may be divided into tilt (eg, dy / dx) or angle information (Degree). All or part of the prediction mode described in the above example may be included in the prediction mode candidate group of the luminance component or the chrominance component, and other additional modes may be included in the prediction mode candidate group.
  • a reconstruction block of another color space in which encoding / decoding is completed may be used for prediction of the current block by using correlation between color spaces, and may include a prediction mode supporting the same.
  • a prediction block of the current block may be generated using a reconstructed block of luminance components corresponding to the current block. That is, the prediction block may be generated based on the reconstructed block in consideration of the correlation between the color spaces.
  • the prediction mode candidate group may be adaptively determined according to the negative / decoding setting.
  • the number of candidate groups can be increased for the purpose of increasing the accuracy of prediction, and the number of candidate groups can be reduced for the purpose of reducing the amount of bits according to the prediction mode.
  • a candidate group (67. 65 directional modes and 2 non-directional modes), B candidate group (35. 33 directional modes and 2 non-directional modes), C candidate group (18. 17 directional modes) And one non-directional mode) may be selected, and the candidate group may be adaptively selected or determined according to the size and shape of the block.
  • the configuration of the prediction mode candidate group may vary according to the sub / decoding settings.
  • the prediction mode candidates are equally configured between modes, or in FIG. 9, the number of modes between modes 18 and 34 is greater than the number of modes between modes 2 and 18. can do.
  • the candidate group may be adaptively configured according to the shape of the block (that is, square, rectangular_long, or rectangular_long). For example, if the width of the current block is greater than the height, the intra prediction mode belonging to the 2nd to the 15th is not used, and may be replaced with the intra prediction mode belonging to the 67th to 80th. On the other hand, when the width of the current block is smaller than the height, the intra prediction mode belonging to Nos. 53 to 66 may not be used, and may be replaced with the intra prediction mode belonging to ⁇ 14 to ⁇ 1.
  • an intra prediction is performed with one preset prediction mode candidate group (A candidate group) having an equal mode interval, but the main elements of the present invention are as described above. It may be changed and applied to the adaptive intra picture prediction setting.
  • the prediction mode supported when the shape of a block is square or rectangular may be a prediction mode different from the above example.
  • the prediction modes of the different prediction mode candidate groups or the same number of prediction mode candidate groups but the same block length are longer, and the prediction modes may be dispersed on the opposite side, or vice versa.
  • the prediction mode is described under the prediction mode setting (equal interval between the directional modes) in which the prediction mode is supported regardless of the shape of the block, other cases can also be applied.
  • the index assigned to the prediction mode can be set using various methods.
  • an index assigned to each mode may be determined based on priority information which is set in advance according to angle or slope information of the prediction mode.
  • the mode corresponding to the x-axis or the y-axis may have a priority priority, and an angle difference of 45 degrees or -45 degrees based on the horizontal or vertical mode may be obtained.
  • Diagonal mode (mode 2, 34, 66) may have the next priority, and diagonal mode with an angle difference of 22.5 degrees or -22.5 degrees based on the diagonal mode may have the next priority.
  • the priority information may be set in such a manner (following 11.25 degrees or -11.25 degrees, etc.) or other various methods.
  • the index may be allocated in a specific direction order based on the preset prediction mode.
  • an index may be allocated in a clockwise direction from some diagonal mode (No. 2 mode) as shown in FIG. 9.
  • No. 2 mode some diagonal mode
  • the non-directional prediction mode may be assigned index information in preference to the directional mode, or may be allocated between the directional modes or at the end, which may be determined according to the encoding / decoding setting.
  • the non-directional mode will be described on the assumption that the index is assigned the first priority among the prediction modes (low index. Mode 0 is Planar and Mode 1 is DC).
  • indexes allocated to the prediction mode have been described through the above examples, the indexes may be allocated under other settings without being limited to the above examples, or various modification examples may be possible.
  • the priority information has been described in the example used for the index allocation of the prediction mode, but the example of the priority information may be used in the encoding / decoding process of the prediction mode as well as the index allocation of the prediction mode.
  • the priority information may be used for an MPM configuration or the like, and a plurality of priority information sets may be supported in the encoding / decoding process of the prediction mode.
  • the current block may use a default mode predefined in the image encoding / decoding apparatus.
  • the default mode may be a directional mode or a non-directional mode.
  • the directional mode may include at least one of a vertical mode, a horizontal mode, or a diagonal mode.
  • the non-directional mode may include at least one of a planar mode or a DC mode. If it is determined that the current block uses the default mode, the intra prediction mode of the current block may be set as the default mode.
  • the intra prediction mode of the current block may be derived based on a plurality of MPM candidates.
  • a predetermined MPM candidate may be selected from the aforementioned prediction mode candidate group.
  • the number of MPM candidates may be three, four, five, or more.
  • the MPM candidate may be derived based on the intra prediction mode of the neighboring block adjacent to the current block.
  • the neighboring block may be a block adjacent to at least one of the left, top, top left, bottom left or top right corner of the current block.
  • the MPM candidate may be determined by considering whether the intra prediction mode candIntraPredModeA of the left block and the intra prediction mode candIntraPredModeB of the upper block are the same, and whether the candIntraPredModeA and the candIntraPredModeB are non-directional modes.
  • the MPM candidate of the current block may include at least one of candIntraPredModeA, (candIntraPredModeA-n), (candIntraPredModeA + n), or non-directional mode.
  • n may be an integer of 1, 2, or more.
  • the non-directional mode may include at least one of a planar mode and a DC mode.
  • the MPM candidate of the current block may be determined as shown in Table 2 below.
  • the index of Table 2 specifies the position or priority of the MPM candidate, but is not limited thereto. For example, index 1 may be allocated to the DC mode or index 4 may be allocated.
  • the MPM candidate of the current block is at least one of candIntraPredModeA, candIntraPredModeB, (maxAB-n), (maxAB + n), or non-directional mode. It may include.
  • maxAB means the maximum value of candIntraPredModeA and candIntraPredModeB
  • n may be an integer of 1, 2, or more.
  • the non-directional mode may include at least one of a planar mode and a DC mode.
  • the MPM candidate of the current block may be determined as shown in Table 3 below.
  • the index of Table 3 specifies the position or priority of the MPM candidate, but is not limited thereto. For example, the largest index may be assigned to the DC mode.
  • MPM candidate 1 in Table 3 is applied, otherwise MPM candidate 2 may be applied.
  • the threshold range may mean a range greater than or equal to 2 and less than or equal to 62.
  • MPM candidate 1 MPM candidate 2 0 candIntraPredModeA candIntraPredModeA One candIntraPredModeB candIntraPredModeB 2 INTRA_DC INTRA_DC 3 2 + ((maxAB + 61)% 64) 2 + ((maxAB + 60)% 64) 4 2 + ((maxAB-1)% 64) 2 + ((maxAB)% 64)
  • the MPM candidate of the current block is at least one of maxAB, (maxAB-n), (maxAB + n), or non-directional mode. It may include.
  • maxAB means the maximum value of candIntraPredModeA and candIntraPredModeB
  • n may be an integer of 1, 2, or more.
  • the non-directional mode may include at least one of a planar mode and a DC mode.
  • the MPM candidate of the current block may be determined as shown in Table 4 below.
  • the index of Table 4 specifies the position or priority of the MPM candidate, but is not limited thereto. For example, index 0 may be allocated to the DC mode or the largest index may be allocated.
  • the MPM candidates of the current block are non-directional mode, vertical mode, horizontal mode, (vertical mode-m), (vertical mode + m), It may include at least one of (horizontal mode-m) or (horizontal mode + m).
  • m may be an integer of 1, 2, 3, 4 or more.
  • the non-directional mode may include at least one of a planar mode and a DC mode.
  • the MPM candidate of the current block may be determined as shown in Table 5 below.
  • the index of Table 5 specifies the position or priority of the MPM candidate, but is not limited thereto. For example, index 1 may be allocated to the horizontal mode or the largest index may be allocated.
  • the MPM candidate specified by the MPM index may be set to the intra prediction mode of the current block.
  • the MPM index may be encoded and signaled by the video encoding apparatus.
  • the intra prediction mode may be derived by selectively using either the default mode or the MPM candidate. The selection may be performed based on a flag signaled by the encoding apparatus.
  • the flag may indicate whether the intra prediction mode of the current block is set as the default mode. If the flag is the first value, the intra prediction mode of the current block is set to a default mode, and if not, information such as whether the intra prediction mode of the current block is derived from the MPM candidate, the MPM index, or the like is to be signaled. Can be.
  • the color difference component may have the same candidate group as the prediction mode candidate group of the luminance component or a candidate group including some modes of the prediction mode candidate group of the luminance component.
  • the prediction mode candidate group of the color difference component may have a fixed configuration or a variable (or adaptive) configuration.
  • some modes of the prediction mode candidate group of the luminance component eg, at least one of DC, planar, vertical, horizontal, and diagonal modes ⁇ DL, UL, and UR.
  • Intra-prediction can be performed by configuring a prediction mode candidate group of chrominance components.
  • the prediction mode candidate group of the luminance component e.g, DC, planar, vertical, horizontal, and diagonal UR modes.
  • a mode that is frequently selected is configured as the default prediction mode candidate group.
  • the prediction mode candidate group configuration of the color difference component may be variably changed.
  • the same or corresponding place as the block of the chrominance component ⁇ for example, the corresponding position corresponding to the chrominance component and the ⁇ color format> in the luminance component is not composed of a single block, but is divided into a plurality of blocks through block division or the like. If it is composed of sub blocks, it means the block of the preset position. At this time, the position of the predetermined block is determined in the upper left, upper right, lower left, lower right, middle, upper middle, load, middle left, right middle, etc. in the luminance component block corresponding to the block of the chrominance component.
  • the upper left contains (0,0)
  • the upper right contains (blk_width-1, 0)
  • the left (0, blk_height-1)
  • the right includes (blk_width-1, blk_height-1).
  • the prediction mode ⁇ or color mode> of the luminance component added to the prediction mode candidate group of the chrominance component is at least one according to a predetermined priority ⁇ assuming, for example, a top-left-top-left-bottom-center order>.
  • Prediction mode can be added. If two are added, the mode of the upper left block and the mode of the upper right block are added according to the above setting.
  • At least one prediction mode of the block or sub-block of the luminance component whose next priority is the lower left block mode is added ⁇ . It can be included in (example 1 described later) or a new prediction mode candidate group can be constructed (example 2 described later) in place of some modes.
  • Adjacent blocks may be designated, and when a plurality of modes are included in the prediction mode candidate group of the chrominance components, the blocks located at a predetermined priority and the prediction modes of the subblocks located at a predetermined priority in the subblock have priority. May be included as a candidate group according to the default prediction mode candidate group or a new prediction mode candidate group may be configured by replacing some modes.
  • the prediction mode of the chrominance component may include not only the prediction mode of the block of the luminance component or the adjacent block (of the luminance block) but also one derived from the prediction mode.
  • the prediction mode of the luminance component is included as the prediction mode of the chrominance component, and the prediction mode derived from the prediction mode of the luminance component (for example, the adjacent mode of the corresponding mode. If mode 18 is the prediction mode of the luminance component, it corresponds to the prediction mode in which the modes 17, 19, 16, etc.
  • the priority may be set in the order of the prediction mode of the luminance component-the mode derived from the prediction mode of the luminance component) or the prediction mode derived from the prediction mode of the adjacent block as the prediction mode candidate group of the chrominance component.
  • the configuration of the candidate group is the same (the number of candidate groups does not change), and the configuration of the candidate group when none match Not the same (the number of candidates increases).
  • the indexes of the prediction modes may be the same or may be assigned different indices, which may be determined according to the encoding / decoding settings.
  • the indexes of the prediction mode candidate groups of the chrominance components are Planar (0), DC (1), vertical (2), horizontal (3), and diagonal UR (4)
  • the prediction mode of the luminance component is horizontal
  • the composition of the prediction mode candidates remains unchanged, and the index of each prediction mode is left as it is or a different index is assigned (in this example, horizontal (0), planar (1), DC (2), vertical (3), and diagonal UR ( 4) ⁇ .
  • the above index reconstruction may be an example of a process performed for the purpose of generating fewer mode bits (presumably: assigning fewer bits to a small index) in the prediction mode encoding / decoding process.
  • the indexes of the prediction modes may be left the same, or may be assigned different indices.
  • the prediction mode candidate group index setting is the same as the previous example
  • the configuration of the prediction mode candidate group is increased by 1, and the prediction mode index of the existing candidate group is left as it is and newly added.
  • Indexes in the last mode (diagonal DL (5) in this example) or assign another index ⁇ in this example, diagonal DL (0), Planar (1), DC (2), vertical (3), horizontal ( 4), diagonal UL (5) ⁇ .
  • the configuration of the candidate group is the same (the mode of the candidate group is unchanged) and the configuration of the candidate group is not identical. Not the same (replaces at least one of the candidate's modes).
  • the indexes of the prediction modes may be the same or may be assigned different indices.
  • the indexes of the prediction mode candidate groups of the chrominance components are Planar (0), DC (1), vertical (2), horizontal (3), and diagonal UL (4)
  • the prediction mode of the luminance component is vertical.
  • the configuration of the prediction mode candidate group remains unchanged, and the index of each prediction mode is left as it is or another index is assigned (in this example, vertical (0), horizontal (1), diagonal UL (2), planar (3), and DC ( 4).
  • Example of directional mode forward when the luminance component is directional and non-directional mode forward when the luminance component is nondirectional. It is not limited thereto.
  • the index of the prediction mode remains the same for the unchanged mode, and the index of the replaced mode is assigned to the changed mode, or the different index is assigned to the multiple prediction modes.
  • the prediction mode candidate group index setting is the same as the previous example
  • the prediction mode of the luminance component is a diagonal DL
  • it replaces one of the prediction mode candidate groups (the diagonal UL in this example), and predicts the existing candidate group. Allocate the index of the mode to be replaced, leaving the mode index as it is (eg, diagonal DL (4)) or assign another index ⁇ in this example, diagonal DL (0), Planar (1) , DC (2), vertical (3), horizontal (4) ⁇ .
  • an example of performing reconstruction of an index for the purpose of allocating fewer mode bits is an example of setting a decoding / decoding, and other cases may be possible.
  • binarization may be performed by allocating a small number of bits to a small index, or binarization may be performed regardless of the size of the index.
  • the reconstructed prediction mode candidates are Planar (0), DC (1), vertical (2), horizontal (3), and diagonal DL (4), the diagonal DL is obtained from the luminance component even if a large index is assigned. Because it is a modified mode, you can set a setting that allocates fewer mode bits than other prediction modes.
  • the prediction mode may be a supported mode regardless of the picture type or a mode in which the support mode is determined according to some picture types (eg, a mode supported for an I picture type and not supported for a P or B picture type). Can be.
  • the contents described through the above examples are limited to the present example only, and examples of additional or other changes may be possible.
  • the encoding / decoding settings described through the above examples may be implicitly determined or explicitly include related information in units of video, video, sequence, picture, slice, tile, and the like.
  • a prediction mode related to a method of obtaining data for generating a prediction block from an area located in another space at the same time may be supported.
  • a prediction mode for a method of obtaining data for generating a prediction block in another color space using correlation between color spaces may be an example.
  • the correlation between the color space may mean the correlation between Y and Cb, Y and Cr, and Cb and Cr when YCbCr is taken as an example. That is, in the case of the color difference component (Cb or Cr), a reconstructed block of the luminance component corresponding to the current block may be generated as the prediction block of the current block (basic setting of an example in which color difference vs luminance is described later).
  • a reconstructed block of some color difference components Cb or Cr corresponding to the current block of some color difference components Cr or Cb may be generated as a prediction block of the color difference components Cr or Cb.
  • a reconstructed block of another color space may be generated as a prediction block (that is, no correction is performed) or a block (for example, correction is performed on an existing reconstructed block) obtained in consideration of correlation between color spaces.
  • P a * R + b
  • a and b represent the values used for correction
  • R and P represent the values obtained in different color spaces and the predicted values of the current color space, respectively, as prediction blocks.
  • the prediction mode may be a supported mode regardless of the picture type or a mode in which the support mode is determined according to some picture types (eg, a mode supported for an I picture type and not supported for a P or B picture type). Can be.
  • the correlation information (a, b, etc.) between the color spaces may explicitly include related information or may be obtained implicitly.
  • the areas to be compared to obtain the correlation information may include 1) a corresponding block of the chrominance component and a luminance component, or 2) an adjacent area of the current block of the chrominance component (eg, left, top, left top, right top, The lower left block, etc.) and the corresponding block of the luminance component.
  • the former may be an example where explicit and the latter are implicit.
  • At least one pixel value of each color space may be a pixel value obtained from one pixel ⁇ Pixel> in each color space, and is obtained from a plurality of pixels.
  • Pixel value derived through a filtering process such as a weighted average, ie, the number of pixels referenced or used for one pixel value used for comparison of each color space is one pixel vs one Pixels, one pixel vs.
  • the former may be the color space for generating the prediction value
  • the latter may be the color space to which the reference is made
  • the above example may be the case where it may occur according to the color format or the color Regardless of the format, it is possible to compare the pixel value of one pixel of the chrominance component with the pixel value of the corresponding one pixel of the luminance component, and It may be possible to compare the pixel values obtained by filtering a plurality of pixels of a component (a-tap separate 1D filter, bxc mask non-separable 2D filter, d-tap directional filter, etc.), depending on the encoding / decoding settings.
  • the color difference and the luminance are described, but the correlation information may be obtained by comparing the color difference ⁇ Cb> and the color difference ⁇ Cr>. have.
  • the closest pixel line of the current block of the current color component for example, p [-1, -1] to p [blk_width-1, -1 ], p [-1,0] to p [-1, blk_height-1], and pixel lines of other color spaces corresponding thereto or a plurality of pixel lines of the current block of the current color component (for example, in the above case, a plurality of objects including p [-2, -2] to p [blk_width-1, -2], p [-2, -1] to p [-2, blk_height-1] Pixels included in the pixel lines) and pixel lines of other color spaces corresponding thereto.
  • the corresponding 4 in the other color space is for comparison with the pixel value of one pixel in the current color space (color difference in this example).
  • Pixel values can be used.
  • a pixel value obtained by filtering a plurality of pixels for example, at least two of the corresponding 2x2 pixels, etc.
  • the luminance space may be obtained. Can be used.
  • the parameter information may be derived from the restored pixels of the adjacent area of the current block and the restored pixels of another color space corresponding thereto. That is, at least one parameter (eg, a or b, a1, b1 or a2, b2, etc.) may be generated based on the correlation information, and a value that is multiplied or added to the pixels of the reconstructed block in another color space ( For example, a, a1, a2 / b, b1, b2) can be used.
  • the comparison process may be performed after confirming the availability of the pixels compared in the above example.
  • an adjacent area when it is available, it may be used as a pixel for comparison, and when it is not available, it may be determined according to a negative / decoding setting.
  • pixels in adjacent areas when they are not available, they may be excluded from the process for acquiring correlation information of the color space, or may be included in the comparison process after filling the unavailable areas, which may be determined according to the encoding / decoding settings. .
  • this may correspond to an example in which an area including pixels of at least one color space is unavailable.
  • it may be an example corresponding to a case in which one of the two color spaces is unavailable or a pixel of the two color spaces is not available, which may be determined according to a decoding / decoding setting.
  • the preset pixel value for example, the median value of the bit depth, 1 ⁇ (bit_depth-1), the value between the minimum value and the maximum value of the actual pixel of the image, the average, the median value of the actual pixel of the image ⁇ May be filled in, or may be filled with values obtained by performing filtering on adjacent pixels or adjacent pixels (operation similar to the reference pixel filtering process), or other methods may be possible.
  • R0 represents an example in which both color space regions can be used. Since both are available areas, the pixels of the corresponding area may be used in a comparison process for obtaining correlation information.
  • R1 represents an example in which one of both color space areas is unavailable (in this example, an adjacent area of the current color space is available, and a corresponding area of the other color space is not available). Unusable areas can be used for comparison after filling the area using a variety of methods.
  • R2 represents an example in which one of both color space areas is unavailable (in this example, adjacent areas of the current color space are not available, and corresponding areas of other color spaces are available). Because unusable areas exist on one side, the corresponding areas of both color spaces cannot be used in the comparison process.
  • R3 represents an example in which both color space regions are unavailable. Unusable areas can be used for comparison by filling the area using a variety of methods.
  • R4 represents an example in which both color space regions are unavailable. Because unusable areas exist on both sides, the corresponding areas of both color spaces cannot be used for comparison.
  • a and b may be assigned to preset values (a is 1 and b is 0 in this example). In this case, it may mean to maintain a mode of filling data of another color space with prediction blocks of the current block.
  • the occurrence (or selection) probability setting or priority for the mode has a setting different from the existing case (for example, when the probability of selection is low. See, or place it in a lower order, etc. In other words, because the correlation information is less accurate, the accuracy of the prediction block obtained through this prediction mode may be lowered so that the final prediction mode may not be selected.) Can be allowed.
  • a mode for filling data of another color space with prediction blocks of the current block may not be supported because there is no data to be compared. That is, the mode may be a mode supported when at least one available area exists.
  • the mode when performing prediction mode encoding / decoding, it may be possible to set to allow or disallow other modes in place of the corresponding mode.
  • the number of prediction mode candidate groups may be maintained. In the latter case, the number of prediction mode candidate groups may be reduced.
  • the region when the region is not completed, the region is located beyond the boundary of the image (e.g., picture, slice, tile, etc.) (i.e., the current block and the region are included in the same image). If not).
  • a case where it is not available may be added depending on a sub / decoding setting (for example, constrained_intra_pred_flag, etc., for example, when P or B slice / type, the above flag is 1, and the encoding mode of the corresponding region is Inter). .
  • a sub / decoding setting for example, constrained_intra_pred_flag, etc., for example, when P or B slice / type, the above flag is 1, and the encoding mode of the corresponding region is Inter).
  • the above limitation may occur when generating the prediction block of the current block by using the reconstructed data of another color space after obtaining the correlation information through the comparison of the color space. That is, when it is determined that the corresponding area of the other color space corresponding to the current block is unavailable as described above, the use of this mode may be restricted or impossible.
  • a predictive value of the current block may be generated using a parameter indicating correlation information between color spaces obtained through the above process and reconstructed data of another color space corresponding to the current block.
  • the reconstructed data of another color space used for prediction of the current block may be a pixel value of a pixel at a preset position or a pixel value obtained through a filtering process.
  • the pixel value of one pixel corresponding to the luminance space may be used to generate the predicted value of one pixel of the chrominance space.
  • a plurality of pixels for example, the left, right, top, bottom, top, bottom, top, bottom, bottom, bottom, and the like in the luminance space are positioned in the luminance space.
  • one of four pixels corresponding to the luminance space one of four pixels corresponding to the luminance space (one pixel of the chrominance component corresponds to 2 x 2 pixels of the luminance component)
  • the pixel value of one pixel at a set position selection of upper left, upper right, lower left and lower right
  • the left, right, up, down, center of a plurality of pixels for example, at least two pixels or 2 x 2 pixels of the corresponding 2 x 2 pixels in the luminance space
  • Pixels located in the upper left, upper right, lower left, lower right, and the like directions may be used.
  • a pixel value obtained by applying (multiplying, adding, etc.) a parameter indicating correlation information obtained through the above process to a pixel value obtained in another color space may be obtained as a predicted value of a pixel in the current color space.
  • the content described in may be applied to (fixed candidate group configuration vs. variable candidate group configuration). For example, when a prediction value cannot be obtained in another color space, a replacement mode for the prediction value may be included in the candidate group.
  • related information for example, information about support or not, parameter information, etc.
  • related information may be included in units of a video, a sequence, a picture, a slice, a tile, and the like.
  • a prediction mode candidate group may be configured in a prediction mode (A mode) related to a method of obtaining data for generating a prediction block from adjacent regions in the same space at the same time according to a sub / decoding setting, or in the prediction mode. Additionally, a prediction mode (B_mode) related to a method of obtaining data for generating a prediction block from a region located in another space at the same time may be included in the prediction mode candidate group.
  • a mode a prediction mode related to a method of obtaining data for generating a prediction block from adjacent regions in the same space at the same time according to a sub / decoding setting, or in the prediction mode.
  • B_mode prediction mode related to a method of obtaining data for generating a prediction block from a region located in another space at the same time
  • the prediction mode candidate group may be configured using only the A mode or only the B mode, and the prediction mode candidate group may be configured by using a mixture of the A mode and the B mode.
  • setting information about the prediction mode candidate group configuration may be explicitly generated, or information about the prediction mode candidate group configuration may be implicitly determined in advance.
  • Mode> mode and B_2 ⁇ color copy mode> mode are used to configure the prediction mode candidate group, A mode and B_1 mode is configured for the P image type, and A mode and B_2 mode are configured for the B image type. To form a prediction mode candidate group, etc.).
  • the prediction mode candidate group for the luminance component is shown in FIG. 9, and the prediction mode candidate group for the color difference component is shown in FIG. 9 in the horizontal, vertical, and diagonal modes (Planar, DC, Color Mode 1, Color Mode 2, Although it is explained on the assumption that it is composed of the color mode 3, the color copy mode 1, the color copy mode 2, the neighbor block mode 1 (left block), and the neighbor block mode 2 (upper block), it is possible to set various candidate prediction modes. Can be.
  • the intra prediction may be configured as follows.
  • the intra prediction of the prediction unit may include a reference pixel construction step, a prediction block generation step, a prediction mode determination step, and a prediction mode encoding step.
  • the image encoding apparatus may be configured to include a reference pixel constructing unit, a predictive block generating unit, and a prediction mode encoding unit for implementing a reference pixel constructing step, a predictive block generating step, a prediction mode determining step, and a prediction mode encoding step.
  • intra prediction may be configured as follows.
  • the intra prediction of the prediction unit may include a prediction mode decoding step, a reference pixel construction step, and a prediction block generation step.
  • the image decoding apparatus may be configured to include a prediction mode decoding unit, a reference pixel construction unit, and a prediction block generation unit that implement the prediction mode decoding step, the reference pixel construction step, and the prediction block generation step.
  • the intra prediction may be performed in the unit of the current block (for example, a coding block, a prediction block, a transform block, etc.) or may be performed in a unit of a predetermined subblock.
  • a flag indicating whether the current block is divided into sub-blocks to perform intra prediction may be used.
  • the flag may be encoded and signaled by the encoding apparatus. If the flag is the first value, the current block is divided into a plurality of sub blocks, otherwise, the current block is not divided into a plurality of sub blocks.
  • the splitting here may be an additional splitting performed after the splitting based on the above-described tree structure.
  • the sub blocks belonging to the current block share one intra prediction mode, but different reference pixels may be configured for each sub block.
  • the subblock may use the same intra prediction mode and a reference pixel.
  • subblocks may use the same reference pixel, but may use different intra prediction modes for each subblock.
  • the division may be performed in the vertical or horizontal direction.
  • the split direction may be determined based on a flag signaled by the encoding apparatus. For example, when the flag is the first value, the flag may be divided in the horizontal direction, otherwise, the flag may be divided in the vertical direction.
  • the split direction may be determined based on the size of the current block. For example, when the height of the current block is larger than the predetermined threshold size, the block may be divided in the horizontal direction, and when the width of the current block is larger than the predetermined threshold size, the block may be divided in the vertical direction.
  • the threshold size may be a fixed value pre-defined in the encoding / decoding apparatus, or may be determined based on information on the block size (for example, the size of the largest transform block, the size of the largest coding block, etc.). .
  • the information about the block size may be signaled at at least one level of a sequence, a picture, a slice, a tile, a brick, or a CTU row.
  • the number of subblocks may be variably determined based on the size, shape, split depth, intra prediction mode, etc. of the current block. For example, when the current block is 4x8 or 8x4, the current block may be divided into two sub blocks. Or, if the current block is greater than or equal to 8x8, the current block may be divided into four sub blocks.
  • FIG. 11 is an exemplary diagram for explaining a configuration of a reference pixel used for intra prediction.
  • the size and shape (M ⁇ N) of the current block on which prediction is performed may be obtained from the block splitter, and will be described under the assumption that it is supported in the range of 4 ⁇ 4 to 128 ⁇ 128 for intra prediction.
  • Intra prediction may be generally performed in units of prediction blocks, but may be performed in units of coding blocks, transform blocks, or the like according to the setting of the block partitioner.
  • the reference pixel configuration unit may configure a reference pixel used for prediction of the current block.
  • the reference pixel may be managed through a temporary memory (for example, an array ⁇ Array>, a primary or a secondary array, etc.), generated and removed for each intra-prediction process of the block, and the size of the temporary memory is referred to. It may be determined according to the configuration of the pixel.
  • a temporary memory for example, an array ⁇ Array>, a primary or a secondary array, etc.
  • left, top, top left, top right, and bottom left blocks are used for prediction of the current block with respect to the current block.
  • block candidate groups having other configurations may be used for prediction of the current block.
  • the candidate group of neighboring blocks for the reference pixel may be an example when following a raster or Z scan, and some of the candidate groups may be removed according to the scanning order, or other block candidate groups (eg, right , Lower, lower right block, etc. may be configured).
  • the same coordinate or color component composition ratio in a block (eg, in each color space) that corresponds to the current block in another color space (eg, if the current block belongs to Cr, the other color space corresponds to Y or Cb).
  • the current block may be used for prediction of the current block.
  • the example is composed of one block in the predetermined position (left, upper, upper left, upper right, lower left), but at least one block may exist at the corresponding position. That is, a plurality of sub-blocks according to block division of the corresponding block may exist in the preset position.
  • an adjacent region of the current block may be a position of a reference pixel for intra prediction of the current block, and an area corresponding to the current block of another color space may be further considered as a position of the reference pixel according to the prediction mode.
  • the position of a reference pixel defined according to a prediction mode, a method, or the like may be determined.
  • the reference pixel position is a search range (eg, in a region where sub / decoding is completed or a region where sub / decoding is completed before a current block of the current image).
  • the area included in the left or top of the current block or in the upper left, upper right, etc. may be considered as the position of the reference pixel.
  • the reference pixels used for prediction of the current block may be configured of adjacent pixels (Ref_L, Ref_T, Ref_TL, Ref_TR, and Ref_BL in FIG. 11) of the left, top, left top, right top, and bottom left blocks.
  • the reference pixel is generally composed of pixels (FIG. 11 a) of the neighboring block closest to the current block, but may also include other pixels (pixels of FIG. 11 b and other outer lines). . That is, the first pixel line a adjacent to the current block, the second pixel line b adjacent to the first pixel line, the third pixel line adjacent to the second pixel line, or the fourth pixel line adjacent to the third pixel line. At least one may be used.
  • the plurality of pixel lines may include all of the first to fourth pixel lines or may include only the remaining pixel lines except the third pixel line.
  • the plurality of pixel lines may include only the first pixel line and the fourth pixel line.
  • the current block may perform intra prediction by selectively referring to any one of the plurality of pixel lines.
  • the selection may be performed based on an index (refIdx) signaled by the encoding apparatus.
  • any one of the plurality of pixel lines may be selectively used based on the size, shape, division type of the current block, whether the intra prediction mode is the non-directional mode, the angle of the intra prediction mode, or the like. For example, when the intra prediction mode is a planar mode or a DC mode, only the first pixel line may be limited. Alternatively, when the size (width or height) of the current block is smaller than or equal to a predetermined threshold, only the first pixel line may be limited.
  • the intra prediction mode when the intra prediction mode is larger than the predetermined threshold angle (or smaller than the predetermined threshold angle), only the first pixel line may be limited.
  • the threshold angle may be an angle of an intra prediction mode corresponding to mode 2 or mode 66 of the aforementioned prediction mode candidate group.
  • the pixels adjacent to the current block may be classified into at least one reference pixel layer.
  • the pixels closest to the current block are ref_0 ⁇ pixels having a pixel value difference of 1 from the boundary pixel of the current block.
  • p (-1, -1) to p (2m-1, -1), p (-1,0) to p (-1,2n-1) ⁇ and the next adjacent pixel ⁇ the border pixel and pixel of the current block Value difference 2.
  • p (-2, -1) to p (-2,2n) ⁇ is ref_1, then adjacent pixel ⁇ the boundary of the current block Difference between pixel and pixel value 3.
  • reference pixels may be classified into a plurality of reference pixel layers according to pixel distances adjacent to boundary pixels of the current block.
  • the reference pixel layer may be set differently for each adjacent neighboring block.
  • a reference pixel according to layer ref_0 may be used when a block neighboring the current block and the uppermost block as a reference block
  • a reference pixel according to layer ref_1 may be used when a block adjacent to the upper right is used as a reference block. have.
  • the reference pixel set generally referred to when performing intra-picture prediction belongs to neighboring blocks adjacent to the current block at the lower left, the left, the upper left, the upper and the upper right, and is located in the ref_0 layer (the pixels closest to the boundary pixel). Pixels belonging to each other, and unless otherwise described below, are assumed to be those pixels. However, only pixels belonging to some of the aforementioned neighboring blocks may be used as the reference pixel set, or pixels belonging to two or more layers may be used as the reference pixel set.
  • the reference pixel set or layer may be implicitly determined (preset in the encoding / decoding apparatus) or may be explicitly determined (receiving information that can be determined from the encoding apparatus).
  • the description is based on the assumption that the maximum number of supported reference pixel layers is 3, but may have more values, and the number of reference pixel sets according to the number of reference pixel layers and positions of referenceable neighboring blocks (or referred to as reference pixel candidate groups).
  • the image may be set differently according to the picture, slice, tile, etc.>, color component, and the like, and may include related information in units of a sequence, a picture, a slice, a tile, and the like.
  • the present invention will be described on the premise of allocating a low index (incremented by 0) from the reference pixel layer closest to the current block, the present invention is not limited thereto.
  • the reference pixel configuration related information which will be described later, may be generated under the above-described index setting (binarization, etc., which allocates a short bit to a small index when one of a plurality of reference pixel sets is selected).
  • a weighted average may be applied using each reference pixel included in the two or more reference pixel layers.
  • a prediction block may be generated using a reference pixel obtained by a weighted sum of pixels located in layer ref_0 (the nearest pixel layer) and ref_1 (the next pixel layer) of FIG. 11.
  • the pixel to which the weighted sum is applied in each reference pixel layer may be a decimal unit pixel as well as an integer unit pixel according to a prediction mode (eg, prediction mode directionality).
  • weights (for example, 7: 1, 3: 1) are applied to the prediction block obtained using the reference pixel according to the first reference pixel layer and the prediction block obtained using the reference pixel according to the second reference pixel layer, respectively. , 2: 1, 1: 1, etc.) to obtain one prediction block.
  • the weight may have a higher weight as a prediction block according to a reference pixel layer adjacent to the current block.
  • the configuration of the neighboring pixel of the neighboring block as the reference pixel may be an example thereof, but is not limited thereto.
  • the number of various cases for example, ref_0 and ref_1 are selected as reference pixel layers and weighted through ref_0 and ref_1) Generating a predicted pixel value by a method such as a sum, that is, implicitly).
  • the reference pixel configuration related information (eg, selection information for the reference pixel layer or set, etc.) may be configured except for preset information (eg, when the reference pixel layer is preset to ref_0). ref_1, ref_2, ref_3, etc.), but is not limited thereto.
  • the sub / decoding information includes image type, color component, size of current block, shape, prediction mode (type of prediction mode (directional, non-directional), direction of prediction mode (vertical, horizontal, diagonal 1, diagonal 2, etc.).
  • the intra prediction setting reference pixel configuration setting in this example
  • the intra prediction setting may be determined according to a combination of sub / decoding information of a neighboring block and sub / decoding information of a current block and a neighboring block.
  • the reference pixel range is determined according to the size, shape of the block, the configuration of the prediction mode (angle information of the prediction mode in this example), and the like.
  • the position indicated by the arrow in FIG. 12 means a pixel used for prediction.
  • the A, A ', B, B', and C pixels mean pixels at the lower right of 8 ⁇ 2, 2 ⁇ 8, 8 ⁇ 4, 4 ⁇ 8, and 8 ⁇ 8 blocks.
  • the reference pixel range of each block may be identified through the pixels AT, AL, BT, BL, CT, and CL used in the upper and left blocks.
  • p (0, -1) to p (9, -1), p (-1,0) to p (-1,9), p (- 1 (-1), p (0, -1) to p (11, -1), p (-1,0) to p (-1,11) for B and B 'pixels (rectangular blocks) ), p (0, -1) to p (15, -1), p (-1,0) to p (-1 in the range of p (-1, -1) 15 may be located in the range of p (-1, -1).
  • Range information of the reference pixel obtained through the above process (for example, P (-1, -1), P (M + N-1, -1), P (-1, N + M-1), etc. ⁇ Can be used in an intra prediction process (eg, reference pixel filtering, prediction pixel generation process, etc.).
  • the reference pixel is not supported only in this case and various other cases may be possible.
  • the reference pixel component of the intra prediction may include a reference pixel generator, a reference pixel interpolator, a reference pixel filter, and the like, and may include all or part of the above components.
  • the reference pixel configuration unit may check the availability of the reference pixel to classify the available reference pixel and the unavailable reference pixel. For example, if a block (or reference pixel candidate block) at a predetermined position is available, the corresponding block may be used as a reference pixel, and if not available, the block cannot be used as a reference pixel.
  • the reference pixel availability is determined to be unavailable when at least one of the following conditions is satisfied. For example, if it is located outside the picture boundary, if it does not belong to the same division unit as the current block (for example, slice, tile, etc.), and if the sub / decoding is not completed, the usage is determined according to the sub / decoding setting. If any one of the limited cases is satisfied, it can be determined that it cannot be used. That is, when none of the above conditions are satisfied, it can be determined that it can be used.
  • the use of the reference pixel can be restricted by the negative / decoding settings.
  • the use of reference pixels may be limited depending on whether to perform limited intra prediction (eg, constrained_intra_pred_flag).
  • the limited intra prediction may be performed when an attempt is made to prohibit the use of a block reconstructed by referencing from another image as a reference pixel when attempting to perform error robust encoding / decoding to an external factor such as a communication environment.
  • the limited intra prediction may be applied according to an encoding mode of a reconstructed block corresponding to the current block in another color space.
  • whether or not the current block belongs to some chrominance components Cb and Cr and can be used may be determined according to an encoding mode of a block in which encoding / decoding of the luminance component Y corresponding to the current block is completed.
  • the above example may correspond to a case where a reconstructed block of another color space is used as a reference pixel.
  • this may correspond to a case where the encoding mode is independently determined according to the color space.
  • whether to use the reference pixel may be determined according to the sub / decoding setting.
  • the encoding mode when the encoding mode is set to Intra when the encoding / decoding is performed using the prediction method, the corresponding block may be determined to be available. Or, you can allow an exceptional case of leaving it unavailable even though it is Intra.
  • the encoding mode when the encoding mode is set to Inter when the encoding / decoding is performed using the prediction method, the corresponding block may be set to be unavailable. Or, you can allow an exceptional case of leaving Inter in spite of being Inter.
  • whether or not to make an exceptional case when the use is determined according to the encoding mode may be determined according to the encoding / decoding setting.
  • the limited intra picture prediction may be a setting applied in some image types (eg, P or B slice / tile type, etc.).
  • the reference pixel candidate block may be classified into a case in which all of the reference pixel candidate blocks may be used, some may be used, and all may be unavailable. In all cases except when all are available, the reference pixels at the candidate block positions that are not available may be filled or generated.
  • the pixel at a predetermined position of the block (assuming that the pixel is adjacent to the current block in this example) may be included in the reference pixel memory of the current block.
  • the pixel data of the corresponding block position may be copied as it is or included in the reference pixel memory through a process such as reference pixel filtering.
  • the pixel obtained through the reference pixel generation process may be included in the reference pixel memory of the current block.
  • a reference pixel may be configured when the reference pixel candidate block is in an available state, and a sham pixel may be generated when the reference pixel candidate block is in an unavailable state.
  • the following shows an example of filling a reference pixel at an unusable block position using various methods.
  • a reference pixel may be generated using an arbitrary pixel value, and a single pixel value belonging to a pixel value range (for example, a pixel value adjusting process based on bit depth or pixel value range information of an image) may be generated.
  • the reference pixel may be generated from an area in which encoding / decoding of the image is completed.
  • the reference pixel may be generated from at least one usable block adjacent to the unusable block.
  • at least one of an extrapolation method, an interpolation method, a copying method, or the like may be used, and the reference pixel generation (or copying, extrapolation) direction may be clockwise or counterclockwise, and may be determined according to a negative / decoding setting.
  • the direction of generating the reference pixel in the block may follow one preset direction or may follow an adaptively determined direction depending on the location of the unavailable block.
  • the same method as the above example may be used.
  • the process of filling the adjacent reference pixels of the current block in the current color space is the process of filling the block M x N corresponding to the current block (mxn) in other color spaces.
  • a method e.g., extrapolation in the direction of the vertical, horizontal, diagonal, etc. of the peripheral pixels, interpolation, average, etc., such as Planar, with the filling direction from the neighboring pixels of the block corresponding to the current block towards the inside of the corresponding block).
  • a corresponding region which may be referred to as a reference pixel in this example.
  • This example may correspond to a case where a prediction mode for generating a prediction block from another color space is included without being excluded from the candidate group.
  • the reference pixel of a decimal unit may be generated by linear interpolation of the reference pixel.
  • the reference pixel interpolation process may be performed after the reference pixel filter process is performed.
  • only the filtering process for the configured reference pixel may be performed. In summary, it may be performed before the prediction block generation process.
  • the interpolation process is not performed in the horizontal, vertical, and some diagonal modes (for example, Diagonal down right, Diagonal down left, Diagonal up right), non-directional mode, color mode, and color copy mode.
  • some diagonal modes for example, Diagonal down right, Diagonal down left, Diagonal up right
  • non-directional mode for example, color mode, and color copy mode.
  • color mode for modes (other diagonal modes), interpolation can be performed.
  • the interpolation precision may be determined according to the prediction mode candidate group (or the total number of prediction modes) supported, the prediction mode configuration (eg, prediction mode direction angle, prediction mode interval), and the like.
  • One preset filter for example, a 2-tap linear interpolation filter
  • a plurality of filter candidate groups for example, a 4-tap cubic filter and a 4-tap Gaussian filter
  • 6-tap Winner filter 8-tap Kalman filter, etc.
  • filter selection information can be created explicitly or implicitly, and sub / decoding settings (e.g. interpolation precision, block size, shape, prediction mode, etc.) It can be determined according to.
  • sub / decoding settings e.g. interpolation precision, block size, shape, prediction mode, etc.
  • an interpolation filter to be used may be determined according to a range of block sizes, an interpolation filter used to be determined according to interpolation precisions, and interpolation according to characteristics of a prediction mode (eg, directional information, etc.).
  • the filter can be determined.
  • a predetermined interpolation filter may be used in some ranges (A)
  • a predetermined interpolation filter may be used in some ranges (B)
  • a plurality of ranges may be used in some ranges (C).
  • An interpolation filter c of one of the interpolation filters C may be used, and in some ranges D, an interpolation filter d of one of the plurality of interpolation filters C may be used, and in some ranges, a predetermined interpolation may be used.
  • a filter is used and in some ranges one of a plurality of interpolation filters can be used.
  • M x N in this example, M and N
  • N may be 4, 8, 16, 32, 64, 128, etc. That is, M and N may be the minimum or maximum value of each block size range.
  • the interpolation related information may be included in units of a video, a sequence, a picture, a slice, a tile, a block, and the like.
  • the interpolation process may be performed by the reference pixel configuration unit or may be a process performed by the prediction block generator.
  • filtering may be performed on the reference pixel for the purpose of improving the accuracy of prediction by reducing the deterioration remaining through the encoding / decoding process.
  • the filter used is a low-pass filter.
  • Whether or not filtering is applied may be determined according to the encoding / decoding setting, and if filtering is applied, fixed filtering or adaptive filtering may be applied, and the decoding / decoding setting may be defined according to the size, shape, prediction mode, etc. of the block. Can be.
  • Fixed filtering means a case where one preset filter is applied to the reference pixel filter unit
  • adaptive filtering means a case where one of the plurality of filters is applied to the reference pixel filter unit.
  • one of a plurality of filters may be implicitly determined or explicitly selected information may be generated according to the encoding / decoding setting, and 3-tap (for example, [1,2] , 1] / 4) or 5-tap (eg, [2,3,6,3,2]).
  • filtering may not be applied in some settings (block range A).
  • the filtering may not be applied in some settings (block range B, some modes C), and the filtering may be applied through a preset filter (3-tap filter) in some settings (block range B, some modes D).
  • filtering may not be applied at some settings (block range E, some mode F), and filtering may be applied at a predetermined filter (3-tap filter) at some settings (block range E, some mode G).
  • filtering can be applied through a preset filter (5-tap filter), and in some settings (block range E, some mode I), one of a plurality of filters is selected and filtered. This can be applied.
  • filtering may be applied through a predetermined filter (5-tap filter) in some settings (block range J, some mode K), and filtering may be applied through a predetermined filter (3-tap filter). That is, a plurality of filtering processes may be performed. In detail, the filtering may be further applied based on the result of the preceding filtering.
  • a predetermined filter 5-tap filter
  • 3-tap filter 3-tap filter
  • the size of the block dividing the block size range is M x N (in this example, M and N are 4, 8, 16, 32, 64, 128, etc. That is, M and N are the minimum or maximum of each block size range. Value).
  • prediction modes can be broadly classified as directional mode, non-directional mode, color mode, color copy mode, and the like, and in detail, adjacent to horizontal or vertical mode / diagonal mode (45 degree interval) / horizontal or vertical mode 1 , Mode 2 adjacent to the horizontal or vertical mode (the mode spacing is slightly longer than the previous one). That is, whether or not filtering is applied or the type of filtering may be determined according to the classified modes as in the above case.
  • the adaptive filtering is applied according to a plurality of factors such as a block range and a prediction mode.
  • the plurality of factors are not always required and the adaptive filtering is performed according to at least one factor. It may also be possible.
  • various modification examples may be possible without being limited to the above examples, and the reference pixel filter related information may be included in units of a video, a sequence, a picture, a slice, a tile, and a block.
  • the above-described filtering may be selectively performed based on a predetermined flag.
  • the flag may indicate whether filtering is performed on a reference pixel for intra prediction.
  • the flag may be encoded and signaled by the encoding apparatus.
  • the flag may be derived in the decoding apparatus based on the encoding parameter of the current block.
  • the encoding parameter may include at least one of a position / region of a reference pixel, a block size, a component type, whether intra prediction on a sub-block basis is applied, and an intra prediction mode.
  • filtering may be performed on the reference pixel, and otherwise, filtering may not be performed on the reference pixel.
  • the number of pixels belonging to the current block is greater than a predetermined number of thresholds, filtering may be performed on the reference pixel. Otherwise, filtering may not be performed on the reference pixel.
  • the threshold number is a value that is pre-committed to the encoding / decoding device and may be an integer of 16, 32, 64, or more.
  • filtering may be performed on the reference pixel. Otherwise, filtering may not be performed on the reference pixel.
  • the threshold size may be expressed as M ⁇ N and pre-committed to the encoding / decoding device, where M and N may be an integer of 8, 16, 32, or more.
  • the threshold number or threshold size may be set as a condition for determining whether to perform filtering on a reference pixel by mixing one or two elements of the two. Alternatively, if the current block is a luminance component, filtering may be performed on the reference pixel. Otherwise, filtering may not be performed on the reference pixel.
  • the current block does not perform the above-described intra-picture prediction in units of sub-blocks (that is, is not divided into a plurality of sub-blocks of the current block), filtering is performed on the reference pixel, otherwise, the reference pixel Filtering may not be performed.
  • the intra prediction mode of the current block is the non-directional mode or the predetermined directional mode
  • filtering may be performed on the reference pixel. Otherwise, filtering may not be performed on the reference pixel.
  • the non-directional mode may be a planar mode or a DC mode.
  • the filtering of the reference pixel may not be performed in the DC mode among the non-directional modes.
  • the directional mode may mean an intra prediction mode referring to integer pixels.
  • the directional mode is one of the intra prediction modes corresponding to the modes -14, -12, -10, -6, 2, 18, 34, 50, 66, 72, 78, and 80 shown in FIG. It may include at least one. However, the directional mode may be limited such that the horizontal mode and the vertical mode corresponding to the modes 18 and 50 are not included.
  • filtering may be performed based on a filter that is pre-defined in the encoding / decoding apparatus.
  • the tap number of the filter may be 1, 2, 3, 4, 5 or more.
  • the number of filter taps may be variably determined according to the position of the reference pixel. For example, a 1-tap filter may be applied to a reference pixel corresponding to at least one of the lowermost, uppermost, leftmost, or rightmost sides of the pixel line, and a 3-tap filter may be applied to the remaining reference pixels.
  • the filter intensity may be variably determined according to the position of the reference pixel.
  • a filter intensity of s1 may be applied to a reference pixel corresponding to at least one of the lowermost, uppermost, leftmost, and rightmost sides of the pixel line, and a filter intensity of s2 may be applied to the remaining reference pixels (s1 ⁇ ). s2).
  • the filter strength may be signaled in the encoding apparatus or may be determined based on the above-described encoding parameter.
  • the filter may be applied to the current reference pixel and (n-1) peripheral reference pixels.
  • the peripheral reference pixel may mean a pixel located in at least one direction of the top, bottom, left side, or right side of the current reference pixel.
  • the peripheral reference pixel may belong to the same pixel line as the current reference pixel, and a part of the peripheral reference pixel may belong to a pixel line different from the current reference pixel.
  • the peripheral reference pixel when the current reference pixel is located on the left side of the current block, the peripheral reference pixel may be a pixel adjacent in at least one direction of the top or bottom of the current reference pixel. Alternatively, when the current reference pixel is located at the top of the current block, the peripheral reference pixel may be a pixel adjacent in at least one of the left side and the right side of the current reference pixel. Alternatively, when the current reference pixel is located at the upper left end of the current block, the peripheral reference pixel may be a pixel adjacent in at least one of the lower side and the right side of the current reference pixel.
  • the ratio between the coefficients of the filter may be [1: 2: 1], [1: 3: 1] or [1: 4: 1].
  • the prediction block generator may generate a prediction block according to at least one prediction mode, and use a reference pixel based on the intra prediction mode.
  • the reference pixel may be used in a method such as extrapolation (directional mode) according to a prediction mode, and may be used in a method such as interpolation or average (DC) or copy (non-directional mode).
  • the current block may use a filtered reference pixel or may use an unfiltered reference pixel.
  • FIG. 13 is a diagram illustrating a block adjacent to a current block in relation to prediction block generation.
  • the mode between horizontal and some diagonal modes is the lower left + left block (Ref_BL, Ref_L in FIG. 13), the horizontal mode is the left block, horizontal
  • the mode between and vertical is left + left + top block (Ref_L, Ref_TL, Ref_T in FIG. 13)
  • vertical mode is upper block (Ref_L in FIG. 13)
  • vertical and some diagonal modes are Diagonal down left.
  • the mode between the < RTI ID 0.0 > is < / RTI >
  • reference pixels (Ref_BL, Ref_L, Ref_TL, Ref_T, and Ref_TR) of the left and upper blocks (Ref_L and Ref_T in FIG. 13) or the lower and left, left and upper and upper and right blocks may be used.
  • a restored block of another color space (not shown in FIG. 12 but referred to as Ref_Col in the present invention.
  • a collocated reference meaning a block of another space at the same time) May be used as a reference pixel.
  • Reference pixels used for intra prediction may be classified into a plurality of concepts.
  • a reference pixel used for intra prediction may be divided into a first reference pixel and a second reference pixel, and the first reference pixel may be a pixel directly used to generate a prediction value of the current block, or see a second reference pixel.
  • the pixel may be a pixel used indirectly to generate a prediction value of the current block.
  • the first reference pixel may be a pixel used to generate predictive values of all pixels of the current block
  • the second reference pixel may be a pixel used to generate predictive values of some pixels of the current block.
  • the first reference pixel may be a pixel used to generate the first prediction value of the current block
  • the second reference pixel may be a pixel used to generate the second prediction value of the current block
  • the first reference pixel may be ( Unconditionally) may be a pixel located in the region located at the start point of the prediction direction of the current block
  • the second reference pixel may be a pixel not located at the start point of the (just) prediction direction of the current block.
  • reference pixels may be distinguished through various definitions, some definitions may not be distinguished according to prediction modes. That is, it should be noted that the definition used for identifying the reference pixel may vary depending on the prediction mode.
  • the reference pixel described through the above example may be the first reference pixel, and additionally, the second reference pixel may be involved in generating the prediction block.
  • Some diagonal modes (Diagonal up right; horizontal but not diagonal) include upper left + upper + upper right block (Ref_TL, Ref_T, Ref_TR in FIG. 13) and horizontal mode upper left + upper + upper right block (in FIG. 13).
  • the vertical mode is the upper left + left + lower left block (Ref_TL, Ref_L, Ref_BL in Figure 13), the mode between the vertical and some diagonal modes (Diagonal down left (excluding vertical but not diagonal))
  • Reference pixels of the + left + bottom blocks (Ref_TL, Ref_L, Ref_BL in FIG. 13) may be used.
  • the reference pixel may be used as the second reference pixel.
  • the prediction block may be generated using the first reference pixel or the first + second reference pixel in the non-directional mode and the color copy mode.
  • the second reference pixel may be considered to include not only the pixel in which the sub / decoding is completed, but also the pixel in the current block (the prediction pixel in this example). That is, the first predictive value may be a pixel used to generate the second predictive value.
  • a description will be mainly given of an example in which a pixel having been decoded / decoded is regarded as a second reference pixel, but is not limited thereto, and an example of a modification that uses a pixel having no decoded / decoded (prediction pixel in this example) also It may be possible.
  • the generation or correction of the prediction block using the plurality of reference pixels may be performed for the purpose of compensating for the disadvantages of the existing prediction mode.
  • the directional mode is a mode used for the purpose of predicting the directionality of the block using some reference pixels (the first reference pixel), but may not accurately reflect the change in the block, which may cause the accuracy of the prediction to Reduced cases may occur.
  • the accuracy of the prediction may be increased when the additional reference pixel (second reference pixel) is used to generate or correct the prediction block.
  • the setting for generating the predictive block using the additional reference pixels can be explicitly determined or implicitly set.
  • Units in the explicit case may include a video, a sequence, a picture, a slice, a tile, and the like.
  • the case of implicit processing will be described, but the present invention is not limited thereto, and examples of other modifications (explicit or mixed use) may be possible.
  • the prediction block may be generated in various ways.
  • the prediction method may be determined according to the position of the reference pixel used in the prediction mode.
  • the prediction method may be determined according to the pixel position in the block.
  • the prediction block is generated in the horizontal direction by using (eg, extrapolation) the nearest pixel (1300 in FIG. 13) of the block. can do.
  • a prediction block is generated (or corrected.
  • the generation is related to the final predicted value by using a reference pixel adjacent to the current block corresponding to the horizontal direction (Ref_T in FIG. 13). May not).
  • the prediction value may be corrected using the nearest pixel of the corresponding block (1310 in FIG. 13. Additional 1320 and 1330 may also be considered), and the degree of change or gradient information of the pixels may be adjusted (eg, The degree of gradient or gradient information such as R0-T0, T0-TL, T2-TL, T2-T0, and T2-T1 may be reflected in the correction process.
  • the pixel to be corrected may be all pixels in the current block or may be determined in part (for example, in a unit of a single pixel having no specific shape or at an irregular position and having a predetermined shape such as a line as described below). For example, the description will be made on the assumption that the pixel unit of a line unit will be described).
  • the corrected pixel is limited to some pixels, it may be determined in at least one line unit corresponding to the prediction mode direction.
  • the pixels corresponding to a to d may be included in the correction target, and the pixels corresponding to e to h may be included in the correction target.
  • the correction information obtained from the adjacent pixels of the block may be equally applied regardless of the line position or may be differently applied in units of lines, and as the distance from the adjacent pixel increases, the correction information is applied less (eg, For example, L1-TL, L0-TL, etc. may be set to a large division value according to the distance.
  • the pixels included in the object to be corrected may have only one setting in one image or may be adaptively determined according to various sub / decoding elements.
  • the pixel to be corrected may be determined according to the size of the block. Correction is not performed on any lines in blocks smaller than 8 x 8, and correction can be performed on one pixel line in blocks larger than 8 x 8 and smaller than 32 x 32, and correction is performed on two pixel lines in blocks larger than 8 x 8. can do.
  • the definition of the block size range is derivable from the previous description of the invention.
  • the pixel to be corrected may be determined according to the shape of the block (for example, square, rectangular, in particular, a rectangular with a long width or a rectangular with a vertical length). For example, correction may be performed on two pixel lines (a through h in FIG. 13) for an 8 x 4 block, and correction may be performed on one pixel line (a through d in FIG. 13) for a 4 x 8 block. Can be done.
  • 8 x 4 if the horizontal mode is determined from the horizontally stretched block shape, the direction of the current block may be more dependent on the upper block, and in the 4 x 8 horizontal mode from the vertically stretched block shape. If it is determined that the current block may be due to the tendency that the direction of the current block may not be significantly dependent on the upper block. It may also be possible to reverse the above.
  • the pixel to be corrected may be determined according to the prediction mode.
  • a pixel line may be the correction target, and in other modes, the b pixel lines may be the correction target.
  • the pixel to be corrected is not in a rectangular shape, but in pixel units (for example, a to d, e, i, m). Can be specified. The detailed description follows in the examples described below.
  • an adaptive setting may be possible according to additional encoding / decoding elements.
  • the description has been focused on the limited case for the horizontal mode, but the present invention is not limited only to the above example and the same or similar setting may be applied to other modes. Can be.
  • the case as described above may be possible depending on the combination of a plurality of elements instead of one sub / decoding element.
  • the left block and the lower left block are used as reference pixels (the first reference pixel or the main reference pixel. Ref_L and Ref_BL in FIG. 13), the closest pixels (1300 and 1340 in FIG. 13) of the corresponding block are used. (Eg, extrapolation, etc.) to generate a prediction block in a diagonal direction.
  • the prediction block may be generated (or corrected) by using a reference pixel (a second reference pixel or an auxiliary reference pixel. Ref_T and Ref_TR in FIG. 13) adjacent to the current block existing at a position opposite to the diagonal direction.
  • the prediction value may be corrected using the nearest pixels of the corresponding block (1310 and 1330 in FIG. 13, and additionally 1320 may be considered), and the weighted average of the auxiliary reference pixel and the main reference pixel (for example, The weight may be obtained based on at least one of a distance difference between the x-axis and the y-axis of each of the predicted pixel and the primary reference pixel and the predicted pixel and the auxiliary reference pixel.
  • the secondary reference pixels may have the same weight or different weights between the secondary reference pixels, such as 12: 3: 1, 10: 4: 2, 8: 6: 2, etc.
  • the weights applied differently may be applied to the prediction. Tilt information in the current prediction mode direction Mana can be determined depending on whether the close, that is, the slope of the corresponding predicted pixel and each of the secondary reference pixels can be reflected in the correction process, such as the current through the gradient and the prediction mode to determine if any are close).
  • the filtering may be adaptively determined according to only one setting in one image or various encoding / decoding elements.
  • the pixels to be filtered may be determined according to the position of the pixel to be corrected. If the prediction mode is diagonal mode (mode 2 in this example) and the pixel to be corrected is c, it is predicted using L3 (first reference pixel in this example), and T3 (second reference pixel in this example) Can be calibrated using. That is, it may be the case that one first reference pixel and one second reference pixel are used for one pixel prediction.
  • L1 * (or L2 * obtained by interpolating a fractional pixel between L1 and L2).
  • Reference pixel and may be corrected using T2 (second reference pixel in this example) or may be corrected using T3.
  • it may be corrected using T2 and T3 or corrected using T2 * (or T3 *) obtained by interpolating a fractional pixel between T2 and T3 obtained based on the directionality of the prediction mode. That is, one first reference pixel (assuming L1 * in this example. For example, a pixel used directly may be viewed as two pixels when viewed as L1 and L2.) Or interpolating L1 *. Can be viewed as two or more pixels, depending on the filter used for this purpose, and two second reference pixels (assuming T2 and T3 in this example, can be viewed as one pixel for L1 *). Can be.
  • At least one first reference pixel and at least one second reference pixel may be used for one pixel prediction, which may be determined according to the prediction mode and the position of the prediction pixel.
  • the corrected pixel may be determined in units of at least one horizontal or vertical line according to the intra prediction mode direction. For example, a pixel corresponding to a, e, i, m or a pixel corresponding to a to d may be included in the correction target, and additionally, a pixel corresponding to b, f, j, n or e to h The pixel may be included in the correction target. In some diagonal up right, pixels in a horizontal line unit, and in some diagonal down left, pixels in a vertical line unit may be corrected, but is not limited thereto.
  • an adaptive setting may be possible according to additional sub / decoding elements.
  • the description has been focused on the limited case for the diagonal up (Diagonal up right). This can also be applied in other modes.
  • the case as described above may be possible depending on the combination of a plurality of elements instead of one sub / decoding element.
  • the left block, the upper left block, and the upper block are used as reference pixels (the first reference pixel or the main reference pixel. Ref_L, Ref_TL, and Ref_T in FIG. 13), the closest pixel (in FIG. 13) of the corresponding block is used. 1300, 1310, and 1320 may be used (eg, extrapolated, etc.) to generate a prediction block in a diagonal direction.
  • the prediction block may be utilized by utilizing a reference pixel adjacent to the current block existing at a position corresponding to the diagonal direction (a second reference pixel or an auxiliary reference pixel.
  • a second reference pixel or an auxiliary reference pixel In FIG. 13, Ref_L, Ref_TL, and Ref_T. Positions are the same as the main reference pixel). Can be generated (or corrected).
  • the prediction value may be corrected using a pixel other than the nearest pixel of the block (a pixel located at the left of 1300 in FIG. 13, a pixel located at the left, an upper, an upper left of 1320, or a pixel positioned at an upper portion of 1310 in FIG. 13).
  • a weighted average of the auxiliary reference pixel and the main reference pixel (for example, a ratio of weights applied to the main reference pixel and the auxiliary reference pixel may be 7: 1 to 4: 4). For example, if two or more weights have the same weight on the auxiliary reference pixel as 14: 1: 1, 12: 2: 2, 10: 3: 3, 8: 4: 4, etc., or 12: 3: 1, 10: May have different weights between the auxiliary reference pixels, such as 4: 2, 8: 6: 2, etc. In this case, differently applied weights may be determined depending on whether they are close to the main reference pixel) or linear extrapolation. Can be reflected in the process.
  • the corrected pixel may be determined in units of horizontal or vertical lines adjacent to the reference pixel used in the prediction mode. At this time, the horizontal and vertical lines may be considered simultaneously and may allow overlap. For example, a pixel corresponding to a to d and a pixel corresponding to a, e, i, and m (a overlaps) may be included in the correction target. In addition, pixels corresponding to e to h and pixels corresponding to b, f, j, and n (a, b, e, f overlap) may be included in the correction target.
  • the closest pixel of the block (assuming 1300 and 1310 pixels in FIG. 13) is used. (Eg, average, etc.) to generate predictive blocks.
  • the adjacent pixel (the second reference pixel or the auxiliary reference pixel of the reference pixel. Ref_L and Ref_T in FIG. 13.
  • the position is the same as the main reference pixel or includes a pixel located next to and including the main reference pixel.
  • a prediction block can be generated (or corrected).
  • the prediction value may be corrected by using a position pixel that is the same as or similar to that of the main reference pixel of the block, and the weighted average of the auxiliary reference pixel and the main reference pixel (for example, the main reference pixel and the auxiliary reference pixel) may be corrected. Examples of the applied weight ratio may include 15: 1 to 8: 8, etc.
  • weights include 14: 1: 1, 12: 2: 2, 10: 3: 3, Such as 8: 4: 4, etc., or may have different weights between the auxiliary reference pixels, such as 12: 3: 1, 10: 4: 2, 8: 6: 2, etc.). It may be reflected in the correction process.
  • the filtering may be adaptively determined according to only one setting in one image or various encoding / decoding elements.
  • the filter may be determined according to the size of the block for the case that is adaptively determined. Pixels located at the top left, top, and left ends of the current block (in this example, pixels located at the top left are pixels on the left and top of the pixel; pixels located at the top are pixels above the pixel; Assuming that filtering is applied to the pixel to the left of the pixel), a block smaller than 16 x 16 can follow some filtering settings (filtering with a weighting ratio of 8: 4: 4, 12: 4 in this example), and Blocks greater than x 16 may follow some filtering settings (in this example, filtering with a weight ratio of 10: 3: 3, 14: 2).
  • the filter may be determined according to the shape of the block. For example, for a 16 x 8 block, the pixel at the top of the current block assumes some filtering settings (in this example, filtering is applied to the pixels above, to the left, above, and to the right of that pixel. In this example, filtering may be performed using a weighting ratio of 10: 2: 2: 2, and pixels located at the left end of the current block may be partially filtered (in this example, to the left pixel of the corresponding pixel).
  • filtering with a weighting ratio of 12: 4. This may be an example applied under the assumption that the block may be dependent on a plurality of pixels on the block in the form of a block elongated horizontally.
  • the opposite setting may be possible.
  • the pixel to be corrected may be determined in units of horizontal or vertical lines adjacent to the reference pixel used in the prediction mode. At this time, the horizontal and vertical lines may be considered simultaneously and may allow overlap. For example, a pixel corresponding to a to d and a pixel corresponding to a, e, i, and m (a overlaps) may be included in the correction target. In addition, pixels corresponding to e to h and pixels corresponding to b, f, j, and n (a, b, e, f overlap) may be included in the correction target.
  • an adaptive setting may be possible according to additional sub / decoding elements, and the above description has been described based on the limited case for the non-directional mode, but the present invention is not limited only to the above example, and the same or similar setting may be used in other modes. Can be applied. In addition, the case as described above may be possible depending on the combination of a plurality of elements instead of one sub / decoding element.
  • the prediction block is generated by a method different from the prediction method of the conventional prediction mode, but the prediction block may be generated (or corrected) using the same or similar reference pixels.
  • the content of obtaining the prediction block is omitted since it can be derived through the above-described example and the following example.
  • the prediction block may be generated by using (eg, copying) a block corresponding to a color space different from the current block as the reference pixel (the first reference pixel or the main reference pixel).
  • the prediction block may be generated (or corrected) by using a reference pixel (a second reference pixel or an auxiliary reference pixel of the block adjacent to the current block.
  • a reference pixel a second reference pixel or an auxiliary reference pixel of the block adjacent to the current block.
  • the prediction value may be corrected using the nearest pixel (assuming 1300 and 1310 in FIG. 13) of the corresponding block, and the weighted average of the auxiliary reference pixel and the primary reference pixel (eg, primary Examples of the weight ratio applied to the reference pixel and the auxiliary reference pixel may be 15: 1 to 8: 8, etc.
  • auxiliary reference pixels examples of the weight are 14: 1: 1, 12: 2: 2
  • Equal weights to the auxiliary reference pixels such as 10: 3: 3, 8: 4: 4, or other weights between the auxiliary reference pixels, such as 12: 3: 1, 10: 4: 2, 8: 6: 2, etc. May be reflected) in the correction process.
  • pixels of a block adjacent to a block acquired in another color space may be used to generate (or correct) a prediction block.
  • the pixel to be corrected and its surrounding pixels for example, a first reference pixel in a different color space or a first reference pixel and a second reference pixel, that is, a first weight to be corrected when a weighted average or the like is applied in a block).
  • a reference pixel and a first reference pixel to which filtering is applied, and a first reference pixel to be corrected at a block boundary and a first reference pixel and a second reference pixel to which filtering is applied) are applied to the correction. Can be reflected in the process.
  • This example can be described as a case of obtaining a prediction value of the current block in another color space and applying filtering thereafter, but obtaining a prediction value of the current block that has already been filtered in the corresponding color space before obtaining the prediction value. You may. In this case, it should be noted that there is only a difference in order from the above example, and the objects to which the filtering is applied are the same.
  • the filtering may be adaptively determined according to only one setting in one image or various encoding / decoding elements.
  • a setting for filtering may be determined according to a prediction mode for an adaptively determined case.
  • it may have an adaptive filtering setting according to the detailed color copy mode of the color copy mode.
  • some filtering settings ⁇ 1 > in some color copy modes (in this example, when one correlation information set ⁇ a and b> is obtained in an adjacent area of a block corresponding to a different color space from an adjacent area of the current block), some filtering settings ⁇ 1 >, and in some color copy modes (in this example, to obtain multiple sets of correlation information compared to the above modes, i.e. a1 and b1, a2 and b2), some filtering settings ⁇ 2> may be followed. have.
  • filtering setting whether filtering is applied may be determined. For example, filtering may or may not be applied depending on the filtering settings ⁇ 1>. Alternatively, A filter can be used ⁇ 1> or B filter can be used ⁇ 2>. Alternatively, filtering may be applied to all pixels on the left side and the upper side of the current block, or filtering may be applied to some pixels on the left side and the upper side.
  • the pixel to be corrected may be determined in units of horizontal or vertical lines adjacent to a reference pixel (in this example, an auxiliary reference pixel, which is different from the previous example). At this time, the horizontal and vertical lines may be considered simultaneously and may allow overlap.
  • a pixel corresponding to a to d and a pixel corresponding to a, e, i, and m may be included in the correction target.
  • pixels corresponding to e to h and pixels corresponding to b, f, j, and n may be included in the correction target.
  • the primary reference pixel used to generate the prediction block may be obtained from another color space
  • the auxiliary reference pixel used to correct the prediction block may be obtained from a block adjacent to the current block of the current color space. It can also be obtained from blocks adjacent to corresponding blocks in other color spaces. It may also be obtained from some pixels of the prediction block of the current block. That is, some pixels in the prediction block may be used to correct some pixels in the prediction block.
  • an adaptive setting may be possible according to additional sub / decoding elements, and the above description has been described based on the limited case for the non-directional mode, but the present invention is not limited only to the above example, and the same or similar setting may be used in other modes. Can be applied. In addition, the case as described above may be possible depending on the combination of a plurality of elements instead of one sub / decoding element.
  • This example obtains the prediction block of the current block using the correlation between the color spaces, but the block used to obtain the correlation is obtained from the adjacent area of the corresponding block of the other color space and the adjacent area of the current block. Therefore, the block boundary may be understood as an example of applying filtering.
  • Generating a prediction block using a plurality of reference pixels may be possible in various cases depending on the sub / decoding settings. In detail, whether to support generating or correcting the prediction block using the second reference pixel may be determined according to the sub / decoding setting.
  • whether additional pixels are used in the prediction process may be determined implicitly or explicitly.
  • the information may be included in units of a video, a sequence, a picture, a slice, a tile, and a block.
  • whether additional pixels are used in the prediction process may be applied to all prediction modes or may be applied to some prediction modes.
  • the some prediction modes may be at least one of horizontal, vertical, some diagonal modes, non-directional modes, color copy modes, and the like.
  • whether additional pixels are used in the prediction process may be applied to all blocks or may be applied to some blocks.
  • some blocks may be defined according to the size, shape, etc. of the block, the corresponding block is M x N (for example, M and N have a length of 8, 16, 32, 64, etc., if the square is 8 x 8, 16 x 16, 32 x 32, 64 x 64, etc.
  • the shape may be 2: 1 rectangle, 4: 1 rectangle, and the like.
  • whether to use additional pixels in the prediction process may be determined according to some sub / decoding settings.
  • the sub / decoding setting may be constrained_intra_pred_flag, and additional reference pixels may be limitedly used in the prediction process according to the flag.
  • the second reference pixel is predicted. It can be limited to use in the process. Alternatively, the second reference pixel may be used in the prediction process regardless of the flag.
  • a case of having one setting for generating or correcting a prediction block using a plurality of reference pixels in each prediction mode has been described.
  • a plurality of settings may be provided for each prediction mode. That is, a plurality of candidate groups for setting filtering may be configured, and selection information may be generated for this.
  • information about whether to perform filtering may be explicitly or implicitly processed, and when filtering is performed, information about filtering selection information may be explicitly or implicitly processed.
  • the information may be included in a unit of a video, a sequence, a picture, a slice, a tile, and a block.
  • the generated prediction block may be corrected.
  • a process of correcting the prediction block will be described.
  • the correction process may be performed based on a predetermined reference pixel and a weight.
  • the reference pixel and the weight may be determined depending on the position of a pixel (hereinafter, referred to as a current pixel) in the current block to be corrected.
  • the reference pixel and the weight may be determined depending on the intra prediction mode of the current block.
  • the reference pixels refL and refT of the current pixel may belong to the first pixel line adjacent to the current block and may be located on the same horizontal / vertical line as the current pixel.
  • the weight may include at least one of the first weight wL in the x-axis direction, the second weight wT in the y-axis direction, or the third weight wTL in the diagonal direction.
  • the first weight may mean a weight applied to the left reference pixel
  • the second weight may mean a weight applied to the upper reference pixel
  • the third weight may mean a weight applied to the upper left reference pixel.
  • the first and second weights may be determined based on position information of the current pixel and a predetermined scaling factor nScale.
  • the scaling factor may be determined based on the width W and the height H of the current block.
  • the first weight wL [x] of the current pixel predSample [x] [y] is determined as (32 >> ((x ⁇ 1) >> nScale))
  • the second weight ( wT [x]) may be determined as (32 >> ((y ⁇ 1) >> nScale)).
  • the third weight wTL [x] [y] may be determined as ((wL [x] >> 4) + (wT [y] >> 4)).
  • the third weight may be determined to be zero.
  • the scaling factor may be set to ((Log2 (nTbW) + Log2 (nTbH)-2) >> 2).
  • the reference pixels refL and refT of the current pixel belong to the first pixel line adjacent to the current block and may be located on the same horizontal / vertical line as the current pixel. have.
  • the first weight wL [x] of the current pixel predSample [x] [y] is determined as (32 >> ((x ⁇ 1) >> nScale)) and the second weight (wT [y]) may be determined as 0, and the third weight wTL [x] [y] may be determined to be equal to the first weight.
  • the first weight wL [x] of the current pixel predSample [x] [y] is determined to be 0, and the second weight wT [y] is (32 >> (( y ⁇ 1) >> nScale)), and the third weight wTL [x] [y] may be determined to be equal to the second weight.
  • the reference pixels refL and refT of the current pixel belong to the first pixel line adjacent to the current block and may be located on the same diagonal line as the current pixel.
  • the diagonal line has the same angle as the intra prediction mode of the current block.
  • the diagonal line may mean a diagonal line in the upper left direction at the lower left end, or may mean a diagonal line in the lower right direction at the upper left end.
  • the first weight wL [x] of the current pixel predSample [x] [y] is determined as (32 >> ((x ⁇ 1) >> nScale)), and the second weight wT [ y]) may be determined as (32 >> ((y ⁇ 1) >> nScale)), and the third weight wTL [x] [y] may be determined as 0.
  • the reference pixels refL and refT of the current pixel belong to the first pixel line adjacent to the current block and may be located on the same diagonal line as the current pixel. have.
  • the diagonal line has the same angle as the intra prediction mode of the current block.
  • the reference pixel may be limited so that only one of the left or top reference pixels of the current block is used.
  • the first weight wL [x] of the current pixel predSample [x] [y] is determined to be 0, and the second weight wT [y] is (32 >> ((y ⁇ 1) >> nScale)), and the third weight wTL [x] [y] may be determined as 0.
  • the reference pixels refL and refT of the current pixel belong to the first pixel line adjacent to the current block and may be located on the same diagonal line as the current pixel. have.
  • the diagonal line has the same angle as the intra prediction mode of the current block.
  • the reference pixel may be limited so that only one of the left or top reference pixels of the current block is used.
  • the first weight wL [x] of the current pixel predSample [x] [y] is determined as (32 >> ((x ⁇ 1) >> nScale)) and the second weight wT [y] ) May be determined as 0, and the third weight wTL [x] [y] may be determined as 0.
  • the current pixels predSamples [x] [y] may be corrected as in Equation 1 below.
  • predSamples [x] [y] clip1Cmp ((refL [x] [y] * wL [x] + refT [x] [y] * wT [y]-p [-1] [-1] * wTL [x ] [y] + (64-wL [x]-wT [y] + wTL [x] [y]) * predSamples [x] [y] + 32) >> 6)
  • the above-described correction process may be performed only when the current block does not perform intra prediction on a sub-block basis.
  • the correction process may be performed only when the reference pixel of the current block is the first pixel line.
  • the correction process may be performed only when the intra prediction mode of the current block corresponds to a specific mode.
  • the specific mode may include at least one of a non-directional mode, a vertical mode, a horizontal mode, a mode smaller than the predetermined first threshold mode, and a mode larger than the predetermined second threshold mode.
  • the first threshold mode may be 8, 9, 10, 11, or 12
  • the second threshold mode may be 56, 57, 58, 59, or 60.
  • the prediction mode determiner performs a process for selecting an optimal mode among a plurality of prediction mode candidate groups.
  • block distortion eg, Distortion of current and reconstructed blocks.
  • a mode that is optimal in terms of coding cost may be determined using a sum-of-absolute difference (SAD), a sum of square difference (SSD), etc., and a rate-distortion technique that takes into account the amount of bits generated according to a corresponding mode.
  • the prediction block generated based on the prediction mode determined through the above process may be transmitted to the subtractor and the adder.
  • the prediction mode encoder may encode the prediction mode selected by the prediction mode determiner.
  • index information corresponding to the prediction mode may be encoded, or the information about the prediction mode may be predicted. That is, the former means a method of encoding the prediction mode as it is without prediction, and the latter means a method of encoding the mode prediction information and the information obtained based on the prediction mode.
  • the former is an example that can be applied to the chrominance component, the latter in the luminance component, it is not limited to this may also be possible in other cases.
  • the prediction value (or prediction information) of the prediction mode may be referred to as Most Probable Mode (MPM).
  • MPM Most Probable Mode
  • a prediction mode of a preset prediction mode eg, DC, planar, vertical, horizontal, diagonal mode, etc.
  • spatially adjacent blocks eg, left, top, left top, right top, bottom left block, etc.
  • the diagonal mode may mean Diagonal up right, Diagonal down right, Diagonal down left, and may correspond to modes 2, 34, and 66 of FIG. 9.
  • a mode derived from a mode previously included in the MPM candidate group may be configured as the MPM candidate group.
  • a mode in which the mode interval has a difference of a for example, a is a non-zero integer such as 1, -1, 2, -2, etc.
  • Fig. 9 In the case where the mode 10 is included in, the mode corresponding to the mode 9, 11, 8, 12, etc. are derived) may be newly (or additionally) included in the MPM candidate group.
  • the above example may correspond to a case in which the MPM candidate group is composed of a plurality of modes, and the MPM candidate group (or the number of MPM candidate groups) may be set to a sub / decoding setting (eg, prediction mode candidate group, image type, block size, block type, etc.). It is determined according to) and may include at least one mode.
  • a sub / decoding setting eg, prediction mode candidate group, image type, block size, block type, etc.
  • the order of prediction modes included in the MPM candidate group may be determined according to the priority, and when the number of MPM candidate groups is filled according to the priority, the MPM candidate group may be completed.
  • priorities may be determined in order of a prediction mode of a spatially adjacent block, a preset prediction mode, and a mode derived from a prediction mode first included in the MPM candidate group, but other modifications are also possible.
  • information eg, most_probable_mode_flag
  • MPM index information (eg, mpm_idx) may be additionally generated according to the configuration of the MPM. For example, when the MPM is configured with one prediction mode, no additional MPM index information is generated. When the MPM is configured with a plurality of prediction modes, the MPM candidate group may generate index information corresponding to the prediction mode of the current block. have.
  • the non-MPM index information corresponding to the prediction mode of the current block in the prediction mode candidate group (or non-MPM candidate group) except for the MPM candidate group in the prediction mode candidate group may be generated, which may be an example of the case where the non-MPM is configured as one group.
  • a non-MPM consists of groups A and B (where A is m, B is n, and non-MPM is m + n prediction modes, assuming that n is greater than m.
  • A is a directional mode).
  • the non-MPM may be configured with at least one prediction mode candidate group (or group), and the non-MPM configuration may be determined according to the prediction mode candidate group. For example, when the prediction mode candidate group is 35 or less, it may be one, or in other cases, two or more.
  • the non-MPM When the non-MPM is composed of a plurality of groups as in the above example, it may be supported for the purpose of reducing the mode bit amount when the number of prediction modes is large and the prediction mode is not predicted by the MPM.
  • a binarization table applied to each prediction mode candidate group (eg, the MPM candidate group, the non-MPM candidate group, etc.) may be generated separately.
  • the binarization method applied to each candidate group may be applied individually.
  • the prediction related information generated by the prediction mode encoder may be transmitted to the encoder and may be included in the bitstream.
  • i quad tree splitting
  • ii represents horizontal splitting among binary tree splitting
  • iii shows vertical splitting among binary tree splitting.
  • a to C means the first block (pre-division block, for example, Coding Tree Unit), and the number after the above letter means the number of each partition when partitioning is performed.
  • the upper left, upper right, lower left, and lower right blocks are assigned with numbers of 0 to 3, respectively, and in the binary tree, the left and upper blocks are assigned with numbers of 0 and 1, respectively.
  • the segmentation state or information performed to acquire a corresponding block may be checked through letters and numbers obtained through a segmentation process.
  • block A00 performs quad tree partitioning on initial block A, and quadrature is obtained on quadrature A0, which is the upper left block (0 is added to A), among four blocks obtained. It may be the upper left block (0 is added to A0) of the four blocks.
  • block B10 performs horizontal partitioning of the initial block B during binary tree partitioning, and horizontally partitions B1, which is the lower block (1 is added to B), of the two blocks obtained as a result. It may be an upper block (0 is added to B1) of two blocks obtained by performing the operation.
  • neighboring blocks may include A30, A12, and A13, and A30 may confirm (A3) that A30 belongs to the same block in the previous division step. have.
  • A12 and A13 in the division step of the previous step A3, it belongs to the other block A1, and it can be confirmed that it belongs to the same block A only in the previous step.
  • 15 is an example of a plurality of tree-based block partitions according to an embodiment of the present invention.
  • the segmentation state or information performed to acquire a corresponding block may be checked through letters and numbers obtained through a segmentation process.
  • each character does not mean an initial block, but represents information about the division with numbers.
  • an upper right block A1 is obtained when quad tree splitting is performed in an initial block
  • an upper right block A1 to A1 is obtained when quad tree splitting is performed in block A1
  • block A1A1 is obtained.
  • a lower right block A3 is obtained when quad tree splitting is performed in an initial block, and a lower block A1 and B1 are obtained when horizontal splitting is performed during binary tree splitting in block A3.
  • vertical splitting is performed during binary tree splitting in A3B1, this means a right block (A3B1 to C1).
  • the partitioning information may also identify relationship information between the current block and the neighboring block, such as which partitioning step the neighboring block belongs to according to the partitioning step of each block.
  • each block identifies partition information, and various pieces of information and combinations of information for identifying partition information (for example, partition flag, depth information, maximum depth information, range of blocks, etc.) ), The partition information of each block can be confirmed, and thus the relationship between blocks can be confirmed.
  • partition information for example, partition flag, depth information, maximum depth information, range of blocks, etc.
  • 16 is an exemplary diagram illustrating various cases of block division.
  • Block division may be performed for the purpose of efficiently partitioning regions according to characteristics of an image.
  • splitting may be difficult by properly reflecting characteristics of an image.
  • a to e may be a case where only quad tree split is supported
  • f to j may be a case where only binary tree split is supported.
  • the partition partition according to the quad tree partition is referred to as UL, UR, DL, and DR, and the binary tree partition will be described based on this.
  • FIG. 16A illustrates a texture in which quad tree partitioning provides optimal performance.
  • quadrature partitioning may perform four divisions through one division (Div_HV) of the quad tree to perform encoding / decoding for each block unit.
  • binary tree partitioning is applied as shown in FIG. 16F, three divisions (two Div_Vs and one Div_H) may be required as compared to the quad tree.
  • the texture is divided into upper and lower regions of the block.
  • Div_HV the Quart tree split
  • the binary tree split is also performed in FIG. 16G.
  • the division of times Div_H may be performed.
  • the quad tree split flag is 1 bit and the binary tree split is more than 2 bits
  • the quad tree may be considered to be efficient in terms of flag bits, but the information for expressing the encoding / decoding information ⁇ for example, texture information ( Information for expressing a texture (residual signal, coding coefficients, information indicating the presence or absence of coding coefficients, etc.)), prediction information ⁇ e.g., Intra prediction prediction information, inter prediction prediction information>, transformation information ⁇ e.g. , Transformation type information, transformation partition information, etc.> are generated in each block unit. In this case, since the regions having similar texture information may be divided and the corresponding information may be duplicated, it is more efficient than binary tree partitioning. This may not be possible.
  • the left block is a block having characteristics similar to the current block
  • the upper block is a block having characteristics different from the current block. Although it has similar characteristics to some blocks (left block in this example), it may be a case of splitting due to the characteristics of quad tree splitting.
  • Intra prediction mode e.g., the most probable mode, that is, information predicting the mode of the current block from neighboring blocks for the purpose of reducing the bit amount of the prediction mode of the current block
  • motion information prediction e.g., skip mode, merge mode, information for reducing mode bits such as a contention mode
  • the information of the left block is efficient for reference. That is, when the encoding information (for example, intra prediction information, inter prediction prediction information, filter information, coefficient information, etc.) of the current block is referred to from one of the left or upper blocks, relatively accurate information (left block in this example) See.
  • the current block has similar characteristics in the upper block among the left or upper blocks, so that encoding performance can be improved by referring to encoding information from the corresponding block (upper block in this example).
  • quad-tree partitioning has a characteristic in which a block (x) is similar to a neighboring block (y) with the same block before splitting. While a binary tree may or may not have other characteristics, most of the binary trees may be characterized in that a block (x) and a block before splitting have different characteristics from the same neighboring block (y). In other words, if the characteristics are similar, the block may not be divided, but the block may be determined before the split, but may be divided because of different characteristics.
  • the lower right block x and the lower left block y in FIG. 16i may have such a relationship. That is, the upper block may be partitioned because the image characteristics are similar, and the block is partitioned without being divided, and the lower block is divided into lower left and lower right blocks because the image characteristics are different.
  • the quad-tree splitting characteristic may be similar to the current block due to the quad-tree characteristic unconditionally split by 1/2 horizontally and vertically. It may be a different characteristic.
  • the parent block is the same as the current block among neighboring blocks adjacent to the current block, it can be divided horizontally or vertically according to the image characteristic, so that the partition is split because it is another characteristic. can do.
  • Neighboring blocks (assuming left and top in this example, which are the same as the current block and the pre-division block) may be similar to or different from the current block.
  • a neighboring block in which the current block and the pre-division block are not the same may be similar to or different from the current block.
  • Neighboring blocks (the maximum number of candidates is one because in this example are left or upper. Binary in this example) may have different characteristics.
  • a neighboring block in which the current block and the pre-division block are not the same may be similar to or different from the current block.
  • the neighboring block may be classified into a case in which the characteristic of the current block may be similar to or different from that of the current block (1) and a case in which the characteristic of the neighboring block may be different (2).
  • the A0 block (left block) among the adjacent blocks is classified as a general case because the before-division block (A1) of the A1A2 block is different from the before-division block (initial block) of the A0 block (that is, If you do not know whether the characteristics are similar or different from the current block).
  • the adjacent A1A0 block (upper block) is the same as the pre-division block A1 of the A1A2 block and the predivision block A1 of the A1A0 block, so the division scheme is confirmed. At this time, since it is a quad tree partition (A), it is classified as a general case.
  • the A2B0B0 block (upper block) among the adjacent blocks is the same as the pre-division block A2B0 of the A2B0B1 block and the predivision block A2B0B1 of the A2B0B1 block, so the division scheme is checked. At this time, since the binary tree partition (B), it is classified as an exceptional case.
  • the A3B0 block (the upper right block in this example) is classified as a general case because the before-division block (A3B1) of the A3B1C0 block is different from the before-division block (A3) of the A3B0 block. Can be.
  • neighboring blocks can be classified into general cases and exceptional cases.
  • the encoding information of the neighboring block may or may not be used as the encoding information of the current block.
  • exceptional cases the encoding information of the neighboring block may not be used as the encoding information of the current block. It is a judged state.
  • the above example may be applied to the setting of the intra prediction mode prediction candidate group (related to most probable mode) of the present invention.
  • General prediction candidate settings eg, candidate composition preferences, etc.
  • exceptional prediction candidate settings can be supported, and candidates derived from that block can be deferred or excluded based on the state of adjacent blocks above. Can be.
  • an adjacent block to which the setting is applied may be limited to a spatial case (same space) or may be applicable to a case in which it is derived from another color space of the same image, such as a color copy mode. That is, the above setting may be made in consideration of the division state of the block derived through the color copy mode.
  • examples to be described later include sub / decoding settings (e.g., prediction candidate group setting, reference pixel setting, etc.) according to a relationship between blocks (relative relationship between a current block and another block is identified as block division information, etc. in the above example). ) May be an example of adaptively determining.
  • sub / decoding settings e.g., prediction candidate group setting, reference pixel setting, etc.
  • This example luminance component is explained under the assumption that a total of three candidates are composed of MPM candidate groups from adjacent blocks (left and top in this example) when there are 35 pre-defined intra prediction modes defined in the encoding / decoding apparatus.
  • a total of two candidates may be configured by adding one candidate to each of the left block L0 and the upper block T0. If the candidate group cannot be formed in each block, the candidate group can be filled with candidates such as DC, planar, vertical, horizontal, and diagonal modes. If two candidates are filled through the above process, the remaining one candidate may be filled in consideration of the number of cases.
  • candidate groups may be configured by adding planar, DC, vertical, horizontal, and diagonal modes.
  • an intra prediction mode candidate group (general case) may be configured.
  • the candidate group thus created is an example corresponding to a general case, and an adaptive intra prediction mode candidate group (exceptional case) may be configured according to adjacent blocks.
  • candidate groups derived from the block may be excluded. If the left block is marked as an exceptional state, the candidate group may be configured with the upper block and a preset prediction mode (for example, DC, planar, vertical, horizontal, diagonal, mode derived from the upper block, etc.).
  • a preset prediction mode for example, DC, planar, vertical, horizontal, diagonal, mode derived from the upper block, etc.
  • This example has five intra prediction modes (DC, planar, vertical, horizontal, and color modes in this example), and adaptively prioritized and sorted prediction modes are composed of candidate groups.
  • DC linear prediction modes
  • DC planar, vertical, horizontal, and color modes in this example
  • adaptively prioritized and sorted prediction modes are composed of candidate groups. The description will be given on the assumption that decoding is performed (that is, encoding / decoding without using MPM).
  • the priority given to the matching prediction mode is set to the preset prediction mode (for example, For example, diagonal mode, etc.) can be allocated, and if they do not match, the candidate group configuration is completed immediately.
  • the candidate group for the intra prediction mode may be configured.
  • the example thus made corresponds to a general case, and an adaptive candidate group may be configured according to a block that acquires a color mode.
  • a block corresponding to the current block is composed of one block (that is, an undivided state) among other color spaces in which the color mode is acquired, it may be referred to a general case. If it is divided into two states, it is assumed to be an exceptional case. As described above, it is different from the example of classifying according to whether the current block is the same as the parent block of the adjacent block, the partitioning method, etc., but if the corresponding blocks of different color spaces are composed of plural corresponding blocks, the characteristics of the current block may be different from those of the current block. This may be an example set under the assumption that it is higher. That is, it can be understood as an example in which the encoding / decoding setting is adaptively determined according to the relationship between blocks.
  • the prediction mode derived from the block may postpone the priority.
  • one of the other prediction modes (Planar, DC, vertical, horizontal) may be assigned to the high priority, and the lower priority may be assigned to the other prediction modes and color modes not included in the priority.
  • candidate group A may be used when there is a block marked as an exception state among adjacent blocks
  • candidate group B may be used when a block marked as an exception state exists.
  • the above classification is classified into two cases, but it can be understood that the intra-picture prediction candidate group configuration in units of blocks may be adaptive according to the presence of an exception state and the block position.
  • the above-described example assumes tree-based splitting among the splitting schemes, but is not limited thereto.
  • a block obtained by using at least one tree-based partitioning scheme is set as an encoding block, and prediction, transform, etc. are performed immediately without partitioning the prediction block, transform block, etc. into the corresponding block. It may be an example described under the assumption.
  • the coding block may be applicable to a case where the coding block is obtained by tree-based splitting and at least one prediction block is obtained based on the obtained coding block.
  • the coding block (2N x 2N) can be obtained by tree-based partitioning (quad tree in this example), and the prediction block is type-based partitioning (supportable candidate types in this example are 2N x 2N, 2N).
  • x N, N x 2N, N x N supportable candidate types in this example are 2N x 2N, 2N.
  • the above-described exception state or the like may be set among the prediction blocks. It may be possible.
  • g of FIG. 16 indicates that two prediction blocks (separated by thin solid lines) in the coding block (thick solid line) exist, the lower block has different characteristics from the upper block, and the encoding information of the upper block is not referred to or has priority. You can slow back.
  • the basic coding block shows an example of obtaining the coding block (hatched block. 2N x 2N) through quad tree-based partitioning, and the obtained coding block is type-based.
  • An example of splitting into at least one prediction block (2N ⁇ 2N, 2N ⁇ N, N ⁇ 2N, N ⁇ N) through splitting is shown.
  • the intra prediction mode candidate group setting for the case where the rectangular block is obtained (2N x N and N x 2N) will be described later.
  • FIG. 18 shows various examples of intra prediction mode candidate group setting of a block in which prediction information is generated (prediction block. 2N ⁇ N in this example).
  • This example (luminance component) will be described under the assumption that a total of six candidates are formed in the MPM candidate group from adjacent blocks (left, top, top left, top right, bottom left in this example) when there are 67 intra prediction modes.
  • four candidates can be configured in the order of L3-T3-B0-R0-TL, and two candidates can be configured in a preset mode (eg, Planar, DC). If the above configuration does not satisfy the maximum number (6 in this example), the prediction mode derived from the prediction mode included in the candidate group (for example, k_mode-2, k_mode-2, k_mode + 1, k_mode + 2, etc.), a preset mode (eg, vertical, horizontal, diagonal, etc.).
  • a preset mode eg, vertical, horizontal, diagonal, etc.
  • the candidate group priority is the order of the left-up-down-left-right-left-up block of the current block (in detail, below the left block and the right subblock of the upper block) in the case of spatially adjacent blocks.
  • the sequence is Planar-DC-Vertical-Horizontal-Diagonal mode.
  • the current block (2N x N. PU0) may configure candidate groups in the order of l1-t3-l2-tr-tl in the same manner as the candidate group setting of the above example. ).
  • an adjacent block of the current block may be a block (encoding block, that is, a prediction block in another coding block) that has already been encoded / decoded.
  • At least one intra prediction mode candidate group may be set.
  • a block adjacent to the current block is more likely to be similar to the characteristics of the current block, it may be advantageous to construct a candidate group from the block (1).
  • candidate groups (k can be derived from c7 or tr, etc.) can be configured in the order of l3-c7-bl-k-l1 as shown in b of FIG.
  • candidate groups (k can be derived from tr or the like) can be configured in the order of l3-bl-k-l1 as shown in FIG.
  • the difference between the two examples is whether the candidate group of the intra prediction mode of the upper block is included. That is, in the former case, the intra prediction mode of the upper block is included in the candidate group for the purpose of increasing the efficiency of the intra prediction mode encoding / decoding. In the latter case, the encoding / decoding is not yet completed for the purpose of parallel processing. Intra-prediction mode of the phase block, which may not be referred to because it may not have been referred to, was excluded from the candidate group.
  • 19 illustrates various examples of intra-picture prediction mode candidate group setting of a block in which prediction information is generated (in this example, prediction block. N ⁇ 2N).
  • This example (luminance component) will be described under the assumption that a total of six candidates are formed in the MPM candidate group from adjacent blocks (left, top, top left, top right, bottom left in this example) when there are 67 intra prediction modes.
  • two candidates may be configured in the upper right and lower left blocks, and two candidates may be configured in the preset mode (eg, Planar, DC). If the above configuration does not meet the maximum number, it may be configured to include a prediction mode derived from a prediction mode included in the candidate group, a preset mode, and the like. At this time, the priority of the candidate group configuration may be in the order of left-top-Planar-DC-bottom left-top right-top left block.
  • one current block (N x 2N. PU0) is one in the order of l3-l2-l1-l0, one in the order of t1-t0, and bl-t2.
  • Two candidates can be configured in the order of tl.
  • an adjacent block of the current block may be a block (encoding block, that is, a prediction block in another coding block) that has already been encoded / decoded.
  • At least one intra prediction mode candidate group may be set.
  • configurations (1) and (2) may be possible.
  • the current block is PU1, one candidate in the order c13-c9-c5-c1, one in the order of t3-t2, and one of k-tr-t1 in the candidate group configuration setting as shown in (1) as shown in FIG.
  • Two candidate groups (k can be derived from bl or c13, etc.) in the order can be configured, and one candidate in the order of t3-t2 and k-tr as shown in c of FIG. 19 in the candidate group configuration set as shown in (2).
  • Two candidate groups (k can be derived from bl, etc.) can be configured in the order of t1. The difference between the two examples is whether the candidate group of the intra prediction mode of the upper block is included.
  • the intra prediction mode of the left block is included in the candidate group for the purpose of enhancing the efficiency of the intra prediction mode encoding / decoding.
  • the encoding / decoding is not yet completed for the purpose of parallel processing.
  • Intra-prediction mode of the left block which may not be referred to because it may not have been referred to, was excluded from the candidate group.
  • the candidate group configuration may be determined according to the setting for the candidate group configuration.
  • the candidate group configuration setting in this example, the candidate group configuration setting for parallel processing
  • the intra prediction mode of the block is included in the candidate group.
  • the basic coding block represents an example of obtaining a coding block (hatched block A x B) through binary tree-based partitioning (or a plurality of tree-based partitioning).
  • the block represents an example of being set as a prediction block as it is.
  • 21 shows various examples of intra-picture prediction mode candidate group setting of a block in which prediction information is generated (coded block. 2N ⁇ N in this example).
  • the non-MPM candidate group includes a plurality of candidates.
  • a total of 16 candidates are formed in group A when grouped into groups (in this example, A and B.
  • A assumes a mode with a higher probability of predicting the prediction mode of the current block within a non-MPM candidate). The description is based on the assumption that a total of 45 candidates are included in the group.
  • the group A includes candidates classified according to a certain rule (for example, composed of equally spaced modes among directional modes) among the modes not included in the MPM candidate group or the final MPM according to the MPM candidate group priority. Candidates not included in the candidate group may be included.
  • Group B may be composed of MPM candidates and non-MPM candidates not included in Group A.
  • the current block (assuming CU0 or PU0.2N x N size and width / vertical 2: 1) is l1-t3-planar-DC-l2-tr-tl-l1 * -t3 * - l2 * - tr * - * tl - vertical - horizontal - it is possible to configure the candidate six candidates in the order of a diagonal mode.
  • * means a mode derived from the prediction mode of each block (eg, an added mode such as +1, -1, etc.).
  • a current block (CU1 or PU1 2N x N size) is l3 - c7 - planar - DC - bl - k - l1 - l3 * - c7 * - bl * - k * - l1
  • Six candidates can be composed of candidate groups in the order of * -vertical-horizontal-diagonal mode.
  • the prediction mode of the upper block may be included in the A group because it is excluded from the candidate group or the priority is pushed backward.
  • the difference from the case of FIG. 18 is that even in a rectangular block, the block is partitioned into coding units and corresponds to a case in which the block is immediately set as a prediction unit without additional division. Therefore, the candidate group configuration setting as shown in FIG. 18 may be the case ⁇ not shown in (2) ⁇ that is not applied in this example.
  • the encoding / decoding since the encoding / decoding is not completed, it may be derived from an adjacent block in which the encoding / decoding is completed.
  • FIG. 22 shows various examples of the intra prediction mode candidate group setting of the block in which the prediction information is generated (coded block. N ⁇ 2N in this example).
  • the sorted prediction mode is configured as a candidate group. It is assumed that decoding is performed.
  • the priority will be described under the assumption that the priority is determined from an adjacent block (left, upper, upper left, upper right, lower left in this example).
  • a first rank candidate may be determined in a left L3, an upper T3, an upper left TL, an upper right R0, and a lower left B0 block.
  • the mode having the mode of the prediction modes of the block may be determined as the first rank candidate. If a plurality of modes have a mode value, a predetermined priority (for example, color copy mode-planar-vertical-horizontal-DC) is given.
  • This example obtains a mode that is expected to be a prediction mode of the current block from a neighboring block and determines the priority (i.e., the amount of bits to be allocated) accordingly.
  • the '101', '110' and '111' are determined in that the prediction mode prediction is performed in that the MPM candidate setting (in this example, the first bit is determined to be 0 or 1; if 1, an additional 2 bits are required.
  • the first bit may perform bypass or regular coding, and the remaining bits may perform bypass coding.
  • a current block (assuming CU0 or PU0.N ⁇ 2N size and width / vertical 1: 2) may determine a first rank candidate in blocks l3, t1, tl, t2, and bl.
  • the current block (CU1 or PU1.
  • the current block CU1 may determine the first rank candidate in the t3, t1, tr, and k blocks.
  • the priority of the color copy mode is delayed from the preset priority. You can change to the color copy mode or the like.
  • the characteristics of the current block may be different from those of the current block This may be an example set under the assumption that it is higher. That is, it can be understood as an example in which the encoding / decoding setting is adaptively determined according to the relationship between blocks.
  • the difference from the case of FIG. 19 is that even a rectangular block is partitioned into coding units and corresponds to a case in which the block is directly set as a prediction unit without further splitting. Therefore, the candidate group configuration setting as shown in FIG. 19 may not be applicable in this example.
  • k in FIG. 22 since it is a position where the encoding / decoding is not completed, it may be derived from an adjacent block in which the encoding / decoding is completed.
  • an example of setting a candidate group by checking a relationship between a current block and a neighboring block may occur. That is, in FIG. 21 and FIG. 22, neighboring blocks before CU0 and CU1 are identical to each other, and CU0 and CU1 may be obtained through horizontal division or vertical division of binary tree division.
  • the candidate group can be configured without collision according to the setting of the initial stage of encoding / decoding.
  • the motion information prediction candidate group may be set according to various other encoding / decoding settings.
  • a case of setting a prediction mode candidate group has been described through the above-described example.
  • a setting for limiting the use of the reference pixel used for prediction of the current block from the neighboring block marked with the exception state may be possible.
  • the second reference pixel when generating a prediction block by dividing the first reference pixel and the second reference pixel according to an embodiment of the present invention, when the second reference pixel is included in the block marked as the exceptional state, the second reference pixel is referred to. It is possible to limit the generation of prediction blocks using pixels. That is, the prediction block may be generated using only the first reference pixel.
  • the above example may be considered as one element of the sub / decoding setting relating to the use of the second reference pixel.
  • the priority means an order of determining whether to include in the MPM candidate group, but may be considered as an element for determining binarization, entropy encoding / decoding setting, etc. for each candidate belonging to the MPM candidate group.
  • Modes included in the intra prediction mode candidate group include prediction modes of spatially adjacent blocks, preset prediction modes, and prediction modes derived from prediction modes included in the candidate groups. Can be configured.
  • a rule eg, priority, etc.
  • forming a candidate group may be determined according to the encoding / decoding setting.
  • one fixed priority for configuring an intra prediction mode candidate group may be supported.
  • the MPM candidate group For example, when adding a prediction mode of a spatially adjacent block to a candidate group, left (L3 in FIG. 13)-upper (T3 in FIG. 13)-lower left (B0 in FIG. 13)-upper right (R0 in FIG. 13)-upper left
  • one preset priority such as the order of Planar-DC-vertical-horizontal-diagonal mode
  • a mixed configuration of the above example may be possible such as the order of the left-up-plane-DC-lower-right-top-left block.
  • the derived mode of the included prediction mode eg, +1, -1 in the left block mode, +1, -1 in the upper block mode.
  • vertical, horizontal, diagonal modes, etc. may then take priority.
  • the candidate modes when the prediction mode of the spatially adjacent blocks is added to the candidate group, the candidate modes have the priority of the left-up-lower-left-right-left block and include the prediction mode of the left block (L3 in FIG. 12) in the candidate group in order. If the mode does not exist, the candidate mode includes the prediction mode of the next priority phase block (T3 in FIG. 13). In this way, the candidate group is included in the order, but if the prediction mode of the corresponding block is not available or overlaps with the included mode, the sequence is skipped to the next block.
  • the candidate group when the prediction mode of the spatially adjacent blocks is added to the candidate group, the candidate group may be configured in the order of left-top-bottom-left-top-left block.
  • the prediction mode of the left block first considers the prediction mode of the block located in L3, but if there is an unavailable or overlapping mode, the left block is predicted in the order of the next subblock L2, L1, L0 of the left block. Can fill mode candidates.
  • the same or similar setting is applied to the upper (T3-T2-T1-T0), lower left (B0-B1-B2-B3), upper right (R0-R1-R2-R3), and upper left (TL) blocks.
  • the prediction mode of the left block may proceed to the next rank block if it is impossible to add to the candidate group even though the L3-L2-L1-L0 is performed in the order.
  • the adaptive candidate group configuration may include the state of the current block (for example, the size and shape of the block), the state of the neighboring block (for example, the size and shape of the block, the prediction mode, etc.) or the relationship between the current block and the neighboring block. Can be determined accordingly.
  • adaptive priority for configuring an intra prediction mode candidate group may be supported. You can set the priority according to the frequency. That is, the prediction mode that occurs frequently may have a high priority, and the prediction mode that occurs frequently may have a low priority.
  • priority may be set according to the frequency of prediction modes of spatially adjacent blocks.
  • modes 6 and 31 are the first and second candidates. It includes.
  • Planar and DC are included as the third and fourth candidates, and mode 14, which is a prediction mode with one frequency, is included as the fifth candidate.
  • Modes 5 and 7, derived from the first and second candidates, and modes 30 and 32 can then be prioritized.
  • modes 13 and 15, which are modes derived from the fifth candidate are given next priority, and then vertical, horizontal, and diagonal modes may have the next priority.
  • a prediction mode with a frequency of 2 or more assigns a priority before the planar and a DC mode
  • a prediction mode with a frequency of 1 assigns a priority after the planar and the DC mode. Modes can follow.
  • the preset priority (for example, left-top-plane-DC-bottom-right-top-left block order) may be a priority set in consideration of the statistical characteristics of a general image, and an adaptive priority (In this example, if the candidate group is included in the candidate group according to the frequency, the partial priority of the preset priority is fixed in consideration of the partial characteristics of the image (in this example, the planar and the DC are fixed and the mode in which two or more frequencies occur in front is arranged, In the following example, a mode in which one frequency is generated may be applied.
  • the binarization and entropy encoding / decoding settings for each candidate belonging to the MPM candidate group may be determined based on the frequency.
  • binarization for an MPM candidate having m frequencies may be determined based on the frequency.
  • contextual information about the candidate may be adaptively determined according to the frequency. That is, in this example, context information in which the selection probability of the mode is set high can be used. That is, context information may be set differently when m is 1 to 4 (in this example, 2 out of 6 candidates include a non-directional mode, so the maximum value of the frequency is 4).
  • each bit when one or more bits are configured according to binarization For example, if an MPM candidate consists of '010', the first to third bins are 0, 1, 0. 0 of 1 and 0 of 1 indicate that the candidate is selected as an MPM (a situation in which it is determined whether or not the final MPM is a single bean, or a situation in which additional bins need to be identified to know the final MPM, ie '010 above). 'If the first bin is 0, you need to check the second and third more to check if the mode is the final MPM. If it is one bin, you can check whether it is the final MPM according to the bin 0 and 1).
  • CABAC context adaptive binary arithmetic coding
  • adaptive priority for configuring the intra prediction mode candidate group may be supported.
  • priority may be set according to the direction of prediction modes of spatially adjacent blocks.
  • the category on the directionality is the mode group facing the upper right (modes 2 to 17 in Figure 9), the horizontal mode group (mode 18 in Figure 9), the mode group facing the lower right (19 to Mode 49), the vertical mode group (mode 50 in FIG. 9), the mode group facing the lower left side (modes 51 to 66 in FIG. 9), and the non-directional mode group (Planar, DC mode).
  • it may be divided into a horizontal directional mode group (modes 2 to 34 in FIG. 9), a vertical directional mode group (modes 35 to 66 in FIG. 9), a non-directional mode group (Planar, DC mode), and various Examples of configurations may be possible.
  • the candidate group can be configured in the above order.
  • priorities for binarization and entropy encoding / decoding for each candidate may be determined based on the category. For example, binarization in which fewer bits are allocated to a category including a large number of candidates among MPM candidate groups may be performed.
  • contextual information may be adaptively determined according to a category. That is, the context information may be determined according to the number of modes included in each category (eg, context information is determined based on a combination of m and n in the first category m and the second category n).
  • adaptive priority may be supported according to the size and shape of the current block.
  • the priority may be determined according to the size of the block, and the priority may be determined according to the shape of the block.
  • the block size is 32 x 32 or larger, it can be included in the candidate group in the order of Left-Top-Planar-DC-Bottom Left-Top Right-Left Top Block; if it is less than 32 x 32 Left-Top-Bottom Left-Top Right-Top-Planar- It may be included in the candidate group in the order of the DC mode.
  • the block may be included in the candidate group in the order of left-top-planar-DC-bottom-right-top-left block if the shape of the block is square, and top-right if the block is rectangular (long form).
  • -Upper left-Planar-DC-Left-Lower left Block can be included in the candidate group.
  • left-lower left-upper left-Planar-DC-upper-upper right block May be included in the candidate group. This example may be understood as a case where a prior order is given to a block adjacent to a longer block.
  • adaptive priority may be supported according to the relationship between the current block and the neighboring block.
  • FIG. 23 an example of generating a prediction block according to a prediction mode of a neighboring block (subblock of a left block in this example) is illustrated.
  • the prediction mode of the left block is the mode having the directionality existing from 51 to 66 in Fig. 9 (used for convenience of description.
  • the pixel referred to for generating the prediction block of the left block corresponds to the shaded portion (part of TL and T) in the picture.
  • the right region of the left block may be a region that is highly correlated with the left region of the current block, but is predicted by using the reference pixel of the lower region of T that has already been encoded / decoded before the current block has been decoded. You can create a block.
  • the final prediction mode is the mode existing in 51 to 66. Also, some regions 2400 of the current block may have the same or similar directionality as the above prediction mode. Edge, etc.) may be present.
  • the probability that the prediction mode of the left block is selected as the prediction mode of the current block is slightly high.
  • the probability that the prediction mode of the upper block is selected as the prediction mode of the current block is slightly high.
  • priority when determining the possibility of prediction mode occurrence of the current block through the prediction mode of the neighboring block, priority may be determined adaptively.
  • the order may be left-(left + 1)-(left-1)-top-Planar-DC-bottom left-top right-bottom left, and in the case of b of FIG. Variations can occur in the following order: Up-(Up-1)-(Up + 1)-Left-Planar-DC-Left Down-Right Up-Left Down Block.
  • FIG. 24 an example of prediction block generation according to a prediction mode of a neighboring block (left block in this example) is illustrated.
  • the pixels referred to for generating the prediction block of the left block correspond to hatched portions TL and T in the figure.
  • the right region of the left block may be a region that is highly correlated with the left region of the current block, but is predicted by using the reference pixel of the lower region of T that has already been encoded / decoded before the current block has been decoded. You can create a block.
  • the prediction mode of the left block is selected as the prediction mode of the current block.
  • it may mean that a probability of selecting modes 51 to 66 is high.
  • the probability of selecting the prediction mode of the upper block as the prediction mode of the current block is high.
  • priority when determining the possibility of prediction mode occurrence of the current block through the prediction mode of the neighboring block, priority may be determined adaptively.
  • the basic candidate group configuration priority is in the order of left-top-Plaan-DC-bottom-right-top-left block, there is no change in the priority in the case of the same as a of FIG. In this case, fluctuations may occur in the order of Top-Left-Planar-DC-Bottom Left-Top Right-Top Left.
  • the priority is the same as before, but the binarization and entropy encoding / decoding settings for the prediction mode candidate of the left block of the MPM candidate group may be adaptively determined.
  • binarization (allocation of shorter bits) for the prediction mode candidate of the left block may be determined.
  • contextual information may be adaptively determined. That is, in this example, context information in which the probability of occurrence of the candidate to be selected can be used can be used.
  • 0 means that the candidate is selected as an MPM (a situation in which it is determined whether or not the final MPM is a single bean or a situation in which additional bins need to be identified to know the final MPM).
  • 1 is a bin indicating that the candidate is not selected as an MPM, Context Information having a high probability of occurrence of 0 may be applied and CABAC may be applied.
  • FIG. 25 an example of prediction block generation according to a prediction mode of a neighboring block (left and bottom left blocks in this example) is illustrated.
  • the left block and the bottom left block may or may not belong to the same block.
  • the left block and the lower left block belong to the same block (that is, the same mode) in which division is completed.
  • the pixels referred to in the prediction block generation of the (left + bottom left) blocks correspond to the shaded portions TL, T, and TR in the figure. Even though the prediction is performed from the lower regions of the T and TR blocks as in the above example, it was determined that the final prediction mode existed at 51 to 66. The entire region of the current block has the same or similar directionality as the above prediction mode. It can mean that it exists.
  • the probability of selecting the prediction mode of the left block or the lower left block (in this example, when the prediction modes of the two blocks are the same) as the prediction mode of the current block is very high.
  • the probability of selecting modes 51 to 66 is high.
  • the prediction mode of the (up + right) block when the prediction mode of the (up + right) block is present in modes 2 to 17 in FIG. 9, it may mean that the entire region of the current block has the same direction as the corresponding prediction mode.
  • the probability of selecting the prediction mode of the upper block or the upper right block (in this example, when the prediction modes of the two blocks are the same) as the prediction mode of the current block is very high.
  • priority when determining the possibility of prediction mode occurrence of the current block through the prediction mode of the neighboring block, priority may be determined adaptively.
  • the left-bottom-bottom-Planar-DC-top-right-top Variations may occur in the order of the blocks.
  • the fluctuation may occur in the order of top-top-plane-DC-left-bottom-left-top block.
  • the priority of the related block can be preceded.
  • binarization and entropy encoding / decoding settings for each candidate belonging to the MPM candidate group may be determined based on the category described above in the fourth example.
  • binarization ie, allocating shorter bits
  • contextual information according to the category may be adaptively determined. That is, in this example, context information in which the occurrence probability of the category to which the mode (the modes of a and b in FIG. 25) belongs is set can be used.
  • CABAC may be applied by applying context information with a high probability of occurrence.
  • the process can be simply configured. Assume that the current block has a range from (a, b) to (a + M-1, b + N-1).
  • the left block includes pixels belonging to the range of (a-1, b) to (a-1, b + N-1) with respect to the current block.
  • the direction of the prediction mode of the left block may be determined by checking the prediction mode of some pixels instead of all the pixels.
  • the prediction mode of the upper right side (upper left corner of the current block) coordinates of the left block of (a-1, b), the lower right side of the left block of the (a-1, b + N-1) (the current block) Based on the prediction mode of the lower left) coordinate, the direction of the prediction block of the left block may be determined.
  • the left block may be composed of a single block and may be composed of split blocks.
  • the prediction mode including the coordinates may be the same.
  • a high priority may be allocated with respect to prediction mode encoding for the prediction mode.
  • the prediction mode for some coordinates of a block located in a predetermined direction may be checked, and the prediction mode or the prediction mode directionality of the corresponding direction may be checked and referred to the intra prediction mode candidate group configuration.
  • the number of coordinates may be an integer of 1 or more, such as 1, 2, and 3.
  • the priority within the candidate group for the mode may be assigned high.
  • a prediction mode for example, an adjacent prediction mode such as +1 or -1 derived based on the mode may be assigned a high priority within the candidate group. That is, all or some of the prediction modes or preset prediction modes (DC, planar, horizontal, vertical, diagonal mode, etc.) of other spatially adjacent blocks may have priority prior to all of them.
  • a candidate group by default setting may be configured. That is, a method of constructing a candidate group considering the highly correlated process is further considered, and based on the state information (block size, shape, position, prediction mode, etc.) of adjacent blocks, a method of constructing a candidate group or a plurality of prediction mode candidate groups is configured. You can choose one.
  • 26 is an exemplary diagram of a relationship between a current block and a neighboring block.
  • a shows a coding sequence according to block division.
  • encoding is performed in the order of upper left (0)-upper right (1)-lower left (2)-lower right (3) blocks.
  • quad-tree splitting is further performed in the subblock (depth 1), encoding is performed in the above order in each subblock (depth 2), and encoding is performed in priority to depth information.
  • upper left block divided at depth 1 upper left (0-0)-upper right (0-1)-lower left (0-2)-lower right (0-3) blocks at depth 2
  • lower right block divided at depth 1 In the case of the depth 2 in the order of the upper left (3-0), upper right (3-1), lower left (3-2), lower right (3-3) blocks. That is, encoding proceeds in the order of x-y-z expressed by depth information.
  • encoding is performed in the order of left (0)-right (1) or top (0)-bottom (1) blocks in the case of horizontal division.
  • binary tree splitting is further performed in the subblock (depth 1), encoding is performed in the above order in each subblock (depth 2), and encoding is performed in priority to depth information.
  • FIG. 26A 3 blocks correspond to a in FIG. 25, 16 blocks correspond to a in FIG. 23, and 20 blocks correspond to a in FIG. 24.
  • three blocks may have a lower directional block and one block that is not divided, have a prediction mode (one mode) in a specific direction, or have a specific direction even when the left and lower blocks are divided. This is the case with prediction mode (one or more modes).
  • the left block is divided into a plurality of sub blocks, and at least one of some sub blocks has a prediction mode (one mode) in a specific direction.
  • 20 blocks have a left block composed of one block and have a prediction mode (one mode) in a specific direction, or a left block is divided into a plurality of sub blocks, and all sub blocks have a specific directional prediction mode ( One or more modes).
  • FIG. 26 An example of a relationship between a current block and a neighboring block is shown through b of FIG. 26. If it is determined that it is expected as shown in b of FIG. 26, it may be considered in constructing a prediction mode candidate group by considering this.
  • the intra prediction mode candidate group configuration may be set in consideration of the various cases.
  • the candidate group configuration to which one setting described in each embodiment is applied may be possible, and the setting described in each embodiment may be the same or similar in other embodiments, and a plurality of settings may be applied to the candidate group configuration. have.
  • the non-MPM candidate group is composed of a plurality of candidate groups (groups A and B) so that the prediction mode of the MPM candidate group is not selected, and the mode candidate group expected to be the prediction mode of the current block next to the prediction mode of the non-MPM candidate group.
  • groups A and B candidate groups
  • the configuration of the A candidate group configuration may use various methods, and may include a prediction mode that is not included according to the priority of the MPM candidate group in the A candidate group.
  • the A candidate group may be configured according to a predetermined classification regardless of the above example.
  • a prediction mode having a predetermined interval may be configured in the candidate group. That is, in FIG. 8, modes 2, 6, 10, 14, and 18 may be included in the A group. In this case, groups B, 3, 4, 5, 7, 7, 8, and 11 may be included in the group B.
  • the mode included in the MPM candidate group is set to be excluded.
  • an MPM candidate group is formed, and then an A candidate group is formed.
  • the remaining prediction mode may be configured as a B candidate group.
  • Truncated Unary binarization for the MPM candidate mode fixed length binarization for the A candidate group, and Trunacted Binary binarization for the B candidate group may be used, but various other binarization methods may be used.
  • the MPM candidate group mode may perform encoding / decoding for all or some of the bins through a regular coding unit, and the non-MPM candidate mode may perform encoding / decoding for all bins through a bypass coding unit.
  • encoding / decoding may be performed through a regular coding unit for some of the bins, but various cases may be possible.
  • FIG. 27 illustrates an example of generating a prediction block using a plurality of reference pixel layers.
  • a pixel value generated by applying a weighted average to a of ref_1 and b of ref_2 may be obtained as a predicted value of x pixels of the current block.
  • Generating a predictive block using a plurality of reference pixel layers sometimes yields a better predictive effect. That is, it means that a plurality of pixels may produce more sophisticated prediction results in generating prediction values of the pixels of the current block.
  • re1_1 and ref_2 can be applied to the case where the current block has a high correlation with the edge direction.
  • using a plurality of reference pixel layers may result in worse prediction results. For example, if the current block is highly correlated in the vertical direction and the upper block is highly correlated in the diagonal direction, it is not preferable to use a plurality of reference pixel layers.
  • a sub block belonging to the current block may share one intra prediction mode.
  • the current block is 4M x 4N
  • the sub block is 4M x N
  • the forward prediction up-> down or left-> right, the reverse direction is down-> up, right-> down
  • the prediction directions are left top, up
  • the prediction mode using the reference pixel of the upper right block is k (No. 66 in FIG. 9).
  • the sub block 4M x N including x may perform intra prediction using the first previous sub block on which encoding is completed as a reference pixel layer.
  • the subblock including x may perform intra prediction by using the second previous subblock in which encoding is completed as a reference pixel layer.
  • a subblock including x may use the first and second previous subblocks as encoding as reference pixel layers to perform intra prediction (weights applied to each reference pixel layer are the same as other subblocks in the subblock including x). High weighting).
  • the previous subblock of the subblock to be encoded has the same direction as the target subblock. Knowing can produce better results. Therefore, it is possible to explicitly apply a plurality of reference pixel layer settings to sub-blocks in the current block to determine whether to explicitly perform or to select which reference pixel layer. Alternatively, the previous k subblocks of the target subblock may be implicitly applied to the plurality of reference pixel layers to generate a predicted value of the target subblock.
  • a plurality of sub-blocks are set to different reference pixel layers in a sub-block unit, and a prediction block is generated using the same, different settings may be made according to positions in the current block of the sub-block.
  • the first subblock may perform prediction and encoding using the nearest reference pixel of the current block
  • the second subblock may perform prediction and encoding using the data of the first subblock and the nearest reference pixel of the current block. Can be.
  • the third subblock may perform prediction and encoding using data of the first and second subblocks
  • the fourth subblock may perform prediction and encoding using data of the second and third subblocks.
  • the same filter may be used for reference pixel filtering and reference pixel interpolation for each reference pixel layer (or subblock) from above, and other filters may be used.
  • the filter is classified into filter tap number and filter coefficient.
  • the presence or absence of filtering may be applied to the same or different.
  • the reference pixel filtering and the reference pixel interpolation may be implemented by one filter.
  • the filtering may not be performed twice by performing one 6-tap interpolation filter instead of performing reference pixel filtering, which is a 3-tap low frequency filter, and performing a 4-tap interpolation filter.
  • reference pixels used for intra prediction may be divided into a plurality of concepts. Unlike using the plurality of reference pixel layers above, the prediction block may be generated or corrected using the first reference pixel and the second reference pixel according to the prediction mode.
  • the prediction mode is applied differently.
  • this example may be applied to the case where the above current block is split and transformed into several sub-blocks. That is, in the conventional case, the reference pixel is used as a first reference pixel in a neighboring block of the current block, and the second reference pixel is located opposite to the direction of the prediction mode or uses a pixel corresponding to the direction of the prediction mode.
  • the first reference pixel when the first reference pixel is divided into several sub-blocks, the first reference pixel may be the upper block. That is, the present invention can be applied in such a manner that the position of the first reference pixel is changed in the case where the prediction block is performed using the plurality of reference pixels.
  • the method may not be used when the conversion is performed by splitting into a plurality of sub-blocks. The reason is that the closest pixels that have been previously encoded are lined up, but using a second reference pixel may be inefficient.
  • the prediction block may be generated or the prediction block may be corrected using the first and second reference pixels according to the prediction mode in the present invention. If splitting and coding is performed, it may be prohibited to generate or correct a prediction block using the second reference pixel.
  • the corresponding process may be performed by adjusting the position of the first reference pixel.
  • FIG. 29 is an exemplary diagram for describing a configuration of a reference pixel used for intra prediction.
  • the size and shape (M ⁇ N) of the current block on which the prediction is performed may be obtained from the block divider, and will be described under the assumption that it is supported in the range of 4 ⁇ 4 to 256 ⁇ 256 for intra prediction.
  • Intra prediction may be generally performed in units of prediction blocks, but may be performed in units of coding blocks, transform blocks, or the like according to the setting of the block partitioner.
  • the reference pixel configuration unit may configure a reference pixel used for prediction of the current block.
  • the reference pixel may be managed through a temporary memory (for example, an array ⁇ Array>, a primary or a secondary array, etc.), generated and removed for each intra-prediction process of the block, and the size of the temporary memory is referred to. It may be determined according to the configuration of the pixel.
  • a temporary memory for example, an array ⁇ Array>, a primary or a secondary array, etc.
  • left, top, top left, top right, and bottom left blocks are used for prediction of the current block with respect to the current block.
  • block candidate groups having other configurations may be used for prediction of the current block.
  • the candidate group of neighboring blocks for the reference pixel may be an example when following a raster or Z scan, and some of the candidate groups may be removed according to the scanning order, or other block candidate groups (eg, right , Lower, lower right block, etc. may be configured). That is, the position of the reference neighboring block may be changed by the scanning order.
  • the same coordinate or color component composition ratio in a block (eg, in each color space) that corresponds to the current block in another color space (eg, if the current block belongs to Cr, the other color space corresponds to Y or Cb).
  • the current block may be used for prediction of the current block.
  • the example is composed of one block in the predetermined position (left, upper, upper left, upper right, lower left), but at least one block may exist at the corresponding position. That is, a plurality of sub-blocks according to block division of the corresponding block may exist in the preset position.
  • an adjacent region of the current block may be a position of a reference pixel for intra prediction of the current block, and an area corresponding to the current block of another color space may be further considered as a position of the reference pixel according to the prediction mode.
  • the position of a reference pixel defined according to a prediction mode, a method, or the like may be determined.
  • the reference pixel position is a search range (eg, in a region where sub / decoding is completed or a region where sub / decoding is completed before a current block of the current image).
  • the area included in the left or top of the current block or in the upper left, upper right, etc. may be considered as the position of the reference pixel.
  • reference pixels used for prediction of the current block M ⁇ N may be configured as adjacent pixels (Ref_L, Ref_T, Ref_TL, Ref_TR, and Ref_BL in FIG. 7) of the left, top, top, left, and bottom blocks. have.
  • adjacent pixels may be classified into at least one reference pixel layer, and the closest pixels may include ref_0 ⁇ pixel value difference 1.
  • p (-1, -1) to p (2M-1, -1), p (- 1,0) to p (-1,2N-1) ⁇ then adjacent pixels ⁇ pixel value difference 2.
  • p (-2, -2) to p (2M, -2), p (-2, -1 ) ⁇ p (-2,2N) ⁇ is ref_1, then adjacent pixel ⁇ pixel value difference 3.
  • p (-3, -3) to p (2M + 1, -3), p (-3, -2) p (-3,2N + 1) ⁇ may be divided into ref_2 and the like.
  • ref_k refers to a reference pixel set in which the pixel value difference is k + 1 in a neighboring block (Ref_TL, Ref_T, Ref_TR, Ref_L, Ref_BL in this example), and in the present invention, the reference pixel set ref_k is It is described (or described in the center) on the assumption that Ref_TL, Ref_T, Ref_TR, Ref_L, and Ref_BL use a pixel having a pixel value difference of k + 1 as a reference pixel and use it in the prediction block. This means that the reference pixel set used for prediction of the current block may or may not be the same for each neighboring block.
  • ref_0 ⁇ p (-1, -1) to p (2M-1, -1) ⁇ is used in Ref_TL, Ref_T and Ref_TR, and ref_1 ⁇ p (-2,0) to p (-2, N-1) ⁇ is used, and Ref_BL is also possible when ref_2 ⁇ p (-3, N) to p (-3, 2N + 1) ⁇ is used.
  • one reference pixel set refers to a reference pixel incorporating Ref_TL, Ref_T, Ref_TB, Ref_L, and Ref_BL (that is, acquired in a neighboring block used for intra prediction of the current block).
  • Some partial combinations of the reference pixels e.g., Ref_T + Ref_TR, Ref_L + Ref_BL, Ref_T + Ref_TL + Ref_L, etc.
  • Ref_T0 + Ref_T1, Ref_L0 + Ref_TL + Ref_T, etc. may be included in the description understood.
  • the present invention it is assumed that there are a maximum of three reference pixel sets.
  • the present invention is not limited thereto, and more reference pixel sets (k of 3 or more) may be used.
  • the supported reference pixel set (or the maximum number of sets.
  • the reference pixel candidate group in the example to be described later) may be set to a sub / decoding setting (eg, block size, shape, prediction mode, image type, color component, etc.). Can be determined accordingly.
  • a case of allocating a low index (increment by 0) from the nearest reference pixel set is not limited thereto.
  • the reference pixel configuration related information to be described later may be generated under the above-described index setting (binarization, such as allocating a short bit to a small index when selecting one of a plurality of reference pixel sets), but is not limited thereto.
  • the closest pixel of the neighboring block may be configured as the reference pixel (reference pixel layer ref_0 in this example), but other pixels may be configured as the reference pixel according to the negative / decoding setting. If another reference pixel layer or at least one reference pixel layer is used, encoding performance can be improved by increasing the accuracy of prediction. In this case, various settings related to the reference pixel layer setting may be possible.
  • the reference pixel set used for intra prediction may be determined implicitly or information related to the reference pixel set used may be explicitly generated.
  • at least one preset reference pixel set may be configured as the reference pixel, or at least one reference pixel set determined by reference pixel set selection information may be configured as the reference pixel.
  • a reference pixel set such as ref_0, ref_1, ref_2, ref_0 + ref_1, ref_0 + ref_2, ref_1 + ref_2, ref_0 + ref_1 + ref_2 may be configured as reference pixels of the current block.
  • the number of reference pixel sets including reference pixels may be divided into one case and two or more cases.
  • a prediction block is generated using pixels located in one reference pixel set, and in the latter case, at least one pixel located in each reference pixel set is used (for example, two or more reference pixel sets). Is a value derived from a median value, a weighted average, etc. of a pixel value positioned in each reference pixel set when the reference pixel is configured as a reference pixel, which may be a value derived from one pixel or a plurality of pixels in each reference pixel set) To generate a prediction block.
  • a prediction block may be generated using a reference pixel obtained through a weighted sum of pixels located in a first reference pixel set (ref_0 in this example) and pixels located in a second reference pixel set (ref_1 in this example).
  • the pixel to which the weighted sum is applied in each reference pixel set may be a decimal unit pixel as well as an integer unit pixel according to a prediction mode (eg, prediction mode directionality).
  • weights (for example, 7: 1) may be respectively applied to the prediction block obtained by using the pixel located in the first reference pixel set as the reference pixel and the prediction block obtained using the pixel located in the second reference pixel set as the reference pixel. , 3: 1, 2: 1, 1: 1, etc.) to obtain one prediction block.
  • indication information (adaptive_intra_ref_sample_enabled_flag in this example) that allows adaptive reference pixel configuration may occur in units of video, sequence, picture, slice, tile, and the like. .
  • the adaptive reference pixel configuration information may occur in units of a picture, slice, tile, block, and the like. have.
  • the reference pixel configuration related information for example, reference pixel set selection information, etc., intra_ref_idx in this example
  • the reference pixel when the adaptive reference pixel configuration is not allowed or is not an adaptive reference pixel configuration, the reference pixel may be configured according to a predetermined setting.
  • an example of configuring the nearest pixel of a neighboring block as a reference pixel may be an example thereof, but is not limited thereto.
  • the number of various cases for example, ref_0 and ref_1 may be configured as reference pixels and a weight sum may be achieved through ref_0 and ref_1). Or the like, i.e., implicit).
  • the reference group configuration related information (for example, reference pixel set selection information, etc.) may be configured by the candidate group (for example, ref_1, ref_2, ref_3, etc.) except for the above-described case (for example, ref_0). But is not limited thereto.
  • the relevant information may be implicitly determined.
  • the related information may occur according to the encoding / decoding setting, in some cases, the related information is determined implicitly, and in some cases, a mixed case may be possible.
  • the sub / decoding information includes image type (I / P / B), color component, size of the current block, shape, prediction mode (type of prediction mode (directional, non-directional), direction of prediction mode (vertical, horizontal, Diagonal 1, diagonal 2, etc.)) and the like, and the intra prediction setting (reference pixel configuration setting in this example) is determined according to the combination of the negative / decoding information of the neighboring block and the negative / decoding information of the current block and the neighboring block. Can be decided.
  • FIG. 30 is an exemplary diagram of a reference pixel configuration.
  • FIG. 30A illustrates a case in which one reference pixel set includes reference pixels.
  • Subsequent intra-prediction processes (reference pixel generation, reference pixel filtering, reference pixel interpolation, and prediction block generation and after) after ref_0 are configured as reference pixels Processing filtering, etc.
  • Some intra-picture prediction processes may be adaptively configured according to the reference pixel set configuration). For example, reference pixel set information does not occur with one reference pixel set, and an intra prediction process according to a non-directional mode may be performed.
  • a maximum of two sets of reference pixels are configured as reference pixels, and after configuring ref_0 + ref_1 (and in the figure) as reference pixels, subsequent intra prediction processing may be performed.
  • ref_0 + ref_1 and in the figure
  • subsequent intra prediction processing may be performed.
  • an intra-prediction process may be performed according to some prediction modes (in this example, upper left lower left or lower left upper right).
  • a maximum of one reference pixel set includes reference pixels.
  • a subsequent intra-picture prediction process may be performed.
  • reference pixel set information is generated because a plurality of reference pixel sets are generated, and an intra prediction process according to some prediction modes (in the example, from top left to bottom right) may be performed.
  • b and c in FIG. 30 indicate that two and three reference pixel sets are supported (in other words, two and three reference pixel candidate groups, respectively), and b is a reference pixel composed of reference pixels.
  • the set is up to two (e.g., derived from the weighted average of the pixel values of each reference pixel set, etc.) and c is the reference pixel set consisting of the reference pixels, up to one (e.g., one selected from three candidate groups) Is derived from the pixel value of the reference pixel set).
  • 31 is an exemplary diagram of a reference pixel configuration.
  • FIG. 31A illustrates a case in which one reference pixel set is a reference pixel candidate group when the block size is 64 ⁇ 64 or more
  • b in FIG. 31 indicates two reference pixel sets when the block size is 16 ⁇ 16 or more and less than 64 ⁇ 64.
  • the reference pixel candidate group that is, the maximum number of reference pixel sets used as the reference pixel is two. That is, it can be understood that both b and c of FIG. 30 are possible.
  • the larger the size of the current block the higher the probability that the size of the neighboring block is smaller, which may be a result of segmentation due to different image characteristics, thereby preventing prediction from a pixel having a large pixel value distance from the current block.
  • the number of candidate reference pixel sets decreases as the size of the block increases, but the reverse is also possible, and various modifications may be possible.
  • 32 is an exemplary diagram of a reference pixel configuration.
  • FIG. 32 shows that when a plurality of reference pixel sets are reference pixel candidate groups on the longer side when the block is rectangular (horizontally long form in this example), one reference pixel set is the reference pixel on the shorter side.
  • the case of a candidate group is shown.
  • the shorter side is composed of one reference pixel set, but it can be understood as an example in which the length is smaller than the longer side, and the configuration for the number is also possible in the reverse direction. Can be.
  • This example may be an example set for the purpose of preventing a reference pixel having a short length when the shape of a block has a rectangular shape in order to prevent a decrease in accuracy of prediction due to a large distance from the current block, but is not limited thereto.
  • prediction may be performed by using a plurality of reference pixel sets (both b and c in FIG. 30 may be used).
  • prediction may be performed using a single reference pixel set. That is, the reference pixel set may be adaptively determined according to the neighboring block in one block.
  • reference pixel configuration information for example, reference pixel selection information and adaptive reference
  • Generating pixel permission information, etc. may be a situation in which information repeatedly occurs.
  • the reference pixel distribution characteristic of each reference pixel set eg, determined by the average, variance, etc. of each reference pixel set. For example, by comparing the value obtained in the foregoing process with a threshold value ⁇ Threshold>). In other words, if it is determined that the same or nearly similar prediction blocks are generated using any reference pixel set, the related information may be omitted.
  • the comparison may be performed only in the last selected prediction mode.
  • the reference pixel configuration information may be omitted in situations where it is determined to be similar or similar.
  • the reference pixel may be configured by a preset method (for example, the nearest reference pixel set).
  • the decoder may make the same determination as the encoder as to whether to receive the intra-prediction information (for example, the intra-prediction mode information, etc.) and receive the reference pixel configuration information. It is possible to determine whether to receive information.
  • the plurality of reference pixel sets are configured as reference pixels through the various examples, the present invention is not limited thereto, and various modification examples are possible and may be combined with other additional configurations.
  • the reference pixel component of the intra prediction may include a reference pixel generator, a reference pixel interpolator, a reference pixel filter, and the like, and may include all or part of the above components.
  • the reference pixel configuration unit may check the availability of the reference pixel to classify the available reference pixel and the unavailable reference pixel. For example, if a block (or reference pixel candidate block) at a predetermined position is available, the corresponding block may be used as a reference pixel, and if not available, the block cannot be used as a reference pixel.
  • the reference pixel availability is determined to be unavailable when at least one of the following conditions is satisfied. For example, if it is located outside the picture boundary, if it does not belong to the same division unit as the current block (for example, slice, tile, etc.), and if the sub / decoding is not completed, the usage is determined according to the sub / decoding setting. If any one of the limited cases is satisfied, it can be determined that it cannot be used. That is, when none of the above conditions are satisfied, it can be determined that it can be used.
  • the use of the reference pixel can be restricted by the negative / decoding settings.
  • the use of reference pixels may be limited depending on whether to perform limited intra prediction (eg, constrained_intra_pred_flag).
  • the limited intra prediction may be performed when an attempt is made to prohibit the use of a block reconstructed by referencing from another image as a reference pixel when attempting to perform error robust encoding / decoding to an external factor such as a communication environment.
  • the reference pixel candidate block may be classified into a case in which all of the reference pixel candidate blocks may be used, some may be used, and all may be unavailable. In all cases except when all are available, the reference pixels at the candidate block positions that are not available may be filled or generated.
  • the pixel at a predetermined position of the block (assuming that the pixel is adjacent to the current block in this example) may be included in the reference pixel memory of the current block.
  • the pixel obtained through the reference pixel generation process may be included in the reference pixel memory of the current block.
  • a reference pixel may be configured when the reference pixel candidate block is in an available state, and a sham pixel may be generated when the reference pixel candidate block is in an unavailable state.
  • the reference pixel filter unit generally includes a low-pass filter.
  • smoothing using a 3-tap, 5-tap filter, etc., such as [1, 2, 1] / 4, [2, 3, 6, 3, 2] / 16 ⁇ is referred to as a reference pixel.
  • It may be the main purpose of the filter part, but other types of filters (eg, high pass filters, etc.) may be used depending on the purpose of the filter application (eg, sharpening, etc.).
  • the filtering is performed for the purpose of smoothing to reduce the deterioration occurring in the encoding / decoding process.
  • Reference pixel filtering may be determined according to a sub / decoding setting. That is, filtering may or may not be applied to the reference pixel. However, this batch filtering operation does not reflect the partial characteristics of the image, and it may be good to improve the encoding performance by performing filtering based on encoding / decoding information reflecting the partial characteristics of the image.
  • the characteristics of the image may include image type (I / P / B), color component (Y / Cb / Cr), quantization parameter, sub / decoding information of the current block (for example, size, shape, split information of the current block, It can be determined according to not only the prediction mode, etc. but also the combination of the sub / decoding information of the neighboring block and the sub / decoding information of the current block and the neighboring block. Further, it may be determined (eg, whether the reference pixel region is a flat region or a discontinuous region, etc.) according to the reference pixel distribution characteristic (for example, dispersion of the reference pixel region, standard deviation, etc.). As such, when the characteristic information of the image can be confirmed, whether to apply the reference pixel filtering may be set in advance.
  • reference pixel filtering may be explicitly set. For example, information about whether filtering is applied may occur. In this case, the filter selection information does not occur when there is one filter, and the filter selection information may occur when a plurality of filter candidate groups exist.
  • an implicit setting and an explicit setting have been described with reference to the reference pixel filtering through the above example, a mixed case in which an explicit setting is set in some cases and an implicit setting in some cases may be possible.
  • the implicit meaning here means that the decoder can derive information related to the reference pixel filter (for example, whether to apply filtering information and filter type information).
  • the reference pixel interpolator may generate reference pixels in a decimal unit through linear interpolation of the reference pixel.
  • the reference pixel configuration unit is a part of the process, but it may be included in the prediction block generation unit and may be understood as a process performed before generating the prediction block.
  • the reference pixel interpolation process uses some prediction modes (e.g., horizontal, vertical, some diagonal modes 45 degrees angle such as Diagonal down right, Diagonal down left, Diagonal up right), Non-directional mode, Color mode, Color It is not performed in the copy mode, i.e., a mode that does not require decimal interpolation when generating a prediction block, but may be performed in other prediction modes (modes requiring decimal interpolation when generating a prediction block).
  • some prediction modes e.g., horizontal, vertical, some diagonal modes 45 degrees angle such as Diagonal down right, Diagonal down left, Diagonal up right
  • Non-directional mode e.g., Color mode, Color It is not performed in the copy mode, i.e., a mode that does not require decimal interpolation when generating a prediction block, but may be performed in other prediction modes (modes requiring decimal interpolation when generating a prediction block).
  • Interpolation precision for example, pixel units such as 1, 1/2, 1/4, 1/8, 1/16, 1/32, 1/64, etc.
  • the prediction mode or prediction mode directionality
  • the interpolation process is not necessary in the prediction mode at 45 degrees, and the interpolation in 1/2 pixel units is required in the prediction mode at 22.5 degrees or 67.5 degrees.
  • at least one interpolation precision and a maximum interpolation precision may be determined according to the prediction mode.
  • One preset interpolation filter for example, a 2-tap linear interpolation filter, i.e., only the interpolation filter is used in any case
  • a plurality of interpolation filter candidate groups for example, 4 -tap cubic filter, 4-tap Gaussian filter, 6-tap winner filter, 8-tap Kalman filter, etc. That is, the interpolation filter applied depends on the negative / decoding settings.
  • the interpolation filter may be classified into a difference in the number of filter taps (that is, the number of pixels to which filtering is applied), a filter coefficient, and the like.
  • the interpolation may be an example that is performed step by step, such as a high precision order (for example, 1/2-> 1/4-1/8) at low precision, and an example may be performed in a batch.
  • interpolation is performed based on an integer pixel and a decimal pixel (in this example, a pixel previously interpolated with a lower precision than the pixel to be interpolated) (i.e., an integer as well as a decimal number for interpolation).
  • interpolation is performed based on pixels of integer units (that is, only pixels of integer units are used for interpolation).
  • filter selection information can be created explicitly or implicitly, and sub / decoding settings (e.g. interpolation precision, block size, shape, prediction mode, etc.) It can be determined according to.
  • the explicitly generated unit corresponds to a video, a sequence, a picture, a slice, a tile, a block, and the like.
  • the prediction block generator may generate a prediction block according to at least one prediction mode, and use a reference pixel based on the prediction mode.
  • the reference pixel may be used in a method such as extrapolation (directional mode) according to a prediction mode, and may be used in a method such as interpolation or average (DC) or copy (non-directional mode). have.
  • the prediction block may be generated by a copy method of the reference pixel.
  • one or more prediction pixels may be generated by copying one reference pixel, or one or more prediction pixels may be generated by copying one or more reference pixels, and the number of copied reference pixels is copied prediction. It may be equal to or less than the number of pixels.
  • the prediction block may be generally composed of one prediction block obtained through the prediction block generation process, but an example of obtaining one final prediction block by obtaining a plurality of prediction blocks and applying a weighted sum to the prediction blocks may be possible.
  • the plurality of prediction blocks may mean a prediction block obtained according to a reference pixel set, and may also be possible in other cases.
  • the prediction mode determiner performs a process for selecting an optimal mode among a plurality of prediction mode candidate groups.
  • block distortion eg, Distortion of current and reconstructed blocks.
  • a mode that is optimal in terms of coding cost may be determined using a sum-of-absolute difference (SAD), a sum of square difference (SSD), etc., and a rate-distortion technique that takes into account the amount of bits generated according to a corresponding mode.
  • the prediction block generated based on the prediction mode determined through the above process may be transmitted to the subtractor and the adder.
  • the prediction mode encoder may encode the prediction mode selected by the prediction mode determiner.
  • index information corresponding to the prediction mode may be encoded, or the information about the prediction mode may be predicted. That is, the former means a method of encoding the prediction mode as it is without prediction, and the latter means a method of encoding the mode prediction information and the information obtained based on the prediction mode.
  • the former is an example that can be applied to the chrominance component, the latter in the luminance component, it is not limited to this may also be possible in other cases.
  • the prediction value (or prediction information) of the prediction mode may be referred to as Most Probable Mode (MPM).
  • MPM Most Probable Mode
  • a prediction mode of a preset prediction mode eg, DC, planar, vertical, horizontal, diagonal mode, etc.
  • spatially adjacent blocks eg, left, top, left top, right top, bottom left block, etc.
  • the diagonal mode may mean Diagonal up right, Diagonal down right, Diagonal down left, and may correspond to modes 2, 34, and 66 of FIG. 9.
  • a mode derived from a mode previously included in the MPM candidate group may be configured as the MPM candidate group.
  • a mode in which the mode interval has a difference of a for example, a is a non-zero integer such as 1, -1, 2, -2, etc.
  • Fig. 9 In the case where the mode 10 is included in, the mode corresponding to the mode 9, 11, 8, 12, etc. are derived) may be newly (or additionally) included in the MPM candidate group.
  • the above example may correspond to a case in which the MPM candidate group is configured in a plurality of modes, and the MPM candidate group configuration (for example, the number of MPM candidate groups and configuration priority) may be configured as a sub / decoding setting (for example, a prediction mode candidate group or an image). Type, block size, block type, etc.) and may include at least one mode.
  • the order of prediction modes included in the MPM candidate group may be determined according to the priority, and when the number of MPM candidate groups is filled according to the priority, the MPM candidate group may be completed.
  • priorities may be determined in order of a prediction mode of a spatially adjacent block, a preset prediction mode, and a mode derived from a prediction mode first included in the MPM candidate group, but other modifications are also possible.
  • the candidate group may be included in the order of left-up-down-left-right-left block, and the candidate group in the order of DC-planar-vertical-horizontal mode among preset prediction modes.
  • the prediction mode obtained by adding +1, -1, etc. in the included mode may be included in the candidate group.
  • the prediction mode may be included in the candidate group with one priority such as Left-Up-DC-Planar-Left-Right-Left-Up-Left + 1-Left-1-Up + 1.
  • information eg, most_probable_mode_flag
  • MPM index information (eg, mpm_idx) may be additionally generated according to the configuration of the MPM. For example, when the MPM is configured with one prediction mode, no additional MPM index information is generated. When the MPM is configured with a plurality of prediction modes, the MPM candidate group may generate index information corresponding to the prediction mode of the current block. have.
  • the non-MPM index information corresponding to the prediction mode of the current block in the prediction mode candidate group (or non-MPM candidate group) except for the MPM candidate group in the prediction mode candidate group may be generated, which may be an example of the case where the non-MPM is configured as one group.
  • the non-MPM candidate group is composed of a plurality of groups
  • information on which group the prediction mode of the current block belongs to may be generated.
  • the non-MPM may be configured with at least one prediction mode candidate group (or group), and the non-MPM configuration may be determined according to the prediction mode candidate group. For example, when the prediction mode candidate group is 35 or less, it may be one, or in other cases, two or more.
  • the group A may configure the candidate group next to the MPM candidate group in a mode determined to have a high probability of matching the prediction mode of the current block.
  • the next ranking prediction modes not included in the MPM candidate group may be included in the A group, or the prediction modes having directionality having a predetermined interval may be included in the A group.
  • the non-MPM When the non-MPM is composed of a plurality of groups as in the above example, it may be supported for the purpose of reducing the mode bit amount when the number of prediction modes is large and the prediction mode is not predicted by the MPM.
  • a binarization table applied to each prediction mode candidate group (eg, the MPM candidate group, the non-MPM candidate group, etc.) may be generated separately.
  • the binarization method applied to each candidate group may be applied individually.
  • terms such as the MPM candidate group, the non-MPM candidate group, and the like are not limited thereto but only some terms used in the present invention.
  • the current intra prediction mode is classified into a plurality of categories, and information on which category belongs to which category and the mode information within the category.
  • terms such as a primary MPM candidate group and a secondary MPM candidate group are used. It may also be possible to use as.
  • the prediction related information generated by the prediction mode encoder may be transmitted to the encoder and may be included in the bitstream.
  • At least one reference pixel set when configured as a reference pixel candidate group, it may be divided into a case of using one reference pixel set and a case of using two or more reference pixel sets.
  • one reference pixel set (one of ref_0, ref_1, and ref_2 in FIG. 29) is selected and used for intra prediction when a plurality of reference pixel sets are configured as candidate groups.
  • a prediction block P may be generated using ref * obtained through a pre-prediction process such as reference pixel generation, reference pixel filtering, and reference pixel interpolation using the reference pixel set ref.
  • 5-tap low pass filtering is applied to a pixel located in ref through the reference pixel filter unit
  • 6-tap is applied to a pixel located in ref ′ (that is, a pixel after reference pixel filtering) through the reference pixel interpolator.
  • Linear interpolation filtering may be applied.
  • a prediction block may be generated using ref * obtained through the above process.
  • processes such as the reference pixel filter unit and the reference pixel interpolator may be performed before generating the prediction block.
  • filtering may be applied to adjacent pixels centering on a target pixel.
  • filtering effects for example, smoothing and sharpening
  • filtering may be applied to adjacent pixels centering on a pixel to be interpolated, and more sophisticated filtering effects may occur when the number of pixels applied to the filter increases.
  • Both of these steps are processes for performing filtering, which may cause unnecessary filtering effects in some cases. That is, when the filtering is applied at each step, the desired effect may also occur when the adverse effect occurs when the filtering is applied at another step.
  • the interpolation target decimal pixel may apply filtering to adjacent integer pixels.
  • the reference pixel filtering is applied in the previous step of this example (that is, to an integer unit pixel).
  • the filtering of the reference pixels may reduce the quantization error of each integer pixel.
  • the pixels may be used in the reference pixel interpolation process, and thus, the quantization error may be further included in the pixel to be interpolated.
  • the input pixel value of the reference pixel filtering process S1 is a neighboring pixel of the neighboring block that has been decoded / decoded, and the output value obtained through the process is likely to be close to the original that reduced the quantization error included in the decode / decode. High pixel.
  • the input pixel value of the reference pixel interpolation process S2 is an adjacent pixel of a neighboring block in which the sub / decoding is completed, and the output value obtained through the above process is a pixel that is likely to be close to the original pixel value of the corresponding pixel position.
  • interpolation pixels are obtained by applying weights to neighboring pixels of a neighboring block including quantization errors (that is, filtering is not applied to reduce quantization errors, but quantization errors can also be given through the above process). Since there is a possibility that a pixel close to the original, which also reduces the quantization error, is obtained. That is, not only the generation of the fractional pixel but also the low pass filter effect may exist.
  • a plurality of reference pixel sets are configured as candidate groups so that two or more reference pixel sets (two or more of ref_1, ref_2, and ref3 in FIG. 29) are selected and used for intra prediction.
  • a first prediction block may be generated through a reference pixel set ref_A. That is, the prediction block PA may be generated using ref_A * obtained through a pre-prediction process such as reference pixel generation, reference pixel filtering, and reference pixel interpolation using ref_A.
  • a prediction block PB may be generated using ref_B * obtained through the pre-prediction process of ref_B.
  • the final prediction block P may be generated through the obtained plurality of prediction blocks.
  • 3-tap low pass filtering is applied to a pixel located at ref_A through a reference pixel filter unit
  • 4-tap is applied to a pixel located at ref_A '(ie, a pixel after reference pixel filtering) through a reference pixel interpolator.
  • Cubic filtering can be applied.
  • 5-tap low pass filtering may be applied to a pixel located at ref_B
  • 6-tap linear interpolation filtering may be applied to a pixel located at ref_B '(ie, a pixel after reference pixel filtering).
  • Each prediction block is generated using ref_A * and ref_B * obtained through the above process, and then the prediction is performed by applying a weighted average (for example, high weight to a prediction block adjacent to the current block. You can create a block.
  • a weighted average for example, high weight
  • a prediction block may be generated through reference pixel sets ref_A and ref_B.
  • reference pixels are generated using ref_A and ref_B, and reference pixel filtering.
  • a prediction block P may be generated using ref * obtained through a pre-prediction process such as reference pixel interpolation.
  • 3-tap low pass filtering may be applied to a pixel positioned at ref_A through a reference pixel filter unit, and 4-tap Cubic filtering may be applied to a pixel positioned at ref_A 'through a reference pixel interpolator.
  • 5-tap low pass filtering may be applied to a pixel positioned at ref_B, and 2-tap linear interpolation filtering may be applied to a pixel positioned at ref_B '.
  • the prediction block may be generated after acquiring ref * using ref_A * and ref_B * obtained through the above process. That is, according to the prediction mode, the pixel value corresponding to the directionality of the intra prediction mode in each reference pixel set (for example, pa in ref_A * and pb in ref_B *) is obtained and then the weighted average (for example, pa x A + pb x B) may be applied to generate the prediction block.
  • the weighted average for example, pa x A + pb x B
  • ⁇ 1> and ⁇ 2>, etc. (where ⁇ 1> is a weighted average between prediction blocks after generating a prediction block in each reference pixel set, and ⁇ 2> is a weight between pixels in one prediction block generation. Applying the average, i.e., obtaining the same or similar results but having a difference in the process) can generate a prediction block using two or more sets of reference pixels.
  • the following is a pre-prediction process when using two or more reference pixel sets.
  • adjacent Ps among the reference pixels available in the reference pixel set ref_1 are used. Generate pixels from positions P (0, -1) to P (n-1, -1) of Ref_T at ref_1 through (-1, -1) and P (n, -1), and reference pixel set ref_2 Pixels at positions P (0, -2) to P (n-1, -2) at Ref_T at ref_2 through adjacent P (-1, -2) and P (n, -2) among available reference pixels at Can be generated.
  • the usable pixels of ref_2 may be generated at the unavailable pixel positions of ref_1, and the usable pixels of ref_2 and ref_1 may be generated as above at the unusable pixel positions of ref_2. .
  • filtering may be applied to pixels adjacent to the target pixel, and in the case of the reference pixel interpolation unit, filtering may be applied to pixels adjacent to the pixel to be interpolated.
  • an adverse effect may be applied to the filtering application.
  • a plurality of candidate groups for example, ⁇ No filtering or 3-tap filtering or 5-tap filtering> which are candidate groups for reference pixel filters.
  • One solution is to select one of the reference pixel interpolation candidates, ⁇ 4-tap filtering or 6-tap filtering>), and one solution can be solved implicitly. Let's take a look at some of the best ways to do this.
  • an intra prediction process is described when a prediction block is generated using one reference pixel set or two or more reference pixel sets.
  • a temporary memory for a reference pixel used for prediction may be required and may have a primary or secondary array.
  • the reference pixels are configured through the primary array as shown in the figure.
  • pixels located in the reference pixel set used for prediction may be filled in ref.
  • the reference pixel filter unit may pass through the reference pixel filter unit after constructing or generating the reference pixel such as the reference pixel generator.
  • a reference pixel obtained through the reference pixel filter unit is referred to as ref '.
  • ref * the reference pixel obtained through the reference pixel interpolation process at ref ' is expressed as ref *, and a prediction block may be generated using ref *.
  • decimal unit pixels composed of ref * interpolated using ref' (Fig. 12b)
  • the reference pixel filter process and the reference pixel interpolation process are performed in sequence, so that the integer unit pixels obtained through this process are selected.
  • reference pixels with low accuracy due to redundant filtering may be obtained. Therefore, it is necessary to apply it separately.
  • reference pixel filtering may be omitted and only reference pixel interpolation may be performed.
  • the pixels in integer units used for prediction may be existing adjacent pixels to which reference pixel filtering is not applied, and the pixels in fractional units may be pixels to which interpolation is applied to existing adjacent integer pixels.
  • decimal unit pixels composed of ref * interpolated using ref (FIG. 34C)
  • ref instead of ref 'may be used as a reference pixel used when interpolating a decimal unit of pixels.
  • the pixel in integer units used for prediction may be a pixel to which reference pixel filtering is applied
  • the pixel in fractional unit may be a pixel to which interpolation is applied to an existing adjacent pixel that is a pixel before the reference pixel filtering.
  • FIG. 34 the number of times the filtering is applied to the pixel at each position in ref through b through d is illustrated.
  • 34 illustrates an example in which a reference pixel is configured by applying a maximum of one filtering in the case of c and d.
  • ref_A After constructing ref_A, ref_A 'can be obtained through the reference pixel filter unit, and ref_A * can be obtained after the reference pixel interpolation process is performed in ref_A'.
  • a prediction block may be generated using * and ref_B * (that is, ref * in b of FIG. 34). In this case, a prediction block may be generated using integer units or fractional units of pixels present in ref_A * and ref_B * according to the prediction mode.
  • a prediction pixel may be generated (eg, a vertical or horizontal mode) using two integer units pixels in ref_A and ref_B according to the direction of the prediction mode, and one integer unit pixel and one decimal point may be used.
  • Predictive pixels may be generated (eg, directional mode) using unit pixels, and predictive pixels may be generated (eg, directional mode, etc.) using two fractional unit pixels. This can be confirmed through b to d in FIG. 35.
  • b of FIG. C of 35 may be three times and d of FIG. 35 may be four times.
  • reference pixel filtering may be omitted in each reference pixel set and only the reference pixel interpolation process may be performed.
  • the integer unit used for prediction may be an existing adjacent pixel to which reference pixel filtering is not applied, and the pixels of the decimal unit may be a pixel to which interpolation is applied to an existing adjacent integer unit pixel.
  • applying filtering to pixels similar to the target pixel may be more efficient in reducing quantization error.
  • Performing prediction using two or more reference pixel sets in this example means that the directionality of the current block also exists at the boundary of the block containing the reference pixel (ie, two or more reference pixel sets adjacent to the current block).
  • applying the filtering using only the nearest pixel irrespective of the direction of the prediction mode of the current block is the same as applying the filtering to pixels that may be different based on the target pixel and the original pixel value.
  • reference pixel filtering and reference pixel interpolation processes may be performed in each reference pixel set.
  • pixels to which reference pixel filtering is applied may be used, and the weighted average is applied using pixels in integer units and fractional units as shown in c of FIG. 35. In the integer unit pixel used when the reference pixel filtering is not applied.
  • (3) and (4) are fixedly used (e.g., regardless of the state of the size, shape, prediction mode, etc. of the current block), or if adaptively used ( For example, it may be determined according to the state of the current block).
  • the settings set in (3) and (4) may be applied to all or a part of them, and in some cases, a change or the opposite example may be applied.
  • a 5 tap low pass filter may be performed in some modes (3) (eg, vertical, horizontal, diagonal mode having an angle of 45, 135 degrees, etc.).
  • a 5 tap low pass filter may be performed in some modes (3).
  • sophisticated filtering assuming a long tap number is elaborate in this example) can be performed to reduce quantization error.
  • a 3 tap low pass filter may be performed, and a 6 tap Gaussian interpolation filter may be performed.
  • This example applies to the reference pixel filtering to the integer units and to filter when the pixels are interpolated using the pixels.
  • simple filtering for example, different filter types or a small number of pixels to which the filter is applied or a small number of taps is assumed to be simple
  • a block having a predetermined size or more may perform a 5 tap low pass filter, and perform a 4 tap cubic interpolation filter, but the pixels applied to the interpolation may be low pass filtering.
  • the preceding pixel that is, integer unit pixel
  • the same reference pixel filtering and reference pixel interpolation process as the above process are performed, but the pixel applied to interpolation may be a pixel after low pass filtering as an input pixel.
  • some modes are more sophisticated than in the case of using a 5 tap low pass filter for each reference pixel set (i.e. using a 3 tap filter in other directional modes). Filters, or even with the same number of taps).
  • filtering may be performed to reduce quantization error.
  • a 5-tap low pass filter may be performed on a reference pixel set adjacent to the current block, and a 3-tap low pass filter may be performed on a next reference pixel set.
  • sophisticated filtering may be performed on a reference pixel set (in this example, an additional weight is added to the one close to the current block) to which a weight is assigned higher among two or more reference pixel sets.
  • a 5-tap low pass filter is performed on the reference pixel set adjacent to the current block, and a low pass filter is not performed on the next adjacent reference pixel set.
  • a case in which a low pass filter is applied to a pixel adjacent to a reference pixel set belonging to a reference pixel set to which the pixel has a higher weight and a pixel adjacent to the pixel among other reference pixel sets is applied. (I.e., if it was 1D filtering in the conventional case, it can be understood as 2D filtering concept in this example).
  • a 3 tap low pass filter is performed on each reference pixel set, and a 8 tap cubic interpolation filter is applied to the reference pixel set adjacent to the current block.
  • a 2-tap linear interpolation filter may be performed on the next adjacent reference pixel set.
  • a 6 tap Gaussian interpolation filter may be performed on a reference pixel set adjacent to the current block, and then a 4-tap Gaussian interpolation filter may be performed on an adjacent reference pixel set.
  • a 5 tap low pass filter may be performed on a reference pixel set adjacent to the current block
  • a 3-tap low pass filter may be performed on an adjacent reference pixel set
  • a 4 tap cubic interpolation filter may be performed on each reference pixel set.
  • a 3-tap low pass filter is performed on the reference pixel set A adjacent to the current block, and a low pass filter is not performed on the next adjacent reference pixel set B, and the reference pixel set A adjacent to the current block is performed.
  • An 8 tap Gaussian interpolation filter may be performed, and a 4 tap Cubic interpolation filter may be performed on an adjacent reference pixel set B.
  • a 4 tap Cubic interpolation filter may be performed without performing a low pass filter on each reference pixel set.
  • some sub-size and some-size blocks e.g., 16 x 16 to 64 x 64
  • the integer unit pixel may use the pixel before low pass filtering.
  • a block less than some size (16 x 16) performs a 5 tap low pass filter on each set of reference pixels, and performs a 6-tap Cubic interpolation filter. All of the pixels after low pass filtering can be used.
  • Explicit processing of pre-prediction processes may be possible. That is, selection information on whether to use one reference pixel set or a plurality of reference pixels may be generated, and to select whether to perform filtering on the reference pixel filtering setting or to use filter A or filter B. Information may be generated and selection information may be generated whether to perform using filter A or filter B with respect to reference pixel interpolation settings.
  • the number of reference pixel sets, reference pixel filtering settings, and reference pixel interpolation settings may be implicitly determined according to encoding information (state) such as a block size, shape, and prediction mode.
  • encoding information state
  • the same reference pixel filtering, reference pixel interpolation setting, or other setting may be implicitly determined in the plurality of reference pixel sets.
  • mixed processing for the pre-prediction process may be possible.
  • implicit processing can be done, and in some cases, explicit processing can be done.
  • the reference for the mixed processing may be determined according to the encoding information. That is, it may be determined whether to process implicitly or explicitly according to a block size or shape or a combination of at least one or more of prediction modes.
  • Intra-picture prediction settings for example, pre-prediction processing, etc.
  • Intra picture prediction mode candidate group configuration that is, the case where the number of intra picture prediction modes, the prediction direction, and the like are determined by the encoding information may also be adaptive).
  • ⁇ 2> Check the size, shape, and prediction mode of the current block (in this case, the prediction mode is defined in the intra prediction mode candidate group determined in the above process).
  • Reference pixel filtering settings (if there are two or more reference pixel sets, the filtering settings can be determined in each set)
  • Reference pixel interpolation settings also, if there are two or more reference pixel sets, the interpolation settings may be determined in each set
  • Intra prediction mode candidate group setting (parsing and restoring prediction mode information according to this candidate group)
  • the intra prediction mode candidate group may be checked according to the state of the current block. That is, it checks which mode number and candidate group having a mode configuration is used. If all the conditions have the same intra prediction mode candidate group, it does not matter, but it is checked if the image uses more than one intra prediction mode candidate group. That is, it is possible to know which candidate group to use according to the state of the current block or to know which candidate group is explicitly used through the information.
  • a prediction mode number and the like are allocated. If the prediction mode candidate group is different, the direction or angle of each prediction mode is different according to the candidate group, and thus a process of unifying them may be necessary. That is, when using the prediction mode in FIG. 9, 50 may be a vertical mode, but 50 may not be a vertical mode in another prediction mode candidate group, so it should be checked.
  • the intra-prediction process for example, reference pixel interpolation, reference pixel filtering, etc.
  • the state of the current block may be defined according to at least one or more factors in the size, shape, prediction mode, and the like of the current block.
  • Reference pixel sets, reference pixel filtering, reference pixel interpolation, etc. are set according to the state of the current block. That is, the number of reference pixel sets, which reference pixel set to use, whether to apply reference pixel filtering, and which filter to use may be checked. If explicitly checking related information, a flag may be generated, and if it is implied, encoding information (the state of the current block, etc. above, or the current image type ⁇ I / P / B>, the color type of the current image ⁇ Y / Cb / Cr>, etc. may affect the intra prediction setting).
  • a reference block is generated (extrapolated, averaged, interpolated) according to a prediction mode as in the past, or a reference pixel other than the reference pixel used according to the existing direction is used.
  • a reference pixel is generated (extrapolated, averaged, interpolated) according to a prediction mode as in the past, or a reference pixel other than the reference pixel used according to the existing direction is used.
  • whether to generate the prediction block by additionally using another reference pixel or the like and adding the correction value to the existing prediction value according to the encoding information. May be determined. In this case as well, in case of explicit information, it is possible to know which prediction method to use. Otherwise, in case of implicit, it is possible to decide which prediction method to use.
  • related descriptions may be derived inversely through the contents of the encoder.
  • the relevant information is parsed, and the implicit part is also for identifying the relevant information according to the encoding information.
  • the reference pixel filtering setting and the reference pixel interpolation setting may be determined in consideration of a setting content portion that is changed according to the number of reference pixel sets used in the present invention.
  • the present invention can be used to encode / decode a video signal.

Abstract

본 발명에 따른 화면내 예측 방법 및 장치는, 현재 블록의 화면내 예측 모드를 유도하고, 복수의 화소 라인 중 현재 블록의 화면내 예측을 위한 화소 라인을 결정하며, 화면내 예측 모드와 화소라인을 기반으로, 현재 블록의 화면내 예측을 수행할 수 있다. 또한, 결정된 화소 라인의 제1 참조 화소를 선택적으로 필터링하고, 현재 블록의 예측 화소를 선택적으로 보정하여, 화면내 예측의 정확도를 향상할 수 있다.

Description

화면내 예측 방법 및 장치
본 발명은 영상 부호화 및 복호화 기술에 관한 것으로, 더욱 상세하게는, 화면내 예측에서의 부호화/복호화 방법 및 장치에 관한 것이다.
최근 HD(High Definition) 영상 및 UHD(Ultra High Definition) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 응용 분야에서 증가하고 있고, 이에 따라 고효율의 영상 압축 기술들이 논의되고 있다.
영상 압축 기술로 현재 픽쳐의 이전 또는 이후 픽쳐로부터 현재 픽쳐에 포함된 화소값을 예측하는 화면간 예측 기술, 현재 픽쳐 내의 화소 정보를 이용하여 현재 픽쳐에 포함된 화소값을 예측하는 화면내 예측 기술, 출현 빈도가 높은 값에 짧은 부호를 할당하고 출현 빈도가 낮은 값에 긴 부호를 할당하는 엔트로피 부호화 기술 등 다양한 기술이 존재하고 이러한 영상 압축 기술을 이용해 영상 데이터를 효과적으로 압축하여 전송 또는 저장할 수 있다.
본 발명은 영상 부호화 및 복호화 기술에 관한 것으로, 더욱 상세하게는, 화면내 예측에서의 부호화/복호화 방법 및 장치에 관한 것이다.
본 발명에 따른 화면내 예측 방법 및 장치는, 현재 블록의 화면내 예측 모드를 유도하고, 복수의 화소 라인 중 상기 현재 블록의 화면내 예측을 위한 화소 라인을 결정하며, 상기 화면내 예측 모드와 상기 결정된 화소 라인을 기반으로 상기 현재 블록의 화면내 예측을 수행할 수 있다.
본 발명에 따른 화면내 예측 방법 및 장치는, 상기 결정된 화소 라인의 제1 참조 화소를 필터링할 수 있다.
본 발명에 따른 화면내 예측 방법 및 장치에 있어서, 상기 필터링하는 단계는, 상기 화면내 예측을 위한 제1 참조 화소에 필터링이 수행되는지 여부를 나타내는 제1 플래그에 기초하여 선택적으로 수행될 수 있다.
본 발명에 따른 화면내 예측 방법 및 장치에 있어서, 상기 제1 플래그는, 상기 현재 블록의 부호화 파라미터에 기초하여 복호화 장치에서 유도되고, 상기 부호화 파라미터는, 블록 크기, 성분 타입, 화면내 예측 모드 또는 서브 블록 단위의 화면내 예측이 적용되는지 여부 중 적어도 하나를 포함할 수 있다.
본 발명에 따른 화면내 예측 방법 및 장치는, 상기 화면내 예측에 따른 상기 현재 블록의 예측 화소를 보정할 수 있다.
본 발명에 따른 화면내 예측 방법 및 장치에 있어서, 상기 보정하는 단계는, 상기 현재 블록의 예측 화소의 위치에 기초하여, 상기 보정을 위한 제2 참조 화소 또는 가중치 중 적어도 하나를 결정하는 단계를 더 포함할 수 있다.
본 발명에 따른 화면내 예측 방법 및 장치에 있어서, 상기 보정하는 단계는, 상기 현재 블록의 화소 라인의 위치, 상기 현재 블록의 화면내 예측 모드 또는, 상기 현재 블록의 서브 블록 단위의 화면내 예측을 수행하는지 여부 중 적어도 하나를 고려하여 선택적으로 수행될 수 있다.
본 발명에 따른 화면내 예측 방법 및 장치에 있어서, 상기 화면내 예측은, 상기 현재 블록의 서브 블록의 단위로 수행되고, 상기 서브 블록은, 분할 여부에 관한 제2 플래그, 분할 방향 정보 또는 분할 개수 정보 중 적어도 하나에 기초하여 결정될 수 있다.
본 발명에 따른 화면내 예측 방법 및 장치에 있어서, 상기 현재 블록의 화면내 예측 모드는, 소정의 디폴트 모드 또는 복수의 MPM 후보를 기반으로 유도될 수 있다.
본 발명에 따르면, 서브 블록 단위의 예측을 통해 부호화/복호화 효율을 향상시킬 수 있다.
본 발명에 따르면, 다중 화소 라인 기반의 화면내 예측을 통해 화면내 예측의 부호화/복호화 효율을 향상시킬 수 있다.
본 발명에 따르면, 참조 화소의 필터링을 통해 화면내 예측의 부호화/복호화 효율을 향상시킬 수 있다.
본 발명에 따르면, 화면내 예측 화소의 보정을 통해 화면내 예측의 부호화/복호화 효율을 향상시킬 수 있다.
본 발명에 따르면, 디폴트 모드 또는 MPM 후보 기반으로 화면내 예측 모드를 유도함으로써, 화면내 예측 모드의 부호화/복호화 효율을 향상시킬 수 있다.
도 1은 본 발명의 일 실시예에 따른 영상 부호화 장치의 블록도이다.
도 2는 본 발명의 일 실시예에 따른 영상 복호화 장치의 블록도이다.
도 3은 트리 기반의 블록 형태를 나타낸 예시도이다.
도 4는 타입 기반의 블록 형태를 나타낸 예시도이다.
도 5는 본 발명의 블록 분할부에서 획득할 수 있는 다양한 블록의 형태를 나타낸 예시도이다.
도 6는 본 발명의 일 실시예에 따른 트리 기반의 분할을 설명하기 위한 예시도이다.
도 7은 본 발명의 일 실시예에 따른 트리 기반의 분할을 설명하기 위한 예시도이다.
도 8은본 발명의 일 실시예에 따른 블록 분할 과정을 나타낸다.
도 9는 영상 부호화/복호화 장치에 기-정의된 화면내 예측 모드를 나타낸 예시도이다.
도 10은 상관성 정보를 획득하기 위하여 컬러 공간 간의 비교되는 화소의 예를 나타낸다.
도 11은 화면내 예측에 사용되는 참조 화소 구성을 설명하기 위한 예시도이다.
도 12는 화면내 예측에 사용되는 참조 화소 범위를 설명하기 위한 예시도이다.
도 13은 예측 블록 생성과 관련하여 현재 블록과 인접한 블록을 나타내는 그림이다.
도 14와 15는 각 블록이 분할 정보를 확인하기 위한 일부의 예시이다.
도 16은 블록 분할에 대한 다양한 경우를 나타내는 예시도이다.
도 17은 본 발명의 일 실시예에 따른 블록 분할 예를 나타낸다.
도 18은 예측 정보가 발생하는 블록(본 예에서 예측 블록. 2N x N)의 화면내 예측 모드 후보군 설정에 대한 다양한 예를 나타낸다.
도 19는 예측 정보가 발생하는 블록(본 예에서 예측 블록. N x 2N)의 화면내 예측 모드 후보군 설정에 대한 다양한 예를 나타낸다.
도 20은 본 발명의 일 실시예에 따른 블록 분할 예를 나타낸다.
도 21과 도 22는 예측 정보가 발생하는 블록의 화면내 예측 모드 후보군 설정에 대한 다양한 예를 나타낸다.
도 23 내지 도 25는 이웃 블록의 예측 모드에 따른 예측 블록 생성에 대한 예를 나타낸다.
도 26은 현재 블록과 이웃 블록의 관계에 대한 예시도이다.
도 27 및 도 28은 예측 모드의 방향성을 고려한 화면내 예측을 도시한 것이다.
도 29는 화면내 예측에 사용되는 참조 화소 구성을 설명하기 위한 예시도이다.
도 30 내지 도 35는 참조 화소 구성에 대한 예시도이다.
본 발명에 따른 화면내 예측 방법 및 장치는, 현재 블록의 화면내 예측 모드를 유도하고, 복수의 화소 라인 중 상기 현재 블록의 화면내 예측을 위한 화소 라인을 결정하며, 상기 화면내 예측 모드와 상기 결정된 화소 라인을 기반으로 상기 현재 블록의 화면내 예측을 수행할 수 있다.
본 발명에 따른 화면내 예측 방법 및 장치는, 상기 결정된 화소 라인의 제1 참조 화소를 필터링할 수 있다.
본 발명에 따른 화면내 예측 방법 및 장치에 있어서, 상기 필터링하는 단계는, 상기 화면내 예측을 위한 제1 참조 화소에 필터링이 수행되는지 여부를 나타내는 제1 플래그에 기초하여 선택적으로 수행될 수 있다.
본 발명에 따른 화면내 예측 방법 및 장치에 있어서, 상기 제1 플래그는, 상기 현재 블록의 부호화 파라미터에 기초하여 복호화 장치에서 유도되고, 상기 부호화 파라미터는, 블록 크기, 성분 타입, 화면내 예측 모드 또는 서브 블록 단위의 화면내 예측이 적용되는지 여부 중 적어도 하나를 포함할 수 있다.
본 발명에 따른 화면내 예측 방법 및 장치는, 상기 화면내 예측에 따른 상기 현재 블록의 예측 화소를 보정할 수 있다.
본 발명에 따른 화면내 예측 방법 및 장치에 있어서, 상기 보정하는 단계는, 상기 현재 블록의 예측 화소의 위치에 기초하여, 상기 보정을 위한 제2 참조 화소 또는 가중치 중 적어도 하나를 결정하는 단계를 더 포함할 수 있다.
본 발명에 따른 화면내 예측 방법 및 장치에 있어서, 상기 보정하는 단계는, 상기 현재 블록의 화소 라인의 위치, 상기 현재 블록의 화면내 예측 모드 또는, 상기 현재 블록의 서브 블록 단위의 화면내 예측을 수행하는지 여부 중 적어도 하나를 고려하여 선택적으로 수행될 수 있다.
본 발명에 따른 화면내 예측 방법 및 장치에 있어서, 상기 화면내 예측은, 상기 현재 블록의 서브 블록의 단위로 수행되고, 상기 서브 블록은, 분할 여부에 관한 제2 플래그, 분할 방향 정보 또는 분할 개수 정보 중 적어도 하나에 기초하여 결정될 수 있다.
본 발명에 따른 화면내 예측 방법 및 장치에 있어서, 상기 현재 블록의 화면내 예측 모드는, 소정의 디폴트 모드 또는 복수의 MPM 후보를 기반으로 유도될 수 있다.
본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.
제1, 제2, A, B 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.
본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.
다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 것을 의미한다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.
영상 부호화 장치 및 복호화 장치는 개인용 컴퓨터(PC:Personal Computer), 노트북 컴퓨터, 개인 휴대 단말기(PDA: Personal Digital Assistant), 휴대형 멀티미디어 플레이어(PMP: Portable Multimedia Player), 플레이스테이션 포터블(PSP: PlayStation Portable), 무선 통신 단말기(Wireless Communication Terminal), 스마트폰(Smart Phone), TV, 가상 현실 디바이스(Virtual Reality. VR), 증강 현실 디바이스(Augmented Reality. AR), 혼합 현실 디바이스(Mixed Reality. MR), 머리 착용 디바이스(Head Mounted Display. HMD), 스마트 안경(Smart Glasses) 등과 같은 사용자 단말기이거나 응용 서버와 서비스 서버 등 서버 단말기일 수 있으며, 각종 기기 또는 유무선 통신망과 통신을 수행하기 위한 통신 모뎀 등의 통신 장치, 영상을 부호화하거나 복호화하거나 부호화 또는 복호화를 위해 화면내 또는 화면간 예측하기 위한 각종 프로그램과 데이터를 저장하기 위한 메모리(Memory), 프로그램을 실행하여 연산 및 제어하기 위한 프로세서(Processor) 등을 구비하는 다양한 장치를 포함할 수 있다. 또한, 영상 부호화 장치에 의해 비트스트림으로 부호화된 영상은 실시간 또는 비실시간으로 인터넷, 근거리 무선 통신망, 무선랜망, 와이브로망, 이동통신망 등의 유무선 통신망(Network) 등을 통하거나 케이블, 범용 직렬 버스(USB: Universal Serial Bus) 등과 같은 다양한 통신 인터페이스를 통해 영상 복호화 장치로 전송되어 영상 복호화 장치에서 복호화되어 영상으로 복원되고 재생될 수 있다.
또한, 영상 부호화 장치에 의해 비트스트림으로 부호화된 영상은 컴퓨터 판독 가능한 기록 매체를 통하여 부호화 장치에서 복호화 장치로 전달될 수도 있다.
전술한 영상 부호화 장치와 영상 복호화 장치는 각각 별도의 장치들일 수 있으나, 구현에 따라서 하나의 영상 부호화/복호화 장치로 만들어질 수 있다. 그 경우, 영상 부호화 장치의 일부 구성은 영상 복호화 장치의 일부 구성과 실질적으로 동일한 기술요소로서 적어도 동일한 구조를 포함하거나 적어도 동일한 기능을 수행하도록 구현될 수 있다.
따라서 이하의 기술요소들과 이들의 작동 원리 등에 대한 상세 설명에서는 대응 기술요소들의 중복되는 설명을 생략하기로 한다.
그리고 영상 복호화 장치는 영상 부호화 장치에서 수행되는 영상 부호화 방법을 복호화에 적용하는 컴퓨팅 장치에 대응하므로, 이하의 설명에서는 영상 부호화 장치를 중심으로 설명하기로 한다.
컴퓨팅 장치는 영상 부호화 방법 및/또는 영상 복호화 방법을 구현하는 프로그램이나 소프트웨어 모듈을 저장하는 메모리와 메모리에 연결되어 프로그램을 수행하는 프로세서를 포함할 수 있다. 그리고 영상 부호화 장치는 부호화기로, 영상 복호화 장치는 복호화기로 각각 지칭될 수 있다.
통상적으로 영상은 일련의 정지 영상(Still Image)으로 구성될 수 있으며, 이 정지 영상들은 GOP(Group of Pictures) 단위로 구분될 수 있고, 각 정지 영상을 픽쳐(Picture)라고 지칭할 수 있다. 이때, 픽쳐는 프로그레시브(Progressive) 신호, 인터레이스(Interlace) 신호에서의 프레임(Frame), 필드(Field) 중 하나를 나타낼 수 있고, 부호화/복호화가 프레임 단위로 수행될 경우 영상은 '프레임', 필드 단위로 수행될 경우 '필드'로 나타낼 수 있다. 본 발명에서는 프로그레시브 신호를 가정하고 설명하지만, 인터레이스 신호에도 적용 가능할 수 있다. 상위 개념으로는 GOP, 시퀀스(Sequence)등의 단위가 존재할 수 있으며, 또한, 각 픽쳐는 슬라이스, 타일, 블록 등과 같은 소정의 영역으로 분할될 수 있다. 또한, 하나의 GOP에는 I 픽쳐, P 픽쳐, B 픽쳐 등의 단위가 포함될 수 있다. I 픽쳐는 참조 픽쳐를 사용하지 않고 자체적으로 부호화/복호화되는 픽쳐를 의미할 수 있으며, P 픽쳐와 B 픽쳐는 참조 픽쳐를 사용하여 움직임 추정(Motion Estimation) 및 움직임 보상(Motion Compensation) 등의 과정을 수행하여 부호화/복호화 하는 픽쳐를 의미할 수 있다. 일반적으로 P 픽쳐의 경우 I 픽쳐와 P 픽쳐를 참조 픽쳐로써 이용할 수 있으며, B 픽쳐의 경우 I 픽쳐와 P 픽쳐를 참조 픽쳐를 이용할 수 있으나, 이는 부호화/복호화의 설정에 의해 위의 정의 또한 변경될 수 있다.
여기서 부호화/복호화하는데 참조되는 픽쳐를 참조 픽쳐(Reference Picture)라고 하며, 참조되는 블록 또는 화소를 참조 블록(Reference Block), 참조 화소(Reference Pixel)라고 한다. 또한, 참조되는 데이터(Reference Data)는 공간 영역(Spatial Domain)의 화소값 뿐만 아니라 주파수 영역(Frequency Domain)의 계수값, 부호화/복호화 과정 중에 생성, 결정되는 다양한 부호화/복호화 정보일 수 있다. 예를 들어, 예측부에서 화면내 예측 관련 정보 또는 움직임 관련 정보, 변환부/역변환부에서 변환 관련 정보, 양자화부/역양자화부에서 양자화 관련 정보, 부호화부/복호화부에서는 부호화/복호화 관련 정보(문맥 정보), 인루프 필터부에서는 필터 관련 정보 등이 해당될 수 있다.
영상을 이루는 최소 단위는 화소(Pixel)일 수 있으며, 하나의 화소를 표현하는데 사용되는 비트수를 비트 심도(Bit Depth)라고 한다. 일반적으로 비트 심도는 8비트일 수 있으며 부호화 설정에 따라 그 이상의 비트 심도를 지원할 수 있다. 비트 심도는 컬러 공간(Color Space)에 따라 적어도 하나의 비트 심도가 지원될 수 있다. 또한, 영상의 컬러 포맷(Color Format)에 따라 적어도 하나의 컬러 공간으로 구성될 수 있다. 컬러 포맷에 따라 일정 크기를 갖는 1개 이상의 픽쳐 또는 다른 크기를 갖는 1개 이상의 픽쳐로 구성될 수 있다. 예를 들어, YCbCr 4:2:0인 경우 1개의 휘도 성분(본 예에서, Y)과 2개의 색차 성분(본 예에서, Cb/Cr)으로 구성될 수 있으며, 이때 색차 성분과 휘도 성분의 구성 비는 가로, 세로 1:2를 가질 수 있다. 다른 예로, 4:4:4인 경우 가로, 세로 동일한 구성 비를 가질 수 있다. 상기 예처럼 하나 이상의 컬러 공간으로 구성이 되는 경우 픽쳐는 각 컬러 공간으로의 분할을 수행할 수 있다.
본 발명에서는 일부 컬러 포맷(본 예에서, YCbCr)의 일부 컬러 공간(본 예에서, Y)을 기준으로 설명할 것이며, 컬러 포맷에 따른 다른 컬러 공간(본 예에서, Cb, Cr)에도 동일하거나 비슷한 적용(특정 컬러 공간에 의존적인 설정)을 할 수 있다. 그러나 각 컬러 공간에 부분적인 차이(특정 컬러 공간에 독립적인 설정)를 두는 것 또한 가능할 수 있다. 즉, 각 컬러 공간에 의존적인 설정은 각 성분의 구성 비(예를 들어, 4:2:0, 4:2:2, 4:4:4 등에 따라 결정)에 비례하거나 의존적인 설정을 갖는 것으로 의미할 수 있고, 각 컬러 공간에 독립적인 설정은 각 성분의 구성 비에 관계없거나 독립적으로 해당 컬러 공간만의 설정을 갖는 것으로 의미할 수 있다. 본 발명에서는 부/복호화기에 따라 일부 구성에 대해서는 독립적인 설정을 갖거나 의존적인 설정을 가질 수 있다.
영상 부호화 과정에서 필요한 설정 정보 또는 구문 요소(Syntax Element)는 비디오, 시퀀스, 픽쳐, 슬라이스, 타일, 블록 등의 단위 수준에서 정해질 수 있으며 이는 VPS(Video Parameter Set), SPS(Sequence Parameter Set), PPS(Picture Parameter Set), Slice Header, Tile Header, Block Header 등과 같은 단위로 비트스트림에 수록되어 복호화기로 전송될 수 있고, 복호화기에서는 동일 수준의 단위에서 파싱(Parsing)하여 부호화기에서 전송된 설정 정보를 복원하여 영상 복호화 과정에 사용할 수 있다. 또한, SEI(Supplement Enhancement Information) 또는 메타 데이터(Metadata) 등의 형태로 관련 정보를 비트스트림으로 전송하고 파싱하여 사용할 수 있다. 각 파라미터 세트는 고유의 아이디값을 갖고 있으며, 하위 파라미터 세트에서는 참조할 상위 파라미터 세트의 아이디값을 가질 수 있다. 예를 들어, 하위 파라미터 세트에서 하나 이상의 상위 파라미터 세트 중 일치하는 아이디값을 갖는 상위 파라미터 세트의 정보를 참조할 수 있다. 위에서 언급된 다양한 단위의 예 중 어떤 하나의 단위가 하나 이상의 다른 단위를 포함하는 경우에 해당하는 단위는 상위 단위, 포함되는 단위는 하위 단위라 칭할 수 있다.
상기 단위에서 발생하는 설정 정보의 경우 해당 단위마다 독립적인 설정에 대한 내용을 포함하거나 이전, 이후 또는 상위 단위 등에 의존적인 설정에 대한 내용을 포함할 수 있다. 여기서 의존적인 설정이란 이전, 이후, 상위 단위의 설정을 따른다는 플래그 정보(예를 들어, 1 비트 플래그로 1이면 따름. 0이면 따르지 않음)로 해당 단위의 설정 정보를 나타내는 것이라 이해될 수 있다. 본 발명에서의 설정 정보는 독립적인 설정에 대한 예를 중심으로 설명을 할 것이나, 현재 단위의 이전, 이후의 단위 또는 상위 단위의 설정 정보에 의존적인 관계에 대한 내용으로의 추가 또는 대체되는 예 또한 포함될 수 있다.
도 1은 본 발명의 일 실시예에 따른 영상 부호화 장치의 블록도이다. 도 2는 본 발명의 일 실시예에 따른 영상 복호화 장치의 블록도이다.
도 1을 참조하면, 영상 부호화 장치는 예측부, 감산부, 변환부, 양자화부, 역양자화부, 역변환부, 가산부, 인루프 필터부, 메모리 및/또는 부호화부를 포함하여 구성될 수 있으며, 위의 구성 중 일부는 반드시 포함되지 않을 수 있으며, 구현에 따라 일부 또는 전부가 선택적으로 포함될 수 있으며, 도시되지 않은 추가적인 일부 구성이 포함될 수 있다.
도 2를 참조하면, 영상 복호화 장치는 복호화부, 예측부, 역양자화부, 역변환부, 가산부, 인루프 필터부 및/또는 메모리를 포함하여 구성될 수 있으며, 위의 구성 중 일부는 반드시 포함되지 않을 수 있으며, 구현에 따라 일부 또는 전부가 선택적으로 포함될 수 있으며, 도시되지 않은 추가적인 일부 구성이 포함될 수 있다.
영상 부호화 장치와 영상 복호화 장치는 각각 별도의 장치들일 수 있으나, 구현에 따라서 하나의 영상 부호화/복호화 장치로 만들어질 수 있다. 그 경우, 영상 부호화 장치의 일부 구성은 영상 복호화 장치의 일부 구성과 실질적으로 동일한 기술요소로서 적어도 동일한 구조를 포함하거나 적어도 동일한 기능을 수행하도록 구현될 수 있다. 따라서 이하의 기술요소들과 이들의 작동 원리 등에 상세한 설명에서는 대응 기술요소들의 중복되는 설명을 생략하기로 한다. 영상 복호화 장치는 영상 부호화 장치에서 수행되는 영상 부호화 방법을 복호화에 적용하는 컴퓨팅 장치에 대응하므로, 이하의 설명에서는 영상 부호화 장치를 중심으로 설명하기로 한다. 영상 부호화 장치는 부호화기로, 영상 복호화 장치는 복호화기로 각각 지칭될 수 있다.
예측부는 화면내 예측을 수행하는 화면내 예측부와 화면간 예측을 수행하는 화면간 예측부를 포함할 수 있다. 화면내 예측은 현재 블록의 인접한 블록의 화소를 참조 화소로 구성하여 화면내 예측 모드를 결정하고, 상기 화면내 예측 모드를 사용하여 예측 블록을 생성할 수 있고, 화면간 예측은 하나 이상의 참조 영상을 이용하여 현재 블록의 움직임 정보를 결정하고, 상기 움직임 정보를 사용하여 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다. 현재 블록(부호화 단위 또는 예측 단위)에 대해 화면내 예측 또는 화면간 예측 중 어떤 방식을 사용할 지에 대한 것을 결정하고, 각 예측 방법에 따른 구체적인 정보(예를 들어, 화면내 예측 모드, 움직임 벡터, 참조 영상 등)를 결정할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 부/복호화 설정에 따라 정해질 수 있다. 예를 들어, 예측 방법, 예측 모드 등은 예측 단위(또는 부호화 단위)로 결정되고, 예측의 수행은 예측 블록 단위(또는 부호화 단위, 변환 단위)로 수행된다.
감산부는 현재 블록에서 예측 블록을 감산하여 잔차 블록(Residual Block)을 생성한다. 즉, 감산부는 부호화하고자 하는 현재 블록의 각 화소의 화소값과 예측부를 통해 생성된 예측 블록의 각 화소의 예측 화소값의 차이를 계산하여 블록 형태의 잔차 신호(Residual Signal)인 잔차 블록을 생성한다.
변환부는 공간 영역에 속하는 신호를 주파수 영역에 속하는 신호로 변환할 수 있으며, 이때 변환 과정을 거쳐 획득되는 신호를 변환 계수(Transformed Coefficient)라고 한다. 예를 들어, 감산부로부터 전달받은 잔차 신호를 갖는 잔차 블록을 변환하여 변환 계수를 갖는 변환 블록을 획득할 수 있는데, 입력 받은 신호는 부호화 설정에 따라 결정되며 이는 잔차 신호에 한정되지 않는다.
변환부는 잔차 블록을 하다마드 변환(Hadamard Transform), 이산 사인 변환(DST Based-Transform: Discrete Sine Transform), 이산 코사인 변환(DCT Based-Transform: Discrete Cosine Transform) 등과 같은 변환 기법을 사용하여 변환할 수 있으며, 이에 한정되지 않고 이를 개량 및 변형한 다양한 변환 기법이 사용될 수 있다.
예를 들어, 상기 변환 중 적어도 하나의 변환 기법이 지원될 수 있으며, 각 변환 기법에서 적어도 하나의 세부 변환 기법이 지원될 수 있다. 이때, 적어도 하나의 세부 변환 기법은 각 변환 기법에서 기저 벡터의 일부가 달리 구성되는 변환 기법일 수 있다. 예를 들어, 변환 기법으로 DST 기반의 변환과 DCT 기반의 변환이 지원될 수 있으며, DST의 경우 DST-I, DST-II, DST-III, DST-V, DST-VI, DST-VII, DST-VIII 등의 세부 변환 기법이 지원될 수 있고, DCT의 경우 DCT-I, DCT-II, DCT-III, DCT-V, DCT-VI, DCT-VII, DCT-VIII 등의 세부 변환 기법이 지원될 수 있다.
상기 변환 중 하나의 변환(예를 들어, 하나의 변환 기법 && 하나의 세부 변환 기법)이 기본 변환 기법으로 설정될 수 있으며, 이에 추가적인 변환 기법(예를 들어, 복수의 변환 기법 || 복수의 세부 변환 기법)을 지원할 수 있다. 추가적인 변환 기법 지원 여부는 시퀀스, 픽쳐, 슬라이스, 타일 등의 단위로 결정되어 상기 단위로 관련 정보가 생성될 수 있고, 추가적인 변환 기법 지원이 지원될 경우에 변환 기법 선택 정보는 블록 등의 단위로 결정되어 관련 정보가 생성될 수 있다.
변환은 수평/수직 방향으로 수행될 수 있다. 예를 들어, 변환에서의 기저 벡터를 이용하여 수평 방향으로 1차원 변환을 수행하고 수직 방향으로 1차원 변환을 수행하여 총 2차원 변환을 수행함으로써 공간 영역의 화소값을 주파수 영역으로 변환할 수 있다.
또한, 수평/수직 방향으로 변환이 적응적으로 수행될 수 있다. 상세하게는, 적어도 하나의 부호화 설정에 따라 적응적인 수행 여부가 결정될 수 있다. 예를 들어, 화면내 예측의 경우에서 예측 모드가 수평 모드일 경우에는 수평 방향으로는 DCT-I가, 수직 방향으로는 DST-I가 적용될 수 있고, 수직 모드일 경우에는 수평 방향으로는 DST-VI가, 수직 방향으로는 DCT-VI가 적용될 수 있고, Diagonal down left일 경우에는 수평 방향으로는 DCT-II, 수직 방향으로는 DCT-V가 적용될 수 있고, Diagonal down right일 경우에는 수평 방향으로는 DST-I, 수직 방향으로는 DST-VI가 적용될 수 있다.
변환 블록의 크기 및 형태의 후보별 부호화 비용에 따라 각 변환 블록의 크기 및 형태가 결정되고, 결정된 각 변환 블록의 영상 데이터 및 결정된 각 변환 블록의 크기 및 형태 등의 정보를 부호화할 수 있다.
상기 변환 형태 중 정사각 형태의 변환이 기본 변환 형태로 설정될 수 있으며, 이에 대한 추가적인 변환 형태(예를 들어, 직사각 형태)를 지원할 수 있다. 추가적인 변환 형태 지원 여부는 시퀀스, 픽쳐, 슬라이스, 타일 등의 단위로 결정되며 상기 단위로 관련 정보가 생성될 수 있고, 변환 형태 선택 정보는 블록 등의 단위로 결정되어 관련 정보가 생성될 수 있다.
또한, 변환 블록 형태의 지원은 부호화 정보에 따라 결정될 수 있다. 이때, 부호화 정보는 슬라이스 타입, 부호화 모드, 블록의 크기 및 형태, 블록 분할 방식 등이 해당될 수 있다. 즉, 적어도 하나의 부호화 정보에 따라 하나의 변환 형태가 지원될 수 있으며, 적어도 하나의 부호화 정보에 따라 복수의 변환 형태가 지원될 수 있다. 전자의 경우 묵시적(Implicit)인 상황일 수 있으며, 후자의 경우 명시적(Explicit)인 상황일 수 있다. 명시적인 경우는 복수의 후보군 중 최적의 후보군을 가리키는 적응적인 선택 정보를 생성하여 이를 비트스트림에 수록할 수 있다. 본 예를 포함하여 본 발명에서는 명시적으로 부호화 정보를 생성하는 경우에는 해당 정보를 다양한 단위로 비트스트림에 수록하고, 복호화기에서 다양한 단위로 관련 정보를 파싱하여 복호화 정보로 복원하는 것으로 이해될 수 있다. 또한, 묵시적으로 부/복호화 정보를 처리하는 경우에는 부호화기와 복호화기에서 동일한 과정, 규칙 등으로 처리되는 것으로 이해될 수 있다.
일 예로, 슬라이스 타입에 따라 직사각 형태의 변환 지원이 결정될 수 있다. I 슬라이스일 경우에 지원되는 변환 형태는 정사각 형태의 변환일 수 있으며, P/B 슬라이스일 경우 정사각 형태 또는 직사각 형태의 변환일 수 있다.
일 예로, 부호화 모드에 따라 직사각 형태의 변환 지원이 결정될 수 있다. Intra일 경우에 지원되는 변환 형태는 정사각 형태의 변환일 수 있으며, Inter일 경우에 지원되는 변환 형태는 정사각 형태와 또는 직사각 형태의 변환일 수 있다.
일 예로, 블록의 크기 및 형태에 따라 직사각 형태의 변환 지원이 결정될 수 있다. 일정 크기 이상의 블록에서 지원되는 변환 형태는 정사각 형태의 변환일 수 있으며, 일정 크기 미만의 블록에서 지원되는 변환 형태는 정사각 형태 또는 직사각 형태의 변환일 수 있다.
일 예로, 블록 분할 방식에 따라 직사각 형태의 변환 지원이 결정될 수 있다. 변환이 수행되는 블록이 쿼드 트리(Quad Tree) 분할 방식을 통해 획득된 블록일 경우 지원되는 변환의 형태는 정사각 형태의 변환일 수 있고, 바이너리 트리(Binary Tree) 분할 방식을 통해 획득된 블록일 경우 지원되는 변환의 형태는 정사각 형태 또는 직사각 형태의 변환일 수 있다.
상기 예는 하나의 부호화 정보에 따른 변환 형태 지원에 대한 예이며, 복수의 정보가 조합되어 추가적인 변환 형태 지원 설정에 관여할 수도 있다. 상기 예는 다양한 부호화 설정에 따라 추가적인 변환 형태 지원에 대한 일 예일 뿐 위에 한정되지 않으며 다양한 변형의 예가 가능할 수 있다.
부호화 설정 또는 영상의 특성에 따라 변환 과정은 생략할 수 있다. 예를 들어, 부호화 설정(본 예에서, 무손실 압축 환경이라 가정)에 따라 변환 과정(역과정도 포함)을 생략할 수 있다. 다른 예로, 영상의 특성에 따라 변환을 통한 압축 성능이 발휘되지 않는 경우에 변환 과정을 생략할 수 있다. 이때 생략하는 변환은 전체 단위일 수 있거나, 수평, 수직 단위 중 하나의 단위가 생략될 수 있으며, 이는 블록의 크기 및 형태 등에 따라 이와 같은 생략의 지원 여부가 결정될 수 있다.
예를 들어, 수평과 수직의 변환의 생략이 묶이는 설정에서는 변환 생략 플래그가 1일 경우에는 수평, 수직 방향으로 변환이 수행되지 않고, 0일 때는 수평, 수직 방향으로 변환이 수행될 수 있다. 수평과 수직의 변환의 생략이 독립적으로 동작하는 설정에서는 제 1 변환 생략 플래그가 1일 경우에는 수평 방향으로 변환이 수행되지 않고, 0일 경우에는 수평 방향으로 변환이 수행되며, 제 2 변환 생략 플래그 가 1일 경우에는 수직 방향으로 변환이 수행되지 않고, 0일 경우에는 수직 방향으로 변환이 수행된다.
블록의 크기가 범위 A에 해당되는 경우에는 변환 생략이 지원될 수 있고, 범위 B에 해당되는 경우에는 변환 생략이 지원될 수 없다. 예를 들어, 블록의 가로 길이가 M보다 크거나 블록의 세로 길이가 N보다 큰 경우에는 상기 변환 생략 플래그는 지원될 수 없고, 블록의 가로 길이가 m보다 작거나 블록의 세로 길이가 n보다 작은 경우에는 상기 변환 생략 플래그가 지원될 수 있다. M(m)과 N(n)은 같거나 다를 수 있다. 상기 변환 관련 설정은 시퀀스, 픽쳐, 슬라이스 등의 단위에서 결정될 수 있다.
추가적인 변환 기법이 지원될 경우, 변환 기법 설정은 적어도 하나의 부호화 정보에 따라 결정될 수 있다. 이때, 부호화 정보는 슬라이스 타입, 부호화 모드, 블록의 크기 및 형태, 예측 모드 등이 해당될 수 있다.
일 예로, 부호화 모드에 따라 변환 기법의 지원이 결정될 수 있다. Intra일 경우에 지원되는 변환 기법은 DCT-I, DCT-III, DCT-VI, DST-II, DST-III 일 수 있으며, Inter일 경우에 지원되는 변환 기법은 DCT-II, DCT-III, DST-III 일 수 있다.
일 예로, 슬라이스 타입에 따라 변환 기법의 지원이 결정될 수 있다. I 슬라이스일 경우에 지원되는 변환 기법은 DCT-I, DCT-II, DCT-III 일 수 있으며, P 슬라이스일 경우에 지원되는 변환 기법은 DCT-V, DST-V, DST-VI 일 수 있으며, B 슬라이스일 경우에 지원되는 변환 기법은 DCT-I, DCT-II, DST-III일 수 있다.
일 예로, 예측 모드에 따라 변환 기법의 지원이 결정될 수 있다. 예측 모드 A에서 지원되는 변환 기법은 DCT-I, DCT-II 일 수 있고, 예측 모드 B에서 지원되는 변환 기법은 DCT-I, DST-I 일 수 있고, 예측 모드 C에서 지원되는 변환 기법은 DCT-I 일 수 있다. 이때, 예측 모드 A, B는 방향성 모드(Directional Mode), 예측 모드 C는 비방향성 모드(Non-Directional Mode)일 수 있다.
일 예로, 블록의 크기 및 형태에 따라 변환 기법의 지원이 결정될 수 있다. 일정 크기 이상의 블록에서 지원되는 변환 기법은 DCT-II 일 수 있으며, 일정 크기 미만의 블록에서 지원되는 변환 기법은 DCT-II, DST-V 일 수 있으며, 일정 크기 이상과 일정 크기 미만의 블록에서 지원되는 변환 기법은 DCT-I, DCT-II, DST-I 일 수 있다. 또한, 정사각 형태에서 지원되는 변환 기법은 DCT-I, DCT-II 일 수 있고, 직사각 형태에서 지원되는 변환 기법은 DCT-I, DST-I 일 수 있다.
상기 예는 하나의 부호화 정보에 따른 변환 기법 지원에 대한 예이며, 복수의 정보가 조합되어 추가적인 변환 기법 지원 설정에 관여할 수도 있다. 상기 예의 경우에만 한정되지 않으며 다른 예로의 변형 또한 가능할 수 있다. 또한, 변환부는 변환 블록을 생성하는데 필요한 정보를 부호화부로 전달하여 이를 부호화하도록 할 수 있고, 그에 따른 정보를 비트스트림에 수록하여 이를 복호화기에 전송하고, 복호화기의 복호화부는 이에 대한 정보를 파싱하여 역변환 과정에 사용할 수 있다.
양자화부는 입력 받은 신호를 양자화할 수 있으며, 이때 양자화 과정을 거쳐 획득되는 신호를 양자화 계수(Quantized Coefficient)라고 한다. 예를 들어, 변환부로부터 전달받은 잔차 변환 계수를 갖는 잔차 블록을 양자화하여 양자화 계수를 갖는 양자화 블록을 획득할 수 있는데, 입력 받은 신호는 부호화 설정에 따라 결정되며 이는 잔차 변환 계수에 한정되지 않는다.
양자화부는 변환된 잔차 블록을 데드존 균일 경계 양자화(Dead Zone Uniform Threshold Quantization), 양자화 가중치 매트릭스(Quantization Weighted Matrix) 등과 같은 양자화 기법을 사용하여 양자화할 수 있으며, 이에 한정되지 않고 이를 개량 및 변형한 다양한 양자화 기법이 사용될 수 있다.
양자화부는 양자화 블록을 생성하는데 필요한 정보를 부호화부로 전달하여 이를 부호화하도록 할 수 있고, 그에 따른 정보를 비트스트림에 수록하여 이를 복호화기에 전송하고, 복호화기의 복호화부는 이에 대한 정보를 파싱하여 이를 역양자화 과정에 사용할 수 있다.
상기 예에서는 변환부와 양자화부를 통해 잔차 블록을 변환하고 양자화하는 가정 하에 설명하였지만, 잔차 블록을 잔차 신호를 변환하여 변환 계수를 갖는 잔차 블록을 생성하고 양자화 과정을 수행하지 않을 수 있으며, 잔차 블록의 잔차 신호를 변환 계수로 변환하지 않고 양자화 과정만을 수행할 수 있을 뿐만 아니라, 변환과 양자화 과정 모두 수행하지 않을 수 있다. 이는 부호화기 설정에 따라 결정될 수 있다.
부호화부는 생성된 잔차 블록의 양자화 계수, 변환 계수, 또는 잔차 신호 등을 적어도 하나의 스캔 순서(예를 들어, 지그재그 스캔, 수직 스캔, 수평 스캔 등)에 따라 스캔하여 양자화 계수열, 변환 계수열, 또는 신호열을 생성하고 적어도 하나의 엔트로피 부호화(Entropy Coding) 기법을 이용하여 부호화할 수 있다. 이때, 상기 스캔 순서에 대한 정보는 부호화 설정(예를 들어, 부호화 모드, 예측 모드 등)에 따라 정해질 수 있으며, 묵시적으로 정하거나 명시적으로 관련 정보를 생성할 수 있다. 예를 들어, 화면내 예측 모드에 따라 복수의 스캔 순서 중 하나를 선택할 수 있다. 이때, 스캔 패턴은 지그재그(Zig-Zag), 대각선, 래스터(Raster) 등의 다양한 패턴들 중 하나로 설정할 수 있다.
또한, 각 구성부로부터 전달되는 부호화 정보를 포함하는 부호화 데이터를 생성하여 비트스트림으로 출력할 수 있으며, 이는 멀티플렉서(MUX: Multiplexer)로 구현될 수 있다. 이때, 부호화 기법으로 지수 골룸(Exponential Golomb), 문맥 적응형 가변장 길이 부호화(CAVLC, Context Adaptive Variable Length Coding), 문맥 적응형 이진 산술 부호화(CABAC, Context Adaptive Binary Arithmetic Coding) 등과 같은 방법을 사용하여 부호화할 수 있으며, 이에 한정되지 않고 이를 개량 및 변형한 다양한 부호화 기법이 사용될 수 있다.
상기 잔차 블록 데이터와 부/복호화 과정에 생성되는 정보 등의 구문 요소(Syntax)에 대한 엔트로피 부호화(본 예에서는 CABAC이라 가정)을 수행할 때, 엔트로피 부호화 장치는 이진화부(Binarizer), 문맥 모델러(Context Modeler), 이진 산술 부호화부(Binary Arithmetic Coder)를 포함할 수 있다. 이때, 이진 산술 부호화부는 레귤러 코딩부(Regular Coding Engine)와 바이패스 코딩부(Bypass Coding Engine)를 포함할 수 있다. 이때, 레귤러 코딩부는 문맥 모델러와 관계되어 수행되는 과정일 수 있고, 바이패스 코딩부는 문맥 모델러와 관계없이 수행되는 과정일 수 있다.
상기 엔트로피 부호화 장치로 입력되는 구문 요소는 이진값이 아닐 수 있기 때문에, 구문 요소들이 이진값이 아닌 경우 이진화부는 구문 요소들을 이진화하여 0 또는 1로 구성된 빈 스트링(Bin String)을 출력할 수 있다. 이때, 빈은 0 또는 1로 구성된 비트를 나타내는 것으로 이진 산술 부호화부를 통해 부호화될 수 있다. 이때, 0과 1의 발생 확률에 기반하여 레귤러 코딩부 또는 바이패스 코딩부 중 하나가 선택될 수 있으며 이는 부/복호화 설정에 따라 결정될 수 있다. 구문 요소가 0과 1의 빈도가 동일한 데이터라면 바이패스 코딩부를 사용할 수 있고, 그렇지 않을 경우에는 레귤러 코딩부를 사용할 수 있으며 문맥 모델링(또는 문맥 정보 업데이트)를 통해 다음 레귤러 코딩부 수행시 참조할 수 있다.
이때, 문맥은 빈(Bin)의 발생 확률에 관한 정보로, 문맥 모델링은 이진화의 결과인 빈을 입력으로 하여 이진 산술 부호화에 필요한 빈의 확률을 추정하는 과정이다. 확률 추정을 위해 빈의 구문 요소 정보, 빈 스트링에서의 빈의 위치인 인덱스, 블록 주변 블록에 포함된 빈의 확률 등이 이용될 수 있으며, 이를 위한 적어도 하나의 문맥 테이블을 사용할 수 있다. 예를 들어, 일부 플래그를 위한 정보는 주변 블록의 플래그 사용 여부의 조합에 따라 복수 개의 문맥 테이블이 사용될 수 있다.
상기 구문 요소에 대한 이진화를 수행할 때 다양한 방법이 사용될 수 있다. 예를 들어, 고정 길이 이진화(Fixed Length Binarization)와 가변 길이 이진화(Variable Length Binarization)으로 구분할 수 있으며, 가변 길이 이진화의 경우 단항 이진화(Unary Binarization, Trunacted Unary Binarization), Rice 이진화(Truncated Rice Binarization), K-th Exp-Golomb 이진화, Truncated binary 이진화 등이 사용될 수 있다. 또한, 구문 요소가 갖는 값의 범위에 따라 부호가 있는 이진화 또는 부호가 없는 이진화가 수행될 수 있다. 본 발명에서 발생하는 구문 요소에 대한 이진화 과정은 상기 예에서 언급된 이진화뿐만 아니라 그 외 추가적인 이진화 방법을 포함하여 수행될 수 있다.
역양자화부 및 역변환부는 상기 변환부 및 양자화부에서의 과정을 역으로 수행하여 구현될 수 있다. 예를 들어, 역양자화부는 양자화부에서 생성된 양자화된 변환 계수를 역양자화할 수 있고, 역변환부는 역양자화된 변환 계수를 역변환하여 복원된 잔차 블록을 생성할 수 있다.
가산부는 예측 블록과 복원된 잔차 블록을 가산하여 현재 블록을 복원한다. 복원된 블록은 메모리에 저장되어 참조 데이터(예측부 및 필터부 등)로서 사용될 수 있다.
인루프 필터부는 디블록킹 필터, 화소 적응적 오프셋(Sample Adaptive Offset, SAO), 적응적 루프 필터(Adaptive Loop Filter, ALF) 등의 적어도 하나의 후처리 필터 과정을 포함할 수 있다. 디블록킹 필터는 복원된 영상에서 블록 간의 경계에 발생한 블록 왜곡을 제거할 수 있다. ALF는 복원된 영상과 입력 영상을 비교한 값을 기초로 필터링을 수행할 수 있다. 상세하게는, 디블록킹 필터를 통해 블록이 필터링된 후 복원된 영상과 입력 영상을 비교한 값을 기초로 필터링을 수행할 수 있다. 또는, SAO를 통해 블록이 필터링된 후 복원된 영상과 입력 영상을 비교한 값을 기초로 필터링을 수행할 수 있다.
메모리는 복원된 블록 또는 픽쳐를 저장할 수 있다. 메모리에 저장된 복원 블록 또는 픽쳐는 화면내 예측 또는 화면간 예측을 수행하는 예측부에 제공될 수 있다. 상세하게는, 부호화기에서 압축된 비트스트림의 큐(Queue) 형태의 저장 공간을 부호화된 픽쳐 버퍼(Coded Picture Buffer, CPB)로 두어 처리할 수 있으며, 복호화된 영상을 픽쳐 단위로 저장하는 공간을 복호화된 픽쳐 버퍼(Decoded Picture Buffer, DPB)로 두어 처리할 수 있다. CPB의 경우 복호화 단위들이 복호화 순서에 따라 저장되며 부호화기 내에서 복호화 동작을 에뮬레이션(Emulation)하며 에뮬레이션 과정에서 압축된 비트스트림을 저장할 수 있고, CPB로부터 출력된 비트스트림은 복호화 과정을 거쳐 복원되며 복원된 영상은 DPB로 저장되며 DPB에 저장된 픽쳐들은 이후 영상 부호화, 복호화 과정에서 참조될 수 있다.
복호화부는 상기 부호화부에서의 과정을 역으로 수행하여 구현될 수 있다. 예를 들어, 비트스트림으로부터 양자화 계수열, 변환 계수열, 또는 신호열을 수신하고 이를 복호화할 수 있고, 복호화 정보를 포함하는 복호화 데이터를 파싱하여 각 구성부로 전달할 수 있다.
한편, 도 1 및 도 2의 영상 부호화 장치 및 영상 복호화 장치에 도시하지 않았지만 블록 분할부가 더 포함될 수 있다. 픽쳐 분할부로부터 기본 부호화 단위에 대한 정보를 획득할 수 있으며, 기본 부호화 단위는 영상 부/복호화 과정에서 예측, 변환, 양자화 등에 대한 기본(또는 시작) 단위를 의미할 수 있다. 이때, 부호화 단위는 컬러 포맷(본 예에서 YCbCr)에 따라 하나의 휘도 부호화 블록과 두 개의 색차 부호화 블록으로 구성될 수 있으며, 컬러 포맷에 따라 각 블록의 크기가 정해질 수 있다. 후술하는 예에서는 블록(본 예에서 휘도 성분)을 기준으로 설명할 것이다. 이때, 블록은 각 단위가 결정된 후에 획득될 수 있는 단위임을 전제하고, 다른 종류의 블록에 비슷한 설정이 적용 가능함을 가정하여 설명한다.
블록 분할부는 영상 부호화 장치 및 복호화 장치의 각 구성부에 관계되어 설정될 수 있으며, 이 과정을 통해 블록의 크기와 형태가 정해질 수 있다. 이때, 설정되는 블록은 구성부에 따라 달리 정의될 수 있으며, 예측부의 경우 예측 블록, 변환부의 경우 변환 블록, 양자화부의 경우 양자화 블록 등이 이에 해당할 수 있다. 이에 한정되지 않고 다른 구성부에 따른 블록 단위가 추가로 정의될 수 있다. 블록의 크기 및 형태는 블록이 갖는 가로, 세로 길이에 의해 정의될 수 있다.
블록 분할부에서 블록은 M × N으로 표현될 수 있으며, 각 블록의 최대값과 최소값이 범위 내에서 획득될 수 있다. 예를 들어, 블록의 형태는 정사각을 지원하며 블록의 최대값을 256×256, 최소값을 8×8로 정할 경우, 2m×2m 크기의 블록(본 예에서 m은 3부터 8까지의 정수. 예를 들어, 8×8, 16×16, 32×32, 64×64, 128×128, 256×256) 또는 2m × 2m 크기의 블록(본 예에서 m은 4부터 128까지의 정수) 또는 m × m 크기의 블록(본 예에서 m은 8부터 256까지의 정수)을 획득할 수 있다. 또는, 블록의 형태는 정사각과 직사각을 지원하며 상기 예와 동일한 범위를 가질 경우, 2m × 2n 크기의 블록(본 예에서 m과 n은 3부터 8까지의 정수. 가로와 세로 비율이 최대 2:1인 경우를 가정하여 예를 들면, 8×8, 8×16, 16×8, 16×16, 16×32, 32×16, 32×32, 32×64, 64×32, 64×64, 64×128, 128×64, 128×128, 128×256, 256×128, 256×256. 부/복호화 설정에 따라 가로와 세로의 비율에 대한 제한이 없거나 비율의 최대값이 존재할 수 있음)을 획득할 수 있다. 또는, 2m × 2n 크기의 블록(본 예에서 m과 n은 4부터 128까지의 정수)을 획득할 수 있다. 또는, m × n 크기의 블록(본 예에서 m과 n은 8부터 256까지의 정수)을 획득할 수 있다.
부/복호화 설정(예를 들어, 블록의 종류, 분할 방식, 분할 설정 등)에 따라 획득 가능한 블록이 정해질 수 있다. 예를 들어, 부호화 블록(Coding Block)은 2m × 2n 크기의 블록, 예측 블록(Prediction Block)은 2m × 2n 또는 m × n 크기의 블록, 변환 블록(Transform Block)은 2m × 2n 크기의 블록을 획득할 수 있다. 상기 설정에 기반하여 블록 크기, 범위 등의 정보(예를 들어, 지수, 배수 관련 정보 등)가 생성될 수 있다.
블록의 종류에 따라 상기 범위(본 예에서 최대값과 최소값으로 정해짐)가 정해질 수 있다. 또한, 일부 블록은 블록의 범위 정보가 명시적으로 생성될 수 있고, 일부 블록은 블록의 범위 정보가 묵시적으로 정해질 수 있다. 예를 들어, 부호화, 변환 블록은 명시적으로 관련 정보가 생성될 수 있고, 예측 블록은 묵시적으로 관련 정보가 처리될 수 있다.
명시적인 경우에는 적어도 하나의 범위 정보가 생성될 수 있다. 예를 들어, 부호화 블록의 경우 범위에 대한 정보는 최대값과 최소값에 대한 정보를 생성할 수 있다. 또는, 최대값과 기 설정된 최소값(예를 들어, 8)의 차이(예를 들어, 상기 설정에 기반하여 생성. 최대값과 최소값의 지수의 차이값 정보 등)에 기반하여 생성될 수 있다. 또한, 직사각 형태의 블록의 가로, 세로 길이를 위한 복수의 범위에 대한 정보가 생성될 수 있다.
묵시적인 경우에는 부/복호화 설정(예를 들어, 블록의 종류, 분할 방식, 분할 설정 등)에 기반하여 범위 정보가 획득될 수 있다. 예를 들어, 예측 블록의 경우 상위 단위인 부호화 블록(본 예에서 부호화 블록의 최대 크기 M × N. 최소 크기 m × n)에서 예측 블록의 분할 설정(본 예에서 쿼드 트리 분할 + 분할 깊이 0)으로 획득 가능한 후보군(본 예에서 M × N과 m/2 × n/2)으로 최대값과 최소값 정보를 획득할 수 있다.
블록 분할부의 초기(또는 시작) 블록의 크기 및 형태는 상위 단위로부터 정해질 수 있다. 부호화 블록의 경우 픽쳐 분할부로부터 획득된 기본 부호화 블록이 초기 블록일 수 있고, 예측 블록의 경우 부호화 블록이 초기 블록일 수 있고, 변환 블록의 경우 부호화 블록 또는 예측 블록이 초기 블록일 수 있으며, 이는 부/복호화 설정에 따라 정해질 수 있다. 예를 들어, 부호화 모드가 Intra일 경우에는 예측 블록은 변환 블록의 상위 단위일 수 있고, Inter일 경우에는 예측 블록은 변환 블록에 독립적인 단위일 수 있다. 초기 블록은 분할의 시작 단위로 작은 크기의 블록으로 분할할 수 있다. 각 블록의 분할에 따른 최적의 크기 및 형태가 정해지면 그 블록은 하위 단위의 초기 블록으로 정해질 수 있다. 예를 들어, 전자의 경우는 부호화 블록, 후자의 경우(하위 단위)는 예측 블록 또는 변환 블록일 수 있다. 상기 예와 같이 하위 단위의 초기 블록이 정해지면 상위 단위와 같이 최적의 크기 및 형태의 블록을 찾기 위한 분할 과정이 수행될 수 있다.
정리하면, 블록 분할부는 기본 부호화 단위(또는 최대 부호화 단위)를 적어도 하나의 부호화 단위(또는 하위 부호화 단위)로 분할을 수행할 수 있다. 또한, 부호화 단위는 적어도 하나의 예측 단위로 분할을 수행할 수 있고, 적어도 하나의 변환 단위로 분할을 수행할 수 있다. 부호화 단위는 적어도 하나의 부호화 블록으로 분할을 수행할 수 있고, 부호화 블록은 적어도 하나의 예측 블록으로 분할을 수행할 수 있고, 적어도 하나의 변환 블록으로 분할을 수행할 수 있다. 예측 단위는 적어도 하나의 예측 블록으로 분할을 수행할 수 있고, 변환 단위는 적어도 하나의 변환 블록으로 분할을 수행할 수 있다.
상기 예와 같이 모드 결정 과정을 통해 최적의 크기 및 형태의 블록을 찾을 경우, 이에 대한 모드 정보(예를 들어, 분할 정보 등)가 생성될 수 있다. 모드 정보는 블록이 속하는 구성부에서 발생하는 정보(예를 들어, 예측 관련 정보, 변환 관련 정보 등)과 함께 비트스트림에 수록되어 복호화기로 전송될 수 있고, 복호화기에서 동일 수준의 단위에서 파싱하여 영상 복호화 과정에서 사용할 수 있다.
후술하는 예는 분할 방식에 대한 설명을 할 것이며 초기 블록이 정사각 형태인 것을 가정하여 설명하지만, 직사각 형태인 경우 동일하거나 비슷한 적용이 가능할 수 있다.
블록 분할부는 다양한 분할 방식을 지원할 수 있다. 예를 들어, 트리 기반의 분할 또는 타입 기반의 분할을 지원할 수 있고, 그 외의 방법이 적용될 수 있다. 트리 기반의 분할의 경우 분할 플래그로 분할 정보를 생성할 수 있고, 타입 기반의 분할의 경우 기 설정된 후보군에 포함된 블록 형태에 대한 인덱스 정보로 분할 정보를 생성할 수 있다.
도 3은 트리 기반의 블록 형태를 나타낸 예시도이다.
도 3을 참조하면, a는 분할이 수행되지 않은 하나의 2N × 2N, b는 일부 분할 플래그(본 예에서 바이너리 트리의 가로 분할)를 통해 두 개의 2N × N, c는 일부 분할 플래그(본 예에서 바이너리 트리의 세로 분할)를 통해 두 개의 N × 2N, d는 일부 분할 플래그(본 예에서 쿼드 트리의 4분할 또는 바이너리 트리의 가로와 세로 분할)를 통해 4개의 N × N 이 획득되는 예를 나타낸다. 분할에 사용되는 트리 종류에 따라 획득되는 블록의 형태가 정해질 수 있다. 예를 들어, 쿼드 트리 분할을 수행할 경우 획득 가능한 후보 블록은 a, d일 수 있다. 바이너리 트리 분할을 수행할 경우 획득 가능한 후보 블록은 a, b, c, d일 수 있다. 쿼드 트리의 경우 하나의 분할 플래그를 지원하며, 해당 플래그가 '0'인 경우 a, '1인 경우 d를 획득할 수 있다. 바이너리 트리의 경우 복수의 분할 플래그를 지원하며, 그 중 하나는 분할 여부를 나타내는 플래그일 수 있고, 그 중 하나는 가로/세로 분할 여부를 나타내는 플래그일 수 있고, 그 중 하나는 가로/세로 분할의 중복 허용 여부를 나타내는 플래그일 수 있다. 중복이 허용되는 경우에 획득 가능한 후보 블록은 a, b, c, d일 수 있고, 중복이 허용되지 않는 경우에 획득 가능한 후보 블록은 a, b, c일 수 있다. 쿼드 트리의 경우 기본적인 트리 기반의 분할 방식일 수 있으며, 이에 추가적으로 트리 분할 방식(본 예에서 바이너리 트리)가 트리 기반의 분할 방식에 포함될 수 있다. 추가적인 트리 분할을 허용하는 플래그가 묵시적으로 또는 명시적으로 활성화되는 경우 복수의 트리 분할을 수행할 수 있다. 트리 기반의 분할은 재귀적인 분할(Recursive Partition)이 가능한 방식일 수 있다. 즉, 분할된 블록이 다시 초기 블록으로 설정되어 트리 기반의 분할이 수행될 수 있으며, 이는 분할 범위, 분할 허용 깊이 등의 분할 설정에 따라 정해질 수 있다. 이는 계층적 분할 방식의 일 예일 수 있다.
도 4는 타입 기반의 블록 형태를 나타낸 예시도이다.
도 4를 참조하면, 타입에 따라 분할 후 블록은 1 분할(본 예에서 a), 2 분할(본 예에서 b, c, d, e, f, g), 4 분할된 형태(본 예에서 h)를 가질 수 있다. 다양한 구성을 통해 후보군을 구성할 수 있다. 예를 들어, 도 5의 a, b, c, n 또는 a, b ~ g, n 또는 a, n, q 등으로 후보군을 구성할 수 있으며, 이에 한정되지 않고 후술하는 예를 포함하여 다양한 변형의 예가 가능할 수 있다. 대칭 분할(Symmetric Partition)을 허용하는 플래그가 활성화될 경우에 지원되는 블록은 도 4 a, b, c, h일 수 있고, 비대칭 분할(Asymmetric Partition)을 허용하는 플래그가 활성화될 경우에 지원되는 블록은 도 4 a ~ h 모두일 수 있다. 전자의 경우 관련 정보(본 예에서 대칭 분할을 허용하는 플래그)가 묵시적으로 활성화될 수 있고, 후자의 경우 명시적으로 관련 정보(본 예에서 비대칭 분할을 허용하는 플래그)가 생성될 수 있다. 타입 기반의 분할은 한 번의 분할을 지원하는 방식일 수 있다. 트리 기반의 분할과 비교하면 타입 기반의 분할을 통해 획득된 블록은 더 이상의 추가 분할은 불가능할 수 있다. 이는 분할 허용 깊이가 0인 예(예를 들어, 단일 계층 분할)일 수 있다.
도 5는 본 발명의 블록 분할부에서 획득할 수 있는 다양한 블록의 형태를 나타낸 예시도이다.
도 5을 참조하면, 분할 설정, 분할 방식에 따라 a 내지 s의 블록을 획득할 수 있으며, 도시되지 않은 추가적인 블록 형태 또한 가능할 수 있다.
일 예로, 트리 기반의 분할에 비대칭 분할을 허용할 수 있다. 예를 들어, 바이너리 트리의 경우 도 5 b, c와 같은 블록(본 예에서 복수의 블록으로 분할된 경우)이 가능할 수 있거나 또는 도 5 b ~ g와 같은 블록(본 예에서 복수의 블록으로 분할된 경우)이 가능할 수 있다. 비대칭 분할을 허용하는 플래그가 부/복호화 설정에 따라 명시적 또는 묵시적으로 비활성화될 경우 획득 가능한 후보 블록은 b 또는 c(본 예는 가로와 세로의 중복 분할을 허용하지 않는 가정)일 수 있고, 비대칭 분할을 허용하는 플래그가 활성화될 경우 획득 가능한 후보 블록은 b, d, e(본 예에서 가로 분할)일 수 있거나 c, f, g(본 예에서 세로 분할)일 수 있다. 본 예는 가로 또는 세로 분할 플래그에 의해 분할 방향이 결정되고 비대칭 허용 플래그에 따라 블록 형태가 결정되는 경우에 해당할 수 있으며, 이에 한정되지 않고 다른 예로의 변형 또한 가능할 수 있다.
일 예로, 트리 기반의 분할에 추가적인 트리 분할을 허용할 수 있다. 예를 들어, 트리플 트리, 쿼드 타입 트리, 옥타 트리 등의 분할이 가능할 수 있으며, 이를 통해 n개의 분할 블록(본 예에서 3, 4, 8. n은 정수)을 획득할 수 있다. 트리플 트리의 경우 지원되는 블록(본 예에서 복수의 블록으로 분할된 경우)은 h ~ m일 수 있고, 쿼드 타입 트리의 경우 지원되는 블록은 n ~ p일 수 있고, 옥타 트리의 경우 지원되는 블록은 q일 수 있다. 상기 트리 기반의 분할의 지원 여부는 부/복호화 설정에 따라 묵시적으로 정해지거나 또는 명시적으로 관련 정보가 생성될 수 있다. 또한, 부/복호화 설정에 따라 단독으로 사용되거나 또는 바이너리 트리, 쿼드 트리 분할이 혼합 사용될 수 있다. 예를 들어, 바이너리 트리의 경우 도 5 b, c와 같은 블록이 가능할 수 있고, 바이너리 트리와 트리플 트리가 혼합 사용되는 경우(본 예는 바이너리 트리의 사용 범위와 트리플 트리의 사용 범위가 일부 중복되는 경우라 가정) b, c, i, l와 같은 블록이 가능할 수 있다. 기존 트리 외의 추가 분할을 허용하는 플래그가 부/복호화 설정에 따라 명시적 또는 묵시적으로 비활성화될 경우 획득 가능한 후보 블록은 b 또는 c일 수 있고, 활성화될 경우 획득 가능한 후보 블록은 b, i 또는 b, h, i, j(본 예에서 가로 분할)일 수 있거나 c, l 또는 c, k, l, m(본 예에서 세로 분할)일 수 있다. 본 예는 가로 또는 세로 분할 플래그에 의해 분할 방향이 결정되고 추가 분할을 허용하는 플래그에 따라 블록 형태가 결정되는 경우에 해당할 수 있으며, 이에 한정되지 않고 다른 예로의 변형 또한 가능할 수 있다.
일 예로, 타입 기반의 블록에 비사각 분할(Non-Rectangular Partition)을 허용할 수 있다. 예를 들어, r, s와 같은 형태의 분할이 가능할 수 있다. 전술한 타입 기반의 블록 후보군과 결합할 경우 a, b, c, h, r, s 또는 a ~ h, r, s의 블록이 지원되는 블록일 수 있다. 또한, h ~ m와 같은 n개의 분할(예를 들어, n은 정수. 본 예는 1, 2, 4를 제외한 3)을 지원하는 블록이 후보군에 포함될 수 있다.
부/복호화 설정에 따라 분할 방식이 정해질 수 있다.
일 예로, 블록의 종류에 따라 분할 방식이 정해질 수 있다. 예를 들어, 부호화 블록과 변환 블록은 트리 기반의 분할을, 예측 블록은 타입 기반의 분할 방식을 사용할 수 있다. 또는, 두 방식의 조합된 형태의 분할 방식을 사용할 수 있다. 예를 들어, 예측 블록은 트리 기반의 분할과 타입 기반의 분할을 혼합하는 분할 방식을 사용할 수 있으며, 블록의 적어도 하나의 범위에 따라 적용되는 분할 방식이 다를 수 있다.
일 예로, 블록의 크기에 따라 분할 방식이 정해질 수 있다. 예를 들어, 블록의 최대값과 최소값 사이에서 일부 범위(예를 들어, a×b ~ c×d. 후자가 더 큰 크기인 경우)에는 트리 기반의 분할을, 일부 범위(예를 들어, e×f ~ g×h)에는 타입 기반의 분할이 가능할 수 있다. 이 경우, 분할 방식에 따른 범위 정보가 명시적으로 생성될 수 있거나 묵시적으로 정해질 수 있다.
일 예로, 블록(또는 분할 전 블록)의 형태에 따라 분할 방식이 정해질 수 있다. 예를 들어, 블록의 형태가 정사각일 경우 트리 기반의 분할과 타입 기반의 분할이 가능할 수 있다. 또는, 블록의 형태가 직사각일 경우에 트리 기반의 분할이 가능할 수 있다.
부/복호화 설정에 따라 분할 설정이 정해질 수 있다.
일 예로, 블록의 종류에 따라 분할 설정이 정해질 수 있다. 예를 들어, 트리 기반의 분할에서 부호화 블록과 예측 블록은 쿼드 트리, 변환 블록은 바이너리 트리 분할을 사용할 수 있다. 또는, 부호화 블록의 경우 분할 허용 깊이는 m, 예측 블록의 경우 분할 허용 깊이는 n, 변환 블록의 경우 분할 허용 깊이는 o로 설정할 수 있으며, m과 n과 o는 동일하거나 동일하지 않을 수 있다.
일 예로, 블록의 크기에 따라 분할 설정이 정해질 수 있다. 예를 들어, 블록의 일부 범위(예를 들어, a×b ~ c×d)에는 쿼드 트리 분할을, 일부 범위(예를 들어, e×f ~ g×h. 본 예에서 c×d는 g×h보다 크다고 가정)에는 바이너리 트리 분할이 가능할 수 있다. 이때, 상기 범위로 블록의 최대값과 최소값 사이의 모든 범위를 포함할 수 있고, 상기 범위는 서로 중첩되지 않은 설정을 갖거나 중첩되는 설정을 가질 수 있다. 예를 들어, 일부 범위의 최소값은 일부 범위의 최대값과 동일하거나 또는 일부 범위의 최소값은 일부 범위의 최대값보다 작을 수 있다. 중첩되는 범위를 가질 경우 더 높은 최대값을 갖는 분할 방식이 우선 순위를 가질 수 있다. 즉, 우선 순위를 갖는 분할 방식에서 분할 결과에 따라 후순위를 갖는 분할 방식의 수행 여부가 정해질 수 있다. 이 경우, 트리 종류에 따른 범위 정보가 명시적으로 생성될 수 있거나 묵시적으로 정해질 수 있다.
다른 예로, 블록의 일부 범위(상기 예와 동일)에는 일부 후보군을 갖는 타입 기반의 분할을, 일부 범위(상기 예와 동일)에는 일부 후보군(본 예에서 전자의 후보군과 적어도 하나의 구성이 다름)을 갖는 타입 기반의 분할이 가능할 수 있다. 이때, 상기 범위로 블록의 최대값과 최소값 사이의 모든 범위를 포함할 수 있고, 상기 범위는 서로 중첩되지 않는 설정을 가질 수 있다.
일 예로, 블록의 형태에 따라 분할 설정이 정해질 수 있다. 예를 들어, 블록의 형태가 정사각일 경우 쿼드 트리 분할이 가능할 수 있다. 또는, 블록의 형태가 직사각일 경우에 바이너리 트리 분할이 가능할 수 있다.
일 예로, 부/복호화 정보(예를 들어, 슬라이스 타입, 컬러 성분, 부호화 모드 등)에 따라 분할 설정이 정해질 수 있다. 예를 들어, 슬라이스 타입이 I일 경우 쿼드 트리(또는 바이너리 트리) 분할은 일부 범위(예를 들어, a×b ~ c×d), P일 경우 일부 범위(예를 들어, e×f ~ g×h), B일 경우 일부 범위(예를 들어, i×j ~ k×l)에서 가능할 수 있다. 또한, 슬라이스 타입이 I일 경우 쿼드 트리(또는 바이너리 트리) 분할의 분할 허용 깊이 m, P일 경우 분할 허용 깊이 n, B일 경우 분할 허용 깊이 o으로 설정할 수 있으며, m과 n과 o는 동일하거나 동일하지 않을 수 있다. 일부 슬라이스 타입의 경우 다른 슬라이스(예를 들어, P와 B 슬라이스)와 동일한 설정을 가질 수 있다.
다른 예로, 컬러 성분이 휘도 성분일 경우 쿼드 트리(또는 바이너리 트리) 분할 허용 깊이를 m, 색차 성분일 경우 n으로 설정할 수 있으며, m과 n은 동일하거나 동일하지 않을 수 있다. 또한, 컬러 성분이 휘도 성분일 경우 쿼드 트리(또는 바이너리 트리) 분할의 범위(예를 들어, a×b ~ c×d)와 색차 성분일 경우 쿼드 트리(또는 바이너리 트리) 분할의 범위(예를 들어, e×f ~ g×h)는 동일하거나 동일하지 않을 수 있다.
다른 예로, 부호화 모드가 Intra일 경우 쿼드 트리(또는 바이너리 트리) 분할 허용 깊이가 m, Inter일 경우 n(본 예에서 n은 m보다 크다고 가정)일 수 있으며, m과 n은 동일하거나 동일하지 않을 수 있다. 또한, 부호화 모드가 Intra일 경우 쿼드 트리(또는 바이너리 트리) 분할의 범위와 부호화 모드가 Inter일 경우 쿼드 트리(또는 바이너리 트리) 분할의 범위는 동일하거나 동일하지 않을 수 있다.
상기 예의 경우 부/복호화 정보에 따른 적응적인 분할 후보군 구성 지원 여부에 대한 정보가 명시적으로 생성될 수 있거나 묵시적으로 정해질 수 있다.
상기 예를 통해 부/복호화 설정에 따라 분할 방식과 분할 설정이 정해지는 경우를 설명하였다. 상기 예는 각 요소에 따른 일부 경우를 나타내며, 다른 경우로의 변형 또한 가능할 수 있다. 또한, 복수의 요소에 의한 조합에 따라 분할 방식과 분할 설정이 정해질 수도 있다. 예를 들어, 블록의 종류, 크기, 형태, 부/복호화 정보 등에 의해 분할 방식과 분할 설정이 정해질 수 있다.
또한, 상기 예에서 분할 방식, 설정 등에 관여하는 요소들은 묵시적으로 정해지거나 또는 명시적으로 정보를 생성하여 상기 예와 같은 적응적인 경우의 허용 여부를 정할 수 있다.
상기 분할 설정 중 분할 깊이는 초기 블록을 기준으로 공간적으로 분할한 횟수(본 예에서 초기 블록의 분할 깊이는 0)를 의미하며, 분할 깊이가 증가할수록 더 작은 블록으로 분할될 수 있다. 이는 분할 방식에 따라 깊이 관련 설정을 달리할 수 있다. 예를 들어, 트리 기반의 분할을 수행하는 방식 중 쿼드 트리의 분할 깊이와 바이너리 트리의 분할 깊이는 공통되는 하나의 깊이를 사용할 수 있고, 트리의 종류에 따른 개별적인 깊이를 사용할 수 있다.
상기 예에서 트리의 종류에 따라 개별적인 분할 깊이를 사용하는 경우 트리의 분할 시작 위치(본 예에서 분할을 수행하기 전 블록)에서 분할 깊이 0으로 설정할 수 있다. 각 트리의 분할 범위(본 예에서 최대값)에 기반하지 않고 분할이 시작되는 위치를 중심으로 분할 깊이가 계산될 수 있다.
도 6는 본 발명의 일 실시예에 따른 트리 기반의 분할을 설명하기 위한 예시도이다.
a는 쿼드 트리와 바이너리 트리 분할 예를 나타낸다. 상세하게는, a의 좌상 블록은 쿼드 트리 분할, 우상 블록과 좌하 블록은 쿼드 트리와 바이너리 트리 분할, 우하 블록은 바이너리 트리 분할 예를 나타낸다. 그림에서 실선(본 예에서 Quad1)은 쿼드 트리로 분할된 경계선을, 점선(본 예에서 Binary1)은 바이너리 트리로 분할된 경계선을, 굵은 실선(본 예에서 Binary2)은 바이너리 트리로 분할된 경계선을 의미한다. 점선과 굵은 실선의 차이는 분할 방법의 차이에 있다.
일 예로, (좌상 블록은 쿼드 트리 분할 허용 깊이가 3. 현재 블록이 N × N인 경우 가로 또는 세로 중 하나가 (N >> 3)에 도달할 때까지 분할을 수행하되 분할 정보는 (N >> 2)까지의 분할 정보를 생성. 이는 후술하는 예에 공통 적용. 쿼드 트리의 최대값과 최소값은 N × N, (N >> 3) × (N >> 3)이라 가정) 좌상 블록은 쿼드 트리 분할이 수행되는 경우 가로, 세로 길이의 1/2씩의 길이를 갖는 4개의 블록으로 분할될 수 있다. 분할 플래그의 경우 분할이 활성화된 경우 '1', 분할이 비활성화된 경우 '0'의 값을 가질 수 있다. 상기 설정에 따라 좌상 블록의 분할 플래그는 b의 좌상 블록과 같이 발생할 수 있다.
일 예로, (우상 블록은 쿼드 트리 분할 허용 깊이가 0. 바이너리 트리 분할 허용 깊이가 4. 쿼드 트리 분할의 최대값과 최소값은 N × N, (N >> 2) × (N >> 2). 바이너리 트리의 최대값과 최소값은 (N >> 1) × (N >> 1), (N >> 3) × (N >> 3) 라 가정) 우상 블록은 초기 블록에서 쿼드 트리 분할을 수행하는 경우 가로, 세로 길이의 1/2씩의 길이를 갖는 4개의 블록으로 분할될 수 있다. 분할된 블록의 크기는 (N >> 1) × (N >> 1)이며, 이는 본 예의 설정에 따라 바이너리 트리 분할(본 예에서 쿼드 트리 분할의 최소값보다 크나 분할 허용 깊이가 제한되는 경우)이 가능할 수 있다. 즉, 본 예는 쿼드 트리 분할과 바이너리 트리 분할의 중첩 사용이 불가능한 예일 수 있다. 본 예의 바이너리 트리의 분할 정보는 복수의 분할 플래그로 구성될 수 있다. 일부 플래그는 가로 분할 플래그(본 예에서 x/y의 x에 해당), 일부 플래그는 세로 분할 플래그(본 예에서 x/y에서 y에 해당)일 수 있으며, 분할 플래그의 구성은 쿼드 트리 분할과 비슷한 설정(예를 들어, 활성화 여부)을 가질 수 있다. 본 예에서는 상기 두 플래그는 중복해서 활성화될 수 있다. 그림에서 '-'로 플래그 정보가 생성된 경우 '-'는 트리 분할에 따른 최대값, 최소값, 분할 허용 깊이 등의 조건에 따라 추가적으로 분할이 불가능한 경우에 발생할 수 있는 플래그의 묵시적인 처리에 해당할 수 있다. 상기 설정에 따라 우상 블록의 분할 플래그는 b의 우상 블록과 같이 발생할 수 있다.
일 예로, (좌하 블록은 쿼드 트리 분할 허용 깊이가 3. 바이너리 트리 분할 허용 깊이가 2. 쿼드 트리 분할의 최대값과 최소값은 N × N, (N >> 3) × (N >> 3). 바이너리 트리 분할의 최대값과 최소값은 (N >> 2) × (N >> 2), (N >> 4) × (N >> 4). 중첩되는 범위에서 분할 우선 순위는 쿼드 트리 분할에 주어진다 가정) 좌하 블록은 초기 블록에서 쿼드 트리 분할을 수행하는 경우 가로, 세로 길이의 1/2씩의 길이를 갖는 4개의 블록으로 분할될 수 있다. 분할된 블록의 크기는 (N >> 1) × (N >> )이며, 이는 본 예의 설정에 따라 쿼드 트리 분할과 바이너리 트리 분할이 가능할 수 있다. 즉, 본 예는 쿼드 트리 분할과 바이너리 트리 분할의 중첩 사용이 가능한 예일 수 있다. 이 경우 우선 순위가 주어지는 쿼드 트리 분할 결과에 따라 바이너리 트리 분할의 수행 여부가 결정될 수 있다. 쿼드 트리 분할이 수행되는 경우 바이너리 트리 분할은 수행되지 않고, 쿼드 트리 분할이 수행되지 않는 경우 바이너리 트리 분할이 수행될 수 있다. 쿼드 트리 분할이 수행되지 않는 경우 상기 설정에 따라 분할이 가능한 조건이더라도 더 이상의 쿼드 트리 분할은 불가능할 수 있다. 본 예의 바이너리 트리의 분할 정보는 복수의 분할 플래그로 구성될 수 있다. 일부 플래그는 분할 플래그(본 예에서 x/y에서 x에 해당), 일부 플래그는 분할 방향 플래그(본 예에서 x/y에서 y에 해당. x에 따라 y 정보 생성 여부가 결정될 수 있음)일 수 있으며, 분할 플래그는 쿼드 트리 분할과 비슷한 설정을 가질 수 있다. 본 예에서는 가로 분할과 세로 분할이 중복되어 활성화될 수 없다. 그림에서 '-'로 플래그 정보가 생성된 경우 '-'은 상기 예와 비슷한 설정을 가질 수 있다. 상기 설정에 따라 좌하 블록의 분할 플래그는 b의 좌하 블록과 같이 발생할 수 있다.
일 예로, (우하 블록은 바이너리 트리 분할 허용 깊이가 5. 바이너리 트리 분할의 최대값과 최소값은 N × N, (N >> 2) × (N >> 3)이라 가정) 우하 블록은 초기 블록에서 바이너리 트리 분할을 수행하는 경우 가로 또는 세로 길이의 1/2의 길이를 갖는 2개의 블록으로 분할될 수 있다. 본 예의 분할 플래그 설정은 좌하 블록과 동일할 수 있다. 그림에서 '-'로 플래그 정보가 생성된 경우 '-'은 상기 예와 비슷한 설정을 가질 수 있다. 본 예는 바이너리 트리의 가로, 세로의 최소값이 다르게 설정되는 경우를 나타낸다. 상기 설정에 따라 우하 블록의 분할 플래그는 b의 우하 블록과 같이 발생할 수 있다.
상기 예와 같이 블록 정보(예를 들어, 블록의 종류, 크기, 형태, 위치, 슬라이스 타입, 컬러 성분 등)를 확인한 후 그에 따른 분할 방식과 분할 설정을 정할 수 있으며, 그에 따른 분할 과정을 수행할 수 있다.
도 7은 본 발명의 일 실시예에 따른 트리 기반의 분할을 설명하기 위한 예시도이다.
a와 b의 블록을 참조하면, 굵은 실선(L0)은 최대 부호화 블록을, 굵은 실선과 다른 선(L1~L5)으로 구획된 블록은 분할된 부호화 블록을 의미하며, 블록 내부의 숫자는 분할된 서브 블록의 위치(본 예에서 Raster Scan 순서를 따름)를 의미하며 '-'의 개수는 해당 블록이 갖는 분할 깊이를 의미하고, 블록 간의 경계선의 숫자는 분할된 횟수를 의미할 수 있다. 예를 들어, 4분할된 경우(본 예에서 쿼드 트리) UL(0)-UR(1)-DL(2)-DR(3)의 순서로, 2분할된 경우(본 예에서 바이너리 트리) L 또는 U(0) - R 또는 D(1)의 순서를 가질 수 있으며, 이는 각 분할 깊이에서 정의될 수 있다. 후술하는 예는 획득 가능한 부호화 블록이 제한적인 경우를 나타낸다.
일 예로, a의 최대 부호화 블록이 64×64이고, 최소 부호화 블록은 16×16이며 쿼드 트리 분할을 사용한다고 가정한다. 이 경우, 2-0, 2-1, 2-2 블록(본 예에서 16×16 크기)이 최소 부호화 블록 크기와 같기 때문에, 2-3-0, 2-3-1, 2-3-2. 2-3-3 블록(본 예에서 8×8크기)과 같은 더 작은 블록으로 분할되지 않을 수 있다. 이 경우 2-0, 2-1, 2-2, 2-3 블록에서는 획득 가능한 블록은 16×16 블록, 즉 하나의 후보군을 갖기 때문에 블록 분할 정보가 생성되지 않는다.
일 예로 b의 최대 부호화 블록이 64×64이고, 최소 부호화 블록은 가로 또는 세로 길이로 8, 허용 가능한 분할 깊이는 3이라고 가정한다. 이 경우, 1-0-1-1(본 예에서 16×16 크기. 분할 깊이는 3) 블록이 최소 부호화 블록 조건을 만족하기 때문에 더 작은 블록으로 분할될 수 있다. 그러나 허용 가능한 분할 깊이와 같기 때문에 더 높은 분할 깊이의 블록(본 예에서 1-0-1-0-0, 1-0-1-0-1 블록)으로 분할되지 않을 수 있다. 이 경우 1-0-1-0, 1-0-1-1 블록에서는 획득 가능한 블록은 16×8 블록, 즉 하나의 후보군을 갖기 때문에 블록 분할 정보가 생성되지 않는다.
상기 예와 같이 부/복호화 설정에 따라 쿼드 트리 분할을 지원하거나 바이너리 트리 분할을 지원할 수 있다. 또는, 쿼드 트리 분할과 바이너리 트리 분할을 혼합하여 지원할 수도 있다. 예를 들어, 블록 크기, 분할 깊이 등에 따라 상기 방식 중 하나 또는 그들을 혼합하여 지원할 수 있다. 블록이 제 1 블록 범위에 속할 경우에는 쿼드 트리, 제 2 블록 범위에 속할 경우에는 바이너리 트리 분할을 지원할 수 있다. 복수의 분할 방식이 지원될 경우 각 방식에 따른 최대 부호화 블록 크기, 최소 부호화 블록 크기, 허용 가능한 분할 깊이 등의 적어도 하나의 설정을 가질 수 있다. 상기 범위는 서로의 범위가 중첩되어 설정될 수도 있고, 그렇지 않을 수도 있다. 또는, 어느 하나의 범위가 다른 범위를 포함하는 설정 또한 가능할 수 있다. 이에 대한 설정은 슬라이스 타입, 부호화 모드, 컬러 성분 등의 개별적이거나 혼합적인 요소에 따라 정해질 수 있다.
일 예로, 슬라이스 타입에 따라 분할 설정이 정해질 수 있다. I 슬라이스일 경우에 지원되는 분할 설정은 쿼드 트리의 경우 128×128 ~ 32×32 범위에서의 분할을, 바이너리 트리의 경우 32×32 ~ 8×8 범위에서의 분할을 지원할 수 있다. P/B 슬라이스일 경우에 지원되는 블록 분할 설정은 쿼드 트리의 경우 128×128 ~ 32×32 범위에서의 분할을, 바이너리 트리의 경우 64×64 ~ 8×8 범위에서의 분할을 지원할 수 있다.
일 예로, 부호화 모드에 따라 분할 설정이 정해질 수 있다. 부호화 모드가 Intra일 경우에 지원되는 분할 설정은 바이너리 트리의 경우 64×64 ~ 8×8 범위에서의 분할과 허용 가능한 분할 깊이를 2를 지원할 수 있다. Inter일 경우에 지원되는 분할 설정은 바이너리 트리의 경우 32×32 ~ 8×8 범위에서의 분할과 허용 가능한 분할 깊이를 3을 지원할 수 있다.
일 예로, 컬러 성분에 따라 분할 설정이 정해질 수 있다. 휘도 성분일 경우에 쿼드 트리의 경우 256×256 ~ 64×64 범위에서의 분할을, 바이너리 트리의 경우 64×64 ~ 16×16 범위에서의 분할을 지원할 수 있다. 색차 성분일 경우에 쿼드 트리의 경우 휘도 성분과 동일한 설정(본 예에서 색차 포맷에 따라 각 블록의 길이가 비례하는 설정)을, 바이너리 트리의 경우 64×64 ~ 4×4 범위(본 예에서 이에 동일한 휘도 성분에서의 범위는 128×128 ~ 8×8. 4:2:0에서의 가정)에서의 분할을 지원할 수 있다.
상기 예는 블록의 종류에 따라 분할 설정을 달리 두는 경우를 설명하였다. 또한, 일부 블록의 경우 다른 블록과 결합되어 하나의 분할 과정을 수행할 수 있다. 예를 들어, 부호화 블록과 변환 블록이 하나의 단위로 결합할 경우 최적의 블록의 크기 및 형태를 획득하기 위한 분할 과정이 수행되며, 이는 부호화 블록의 최적의 크기 및 형태뿐만 아니라 변환 블록의 최적의 크기 및 형태일 수 있다. 또는, 부호화 블록과 변환 블록이 하나의 단위로 결합할 수 있고, 예측 블록과 변환 블록이 하나의 단위로 결합할 수 있고, 부호화 블록과 예측 블록과 변환 블록이 하나의 단위로 결합할 수 있고, 그 외의 블록들의 결합이 가능할 수 있다.
본 발명에서 각 블록에 개별적인 분할 설정을 두는 경우를 중심으로 설명하였지만, 복수의 단위가 하나로 결합되어 하나의 분할 설정을 갖는 경우 또한 가능할 수 있다.
위의 과정에는 발생하는 정보를 부호화기에서 시퀀스, 픽쳐, 슬라이스, 타일 등의 단위 중 적어도 하나의 단위로 비트스트림에 수록할 것이고, 복호화기에서는 관련 정보를 비트스트림으로부터 파싱할 것이다.
영상 부/복호화 과정에서는 입력되는 화소값이 출력되는 화소값과 다른 경우가 발생할 수 있으며, 연산상의 오류로 인한 왜곡을 방지하기 위해 화소값 조정 과정(Adjustment)이 수행될 수 있다. 화소값 조정 방법은 화소값의 범위를 넘는 화소값을 화소값의 범위 내로 조절하는 과정으로서, 클리핑(Clipping)으로 지칭할 수도 있다.
pixel_val' = Clip_x (pixel_val, minI, maxI)
Clip_x (A, B, C)
{
if (A < B) output = B;
else if (A > C) output = C;
else output = A;
}
표 1은 화소값 조정이 수행되는 클리핑 함수(Clip_x)에 대한 예시 코드이다. 표1을 참조하면, 입력 화소값(pixel_val)과 허용되는 화소값 범위의 최소값(minI)과 최대값(maxI)이 클리핑 함수(Clip_x)의 파라미터로 입력될 수 있다. 이때, 비트 심도(bit_depth)를 기준으로 설명하면, 최소값(minI)은 0으로, 최대값(maxI)은 2bit_depth - 1일 수 있다. 클리핑 함수(Clip_x)가 수행되면, 최소값(minI, 파라미터 B)보다 작은 입력 화소값(pixel_val, 파라미터 A)은 최소값(minI)으로 변경되고, 최대값(maxI, 파라미터 C)보다 큰 입력 화소값은 최대값(maxI)으로 변경될 수 있다. 따라서, 출력값(output)은 화소값 조정이 완료된 출력 화소값(pixel_val')으로 반환될 수 있다.
이때, 화소값이 갖는 범위는 비트 심도에 따라 결정되지만, 영상(예를 들어, 픽쳐, 슬라이스, 타일, 블록 등)을 구성하는 화소값은 영상의 종류와 특성에 따라 다르므로 반드시 모든 화소값 범위 내에서 발생하는 것이 아니다. 본 발명의 일 실시예에 따르면, 실제 영상을 구성하는 화소값의 범위를 참조하여 영상 부/복호화 과정에서 활용할 수 있다.
예를 들어, 표 1에 따른 화소값 조정 방법에서도 클리핑 함수의 최소값(minI)을 실제 영상을 구성하는 화소값 중 가장 작은 값으로 사용할 수 있고, 클리핑 함수의 최대값(maxI)은 실제 영상을 구성하는 화소값 중 가장 큰 값을 사용할 수 있다.
정리하면, 영상 부/복호화 장치는 비트 심도에 기초한 화소값 조정 방법 및/또는 영상을 구성하는 화소값 범위에 기초한 화소값 조정 방법을 포함할 수 있다. 부/복호화기에서는 적응적인 화소값 조정 방법을 지원할지 여부를 결정하는 플래그 정보가 지원될 수 있으며, 해당 플래그 정보가 '1'인 경우에는 화소값 조정 방법 선택 정보가 발생할 수 있고, '0'인 경우에는 기 설정된 화소값 조정 방법(본 예에서 비트 심도에 기반한 방법)이 기본 화소값 조정 방법으로 사용될 수 있다. 상기 화소값 조정 방법 선택 정보가 영상을 구성하는 화소값 범위에 기초한 화소값 조정 방법을 가리킬 경우, 영상의 화소값 관련 정보가 포함될 수 있다. 예를 들어, 컬러 성분에 따라 각 영상의 최소값과 최대값 및 후술하는 중앙값 등에 대한 정보에 그 예일 수 있다. 화소값 조정 관련하여 발생하는 정보는 부호화기의 비디오, 시퀀스, 픽쳐, 슬라이스, 타일, 블록 등의 단위로 수록되어 전송될 수 있으며, 복호화기에서 수록된 정보를 파싱하여 동일한 단위에서 관련 정보를 복원할 수 있다.
한편, 상기 과정을 통해 비트 심도에 기초한 화소값 조정 또는 영상을 구성하는 화소값의 범위에 기초한 화소값 조정을 통해 화소값의 최소값과 최대값을 포함하는 화소값의 범위가 변경(결정 또는 정의)될 수 있으며, 추가적인 화소값 범위 정보 또한 변경(결정 또는 정의)될 수 있다. 예를 들면, 실제 영상을 구성하는 화소값의 최대값과 최소값이 변경될 수 있으며, 실제 영상을 구성하는 화소값의 중앙값 또한 변경될 수 있다.
즉, 비트 심도에 따른 화소값 조정 과정에서 minI은 영상의 최소 화소값, maxI는 영상의 최대 화소값, I는 컬러 성분을 의미할 수 있고, medianI는 영상의 중앙 화소값을 의미할 수 있다. minI는 0, maxI은 (1 << bit_depth) - 1, medianI은 1 << (bit_depth - 1)일 수 있으며, median은 부/복호화 설정에 따라 상기 예를 포함하여 다른 형태로 획득될 수 있다. 중앙값은 본 발명에서의 설명을 위한 하나의 용어일 뿐 영상의 부/복호화 과정에서 상기 화소값 조정 과정에 따라 변경(결정 또는 정의)될 수 있는 화소값 범위 정보를 나타내는 하나의 정보일 수 있다.
예를 들어, 영상을 구성하는 화소값의 범위에 따른 화소값 조정 과정에서 minI는 영상의 최소 화소값, maxI은 영상의 최대 화소값, medianI은 영상의 중앙 화소값일 수 있다. medianI은 영상 내 화소값들의 평균일 수 있고, 영상의 화소를 정렬할 때 가운데 위치한 값일 수 있고, 영상의 화소값 범위 정보에 따라 획득되는 값일 수 있다. 적어도 하나의 minI, maxI에서 medianI은 유도될 수 있다. 즉, medianI는 영상의 화소값 범위 내에 존재하는 하나의 화소값일 수 있다.
상세하게는, medianI은 (minI + maxI) / 2 또는 (minI + maxI) >> 1, (minI + maxI + 1) / 2, (minI + maxI + 1) >> 1 등과 같이 영상의 화소값 범위 정보(본 예에서 minI, maxI)에 따라 획득되는 값일 수 있으며, median은 부/복호화 설정에 따라 상기 예를 포함하여 다른 형태로 획득될 수 있다.
다음은 화소값 조정 과정에 따른 실시예(본 예에서 중앙값)를 설명한다.
일 예로, 기본 비트 심도는 8비트(0 ~ 255)이고 영상을 구성하는 화소값의 범위에 기초한 화소값 조정 과정{본 예에서 최소값 10, 최대값 190. 최소값과 최대값으로부터 유도된다는 설정(평균) 하에 중앙값 100}이 선택되며 현재 블록의 위치는 영상(본 예에서 픽쳐) 내의 첫번째 블록일 경우, 부/복호화에 사용될 이웃 블록(본 예에서 왼쪽, 왼쪽 아래, 왼쪽 위, 위쪽, 오른쪽 위)은 존재하지 않으므로 참조 화소는 중앙값(100)으로 채워질 수 있다. 상기 참조 화소를 사용하여 예측 모드에 따라 화면내 예측 과정을 수행할 수 있다.
일 예로, 기본 비트 심도는 10비트(0 ~ 1023)이고 영상을 구성하는 화소값의 범위에 기초한 화소값 조정 과정(본 예에서 중앙값 600. 관련 구문 요소가 존재}이 선택되며 현재 블록의 위치는 영상(본 예에서 슬라이스, 타일)내의 첫번째 블록일 경우, 부/복호화에 사용될 이웃 블록(본 예에서 왼쪽, 왼쪽 아래, 왼쪽 위, 위쪽, 오른쪽 위)은 존재하지 않으므로 참조 화소는 중앙값(600)으로 채워질 수 있다. 상기 참조 화소를 사용하여 예측 모드에 따라 화면내 예측 과정을 수행할 수 있다.
일 예로, 기본 비트 심도는 10비트이고 영상을 구성하는 화소값의 범위에 기초한 화소값 조정 과정(본 예에서 중앙값 112. 관련 구문 요소가 존재)이 선택되며 이웃 블록의 부호화 모드(화면내 예측/화면간 예측) 등에 따라 현재 블록의 예측에 해당 블록의 화소의 이용가능 여부 등이 결정되는 설정이 활성화{본 예에서 해당 블록의 부호화 모드가 화면내 예측인 경우 현재 블록의 참조 화소로 사용가능, 화면간 예측인 경우 사용불가. 본 설정이 비활성화되는 경우에는 해당 블록의 부호화 모드와 상관 없이 현재 블록의 참조 화소로 사용가능. 관련 구문 요소는constrained_intra_pred_flag이며 P나 B영상 타입에서 발생 가능}되며 현재 블록의 위치는 영상의 왼쪽에 위치할 경우, 부/복호화에 사용될 이웃 블록(본 예에서 왼쪽, 왼쪽 아래, 왼쪽 위)은 존재하지 않으며 부/복호화에 사용될 이웃 블록(본 예에서 위쪽, 오른쪽 위)은 존재하지만 해당 블록의 부호화 모드가 화면간 예측이라 상기 설정에 의해 사용이 금지되므로 이용가능한 참조 화소가 존재하지 않을 경우 참조 화소는 중앙값(본 예에서 112)으로 채워질 수 있다. 즉, 사용가능한 참조 화소가 존재하지 않아 영상 화소값 범위의 중앙값으로 채울 수 있다. 상기 참조 화소를 사용하여 예측 모드에 따라 화면내 예측 과정을 수행할 수 있다.
상기 실시예에서는 예측부에서 상기 중앙값 관련한 다양한 경우를 나타내었지만, 이는 영상 부/복호화의 다른 구성에 포함되어 구성될 수도 있다. 또한, 상기 실시예만으로 한정되지 않고 다양한 경우로 변형 및 확장이 가능할 수 있다.
본 발명에서 화소값 조정 과정은 예측부, 변환부, 양자화부, 역양자화부, 역변환부, 필터부, 메모리 등의 부/복호화 과정에 적용될 수 있다. 예를 들어, 화소값 조정 방법에서의 입력 화소는 예측 과정에서의 참조 화소(Reference Sample) 또는 예측 화소(Prediction Sample)일 수 있고, 변환, 양자화, 역변환, 역양자화 과정에서의 복원 화소(Reconstructed Sample)일 수 있다. 또한, 인루프 필터 과정에서의 복원 화소일 수 있고, 메모리에서의 저장 화소(Storage Sample)일 수 있다. 이때, 변환과 양자화, 그 역 과정에서의 복원 화소는 인루프 필터 적용 전의 복원 화소를 의미할 수 있다. 인루프 필터에서의 복원 화소는 인루프 필터 적용 후의 복원 화소를 의미할 수 있다. 디블록킹 필터 과정에서의 복원 화소는 디블록킹 필터 적용 후의 복원 화소를 의미할 수 있다. SAO 과정에서의 복원 화소는 SAO 적용 후의 복원 화소를 의미할 수 있다. ALF 과정에서의 복원 화소는 ALF 적용 후의 복원 화소를 의미할 수 있다. 위와 같이 다양한 경우에 대한 예시를 설명하였으나, 이에 한정되지 않고 화소값 조정 과정이 호출되는 모든 부/복호화 과정의 입력, 중간, 출력 단계에서 적용될 수 있다.
후술하는 예에서는 휘도 성분(Y)에 대한 클리핑 함수 Clip_Y와 색차 성분(Cb, Cr)에 대한 클리핑 함수 Clip_Cb, Clip_Cr가 지원되는 가정 하에 설명한다.
본 발명에서 예측부는 화면내 예측과 화면간 예측으로 분류될 수 있으며, 화면내 예측과 화면간 예측은 다음과 같이 정의할 수 있다.
화면내 예측은 현재 영상(예를 들어, 픽쳐, 슬라이스, 타일 등)의 부/복호화가 완료된 영역으로부터 예측값을 생성하는 기술일 수 있고, 화면간 예측은 현재 영상 이전에 적어도 하나의 부/복호화가 완료된 영상(예를 들어, 픽쳐, 슬라이스, 타일 등)으로부터 예측값을 생성하는 기술일 수 있다.
또는, 화면내 예측은 현재 영상의 부/복호화가 완료된 영역으로부터 예측값을 생성하는 기술일 수 있으나 일부 예측 방법{예를 들어, 참조 영상으로부터 예측값을 생성하는 방법. 블록 매칭(Block Matching), 템플릿 매칭(Template Matching) 등}은 제외하는 예측일 수 있고, 화면간 예측은 적어도 하나의 부/복호화가 완료된 영상으로부터 예측값을 생성하는 기술일 수 있으며, 상기 부/복호화가 완료된 영상은 현재 영상을 포함하여 구성될 수 있다.
부/복호화 설정에 따라 상기 정의 중 하나를 따를 수 있으며, 후술하는 예에서는 첫 번째 정의를 따르는 것을 가정하여 설명한다. 또한, 예측값은 공간 영역에서 예측을 통해 획득되는 값이라는 가정 하에 설명하지만 이에 한정되지 않는다.
도 8은본 발명의 일 실시예에 따른 블록 분할 과정을 나타낸다. 상세하게는, 기본 부호화 블록을 시작으로 하나 이상의 분할 방법에 따라 획득 가능한 블록의 크기 및 형태에 대한 예를 나타낸다.
그림에서 굵은 실선은 기본 부호화 블록, 굵은 점선은 쿼드 트리 분할 경계, 이중 실선은 대칭 바이너리 트리 분할 경계, 실선은 터너리 트리 분할 경계, 얇은 점선은 비대칭 바이너리 트리 분할 경계를 의미한다. 굵은 실선을 제외하고는 각 분할 방법에 따라 구획되는 경계를 의미한다. 다음에서 설명하는 분할 설정(예를 들어, 분할 종류, 분할 정보, 분할 정보 구성 순서 등)은 해당 예의 경우에만 한정되지 않으며, 다양한 변형의 예가 가능할 수 있다.
설명의 편의를 위해 기본 부호화 블록(2N x 2N. 128 x 128)을 기준으로 좌상, 우상, 좌하, 우하 블록(N x N. 64 x 64)에 개별적인 블록 분할 설정을 갖는 경우를 가정하여 설명한다. 우선, 초기 블록에서 한 번의 분할 동작(분할 깊이 0 -> 1. 즉, 분할 깊이 1 증가)으로 인해 4개의 서브 블록이 획득된 상태이며, 쿼드 트리에 관한 분할 설정으로 최대 부호화 블록은 128 x 128, 최소 부호화 블록은 8 x 8이며 최대 분할 깊이는 4인 경우로 이는 각 블록에 공통 적용되는 설정임을 가정한다.
(1번. 좌상 블록. A1 ~ A6)
본 예는 단일 트리 방식의 분할(본 예에서 쿼드 트리)이 지원되는 경우로, 최대 부호화 블록, 최소 부호화 블록, 분할 깊이 등과 같은 하나의 블록 분할 설정을 통해 획득 가능한 블록의 크기 및 형태가 정해질 수 있다. 본 예에서는 분할에 따라 획득 가능한 블록이 하나인 경우(가로와 세로를 각각 2분할)로 한 번의 분할 동작(분할 전 블록 4M x 4N 기준. 분할 깊이 1 증가)에 요구되는 분할 정보는 분할 여부를 나타내는 플래그(본 예에서 0이면 분할 x. 1이면 분할 o)이며 획득 가능한 후보는 4M x 4N과 2M x 2N일 수 있다.
(2번. 우상 블록. A7 ~ A11)
본 예는 다중 트리 방식의 분할(본 예에서 쿼드 트리, 바이너리 트리)이 지원되는 경우로, 복수의 블록 분할 설정을 통해 획득 가능한 블록의 크기 및 형태가 정해질 수 있다. 본 예에서 바이너리 트리의 경우 최대 부호화 블록은 64 x 64, 최소 부호화 블록은 한 쪽 길이가 4이고 최대 분할 깊이가 4인 경우라 가정한다.
본 예에서는 분할에 따라 획득 가능한 블록은 2개 이상인 경우(본 예에서 2 또는 4개)라 한 번의 분할 동작(쿼드 트리 분할 깊이 1 증가)에 요구되는 분할 정보는 분할 여부를 나타내는 플래그, 분할 종류를 나타내는 플래그, 분할 형태를 나타내는 플래그, 분할 방향을 나타내는 플래그이며 획득 가능한 후보는 4M x 4N, 4M x 2N, 2M x 4N, 4M x N/4M x 3N, 4M x 3N/4M x N, M x 4N/3M x 4N, 3M x 4N/M x 4N일 수 있다.
만약 쿼드 트리와 바이너리 트리 분할 범위가 중첩(즉, 현재 단계에서 쿼드 트리 분할과 바이너리 트리 분할이 모두 가능한 범위)되며 현재 블록(아직 분할 하기 전 상태)이 쿼드 트리 분할에 의해 획득된 블록(부모 블록<분할 깊이가 현재보다 1적은 경우>에서 쿼드 트리 분할에 의해 획득된 블록)일 경우에 분할 정보는 다음과 같은 경우로 구분되어 구성될 수 있다. 즉, 각 분할 설정에 따라 지원되는 블록이 복수의 분할 방법에 의해 획득 가능한 경우에는 다음과 같은 과정으로 분류하여 분할 정보가 발생 가능하다.
(1) 쿼드 트리 분할과 바이너리 트리 분할이 중첩되는 경우
Figure PCTKR2019007651-appb-I000001
위의 표에서 a는 쿼드 트리 분할 여부를 나타내는 플래그를 의미하며, 1이면 쿼드 트리 분할(QT)을 수행한다. 상기 플래그가 0이면 바이너리 트리 분할 여부를 나타내는 플래그인 b를 확인한다. b가 0이면 해당 블록에서 더 이상의 분할은 수행하지 않고(No Split), 1이면 바이너리 트리 분할을 수행한다.
c는 분할 방향을 나타내는 플래그로 0이면 가로 분할(hor), 1이면 세로 분할(ver)을 의미하고, d는 분할 형태를 나타내는 플래그로 0이면 대칭 분할(SBT. Symmetric Binary Tree), 1이면 비대칭 분할(ABT. Asymmetric Binary Tree)을 의미한다. d가 1일때만 비대칭 분할에서의 세부 분할 비율에 대한 정보(1/4 or 3/4)를 확인하며, 0일 때는 좌/우 또는 상/하 블록에서 좌와 상 블록이 1/4의 비율을 갖고 우와 하 블록이 3/4의 비율을 가지며, 1이면 반대의 비율을 갖는다.
(2) 바이너리 트리 분할만 가능한 경우
위의 표에서 a를 제외한 b 내지 e의 플래그로 분할 정보에 대한 표현이 가능하다.
도 8에서 A7 블록의 경우 분할 전 블록(A7 ~ A11)에서 쿼드 트리 분할이 가능한 경우(즉, 쿼드 트리 분할이 가능했지만 쿼드 트리 분할이 아닌 바이너리 트리 분할이 된 경우)였으므로 (1)에서의 분할 정보가 생성되는 경우에 해당한다.
반면, A8 내지 A11의 경우 분할 전 블록(A8 ~ A11)에서 이미 쿼드 트리 분할이 수행되지 않고 바이너리 트리 분할이 된 경우(즉, 더 이상 해당 블록<A8 ~ A11>에서는 쿼드 트리 분할이 불가능한 경우)라 (2)에서의 분할 정보가 생성되는 경우에 해당한다.
(3번. 좌하 블록. A12 ~ A15)
본 예는 다중 트리 방식의 분할(본 예에서 쿼드 트리, 바이너리 트리, 터너리 트리)이 지원되는 경우로, 복수의 블록 분할 설정을 통해 획득 가능한 블록의 크기 및 형태가 정해질 수 있다. 본 예에서 바이너리 트리/터너리의 경우 최대 부호화 블록은 64 x 64, 최소 부호화 블록은 한 쪽 길이가 4이고 최대 분할 깊이가 4인 경우라 가정한다.
본 예에서는 분할에 따라 획득 가능한 블록은 2개 이상인 경우(본 예에서 2, 3, 4개)라 한 번의 분할 동작에 요구되는 분할 정보는 분할 여부를 나타내는 플래그, 분할 종류를 나타내는 플래그, 분할 방향을 나타내는 플래그이며 획득 가능한 후보는 4M x 4N, 4M x 2N, 2M x 4N, 4M x N/4M x 2N/4M x N, M x 4N/2M x 4N/M x 4N일 수 있다.
만약 쿼드 트리와 바이너리 트리/터너리 트리 분할 범위가 중첩되며 현재 블록이 쿼드 트리 분할에 의해 획득된 블록일 경우에 분할 정보는 다음과 같은 경우로 구분되어 구성될 수 있다.
(1) 쿼드 트리 분할과 바이너리 트리/터너리 트리 분할이 중첩되는 경우
Figure PCTKR2019007651-appb-I000002
위의 표에서 a는 쿼드 트리 분할 여부를 나타내는 플래그이고, 1이면 쿼드 트리 분할을 수행한다. 상기 플래그가 0이면 바이너리 트리 또는 터너리 트리 분할 여부를 나타내는 플래그인 b를 확인한다. b가 0이면 해당 블록에서 더 이상의 분할은 수행하지 않고, 1이면 바이너리 트리 또는 터너리 트리 분할을 수행한다.
c는 분할 방향을 나타내는 플래그로 0이면 가로 분할, 1이면 세로 분할을 의미하고, d는 분할 종류를 나타내는 플래그로 0이면 바이너리 트리 분할(BT), 1이면 터너리 트리 분할(TT)을 의미한다.
(2) 바이너리 트리/터너리 트리 분할만 가능한 경우
위의 표에서 a를 제외한 b 내지 d의 플래그로 분할 정보에 대한 표현이 가능하다.
도 8에서 A12, A15 블록의 경우 분할 전 블록(A12 ~ A15)에서 쿼드 트리 분할이 가능한 경우였으므로 (1)에서의 분할 정보가 생성되는 경우에 해당한다.
반면, A13와 A14는 분할 전 블록(A13, A14)에서 이미 쿼드 트리로 분할이 수행되지 않고 터너리 트리로 분할이 된 경우라 (2)에서의 분할 정보가 생성되는 경우에 해당한다.
(4번. 좌하 블록. A16 ~ A20)
본 예는 다중 트리 방식의 분할(본 예에서 쿼드 트리, 바이너리 트리, 터너리 트리)이 지원되는 경우로, 복수의 블록 분할 설정을 통해 획득 가능한 블록의 크기 및 형태가 정해질 수 있다. 본 예에서 바이너리 트리/터너리 트리의 경우 최대 부호화 블록은 64 x 64, 최소 부호화 블록은 한 쪽 길이가 4이고 최대 분할 깊이가 4인 경우라 가정한다.
본 예에서는 분할에 따라 획득 가능한 블록은 2개 이상인 경우(본 예에서 2, 3, 4개)라 한 번의 분할 동작에 요구되는 분할 정보로 분할 여부를 나타내는 플래그, 분할 종류를 나타내는 플래그, 분할 형태를 나타내는 플래그, 분할 방향을 나타내는 플래그이며 획득 가능한 후보는 4M x 4N, 4M x 2N, 2M x 4N, 4M x N/4M x 3N, 4M x 3N/4M x N, M x 4N/3M x 4N, 3M x 4N/M x 4N, 4M x N/4M x 2N/4M x N, M x 4N/2M x 4N/M x 4N일 수 있다.
만약 쿼드 트리와 바이너리 트리/터너리 트리 분할 범위가 중첩되며 현재 블록이 쿼드 트리 분할에 의해 획득된 블록일 경우에 분할 정보는 다음과 같은 경우로 구분되어 구성될 수 있다.
(1) 쿼드 트리 분할과 바이너리 트리/터너리 분할이 중첩되는 경우
Figure PCTKR2019007651-appb-I000003
위의 표에서 a는 쿼드 트리 분할 여부를 나타내는 플래그를 의미하며, 1이면 쿼드 트리 분할을 수행한다. 상기 플래그가 0이면 바이너리 트리 분할 여부를 나타내는 플래그인 b를 확인한다. b가 0이면 해당 블록에서 더 이상의 분할은 수행하지 않고, 1이면 바이너리 트리 또는 터너리 트리 분할을 수행한다.
c는 분할 방향을 나타내는 플래그로 0이면 가로 분할, 1이면 세로 분할을 의미하고, d는 분할 종류를 나타내는 플래그로 0이면 터너리 분할, 1이면 바이너리 트리 분할을 의미한다. d가 1일 때는 분할 형태에 대한 플래그인 e를 확인하여 e가 0일 때는 대칭 분할을, 1일 때는 비대칭 분할을 수행한다. e가 1일 떄는 비대칭 분할에서의 세부 분할 비율에 대한 정보를 확인하며 이는 이전 예에서와 동일하다.
(2) 바이너리 트리/터너리 트리 분할만 가능한 경우
위의 표에서 a를 제외한 b 내지 f의 플래그로 분할 정보에 대한 표현이 가능하다.
도 8에서 A20 블록은 분할 전 블록(A16 ~ A19)에서 쿼드 트리 분할이 가능한 경우였으므로 (1)에서의 분할 정보가 생성되는 경우에 해당한다.
반면, A16 내지 A19의 경우 분할 전 블록(A16 ~ A19)에서 이미 쿼드 트리 분할이 수행되지 않고 바이너리 트리 분할이 된 경우라 (2)에서의 분할 정보가 생성되는 경우에 해당한다.
다음은 본 발명에서 예측부의 화면내 예측에 대한 설명을 할 것이다.
도 9는 영상 부호화/복호화 장치에 기-정의된 화면내 예측 모드를 나타낸 예시도이다.
도 9를 참조하면, 67개의 예측 모드가 화면내 예측을 위한 예측 모드 후보군으로 구성되어 있으며, 이 중 65개는 방향성 모드(2번 내지 66번)이고 2개는 비방향성 모드(DC, Planar)이다. 이때, 방향성 모드는 기울기(예를 들어, dy/dx) 또는 각도 정보(Degree)로 구분할 수 있다. 상기 예에서 설명되는 예측 모드의 전부 또는 일부가 휘도 성분 또는 색차 성분의 예측 모드 후보군에 포함될 수 있고, 그 외의 추가적인 모드가 예측 모드 후보군에 포함될 수 있다.
또한, 컬러 공간 간의 상관성을 이용하여 부/복호화가 완료된 다른 컬러 공간의 복원 블록을 현재 블록의 예측에 사용할 수 있고, 이를 지원하는 예측 모드를 포함할 수 있다. 예를 들어, 색차 성분의 경우, 현재 블록과 대응되는 휘도 성분의 복원된 블록을 이용하여 현재 블록의 예측 블록을 생성할 수 있다. 즉, 컬러 공간 간의 상관성을 고려하여 복원된 블록을 기반으로 예측 블록을 생성할 수 있다.
부/복호화 설정에 따라 예측 모드 후보군을 적응적으로 결정할 수 있다. 예측의 정확도를 높이기 위한 목적으로 후보군의 수를 늘릴 수 있고, 예측 모드에 따른 비트량을 줄이기 위한 목적으로 후보군의 수를 줄일 수 있다.
예를 들어, A 후보군(67개. 65개 방향성 모드와 2개의 비방향성 모드), B 후보군(35개. 33개의 방향성 모드와 2개의 비방향성 모드), C 후보군(18개. 17개의 방향성 모드와 1개의 비방향성 모드) 등의 후보군 중 하나를 선택할 수 있으며, 블록의 크기와 형태에 따라 적응적으로 후보군 선택이 가능하거나 결정될 수 있다.
또한, 부/복호화 설정에 따라 예측 모드 후보군의 구성을 다양하게 가질 수 있다. 예를 들어, 도 9와 같이 모드 사이가 균등하게 예측 모드 후보군을 구성하거나, 도 9에서 18번과 34번 모드 사이의 모드 개수가 2번과 18번 모드 사이의 모드 개수보다 더 많이 후보군을 구성할 수 있다. 또는, 그 반대의 경우가 가능할 수 있으며, 블록의 형태(즉, 정사각, 직사각_가로가 긴 형태, 직사각_세로가 긴 형태 등)에 따라 적응적으로 후보군이 구성될 수 있다. 예를 들어, 현재 블록의 너비가 높이보다 큰 경우, 2번 내지 15번에 속한 화면내 예측 모드는 이용되지 않고, 67번 내지 80번에 속한 화면내 예측 모드로 대체될 수 있다. 반면, 현재 블록의 너비가 높이보다 작은 경우, 53번 내지 66번에 속한 화면내 예측 모드는 이용되지 않고, -14번 내지 -1번에 속한 화면내 예측 모드로 대체될 수 있다.
본 발명에서 특별한 언급이 없을 때, 균등한 모드 간격을 갖는 기 설정된 하나의 예측 모드 후보군(A 후보군)으로 화면내 예측을 수행하는 경우를 가정하여 설명하지만, 본 발명의 주요 요소가 상기 설명과 같은 적응적인 화면내 예측 설정에도 변경되어 적용이 가능할 수 있다.
도 9는 블록의 형태가 정사각 또는 직사각일 때 지원되는 예측 모드일 수 있다. 또한, 블록의 형태가 직사각일 때 지원되는 예측 모드는 상기 예와 다른 예측 모드일 수 있다. 예를 들어, 예측 모드 후보군의 개수가 다르다던가 또는 예측 모드 후보군의 개수는 같지만 블록의 길이가 긴 쪽의 예측 모드가 밀집, 그 반대쪽은 예측 모드가 분산될 수 있거나 또는 그 반대 상황일 수 있다. 본 발명에서는 도 9와 같이 예측 모드가 블록의 형태와 관계없이 지원되는 예측 모드 설정(방향성 모드 간에 등간격) 하에 설명하지만, 그 외의 경우 또한 적용할 수 있다.
예측 모드에 할당되는 인덱스는 다양한 방법을 사용하여 설정할 수 있다. 방향성 모드의 경우 각 모드에 할당되는 인덱스는 예측 모드가 갖는 각도 또는 기울기 정보 등에 따라 기 설정되는 우선권 정보에 기반하여 결정될 수 있다. 예를 들어, x축 또는 y축에 해당되는 모드(도 9에서 18번, 50번 모드)가 앞선 우선 순위를 가질 수 있고, 상기 수평 또는 수직 모드를 기준으로 45도 또는 -45도의 각도 차이를 갖는 대각선 모드(2번, 34번, 66번 모드)가 그 다음 우선 순위를 가질 수 있고, 상기 대각선 모드를 기준으로 22.5도 또는 -22.5도의 각도 차이를 갖는 대각선 모드가 그 다음 우선 순위를 가질 수 있고, 이와 같은 방식(그 다음은 11.25도 또는 -11.25도 등) 또는 다른 다양한 방법 등으로 우선권 정보를 설정할 수 있다.
또는, 기 설정된 예측 모드를 기준으로 특정 방향 순서로 인덱스를 할당할 수 있다. 예를 들어, 도 9와 같이 일부 대각선 모드(2번 모드)부터 시계 방향으로 인덱스가 할당될 수 있다. 후술하는 예에서는 기 설정된 예측 모드를 기준으로 시계 방향으로 인덱스가 할당되는 가정 하에 설명한다.
또한, 비방향성 예측 모드는 방향성 모드에 우선하여 인덱스 정보가 할당될 수 있거나 또는 방향성 모드 사이에 할당될 수 있거나 맨 끝에 할당될 수 있으며, 이는 부/복호화 설정에 따라 정해질 수 있다. 본 예에서는 비방향성 모드는 예측 모드 중 가장 우선하여 인덱스가 할당되는 예(낮은 인덱스로 할당. 0번 모드는 Planar, 1번 모드는 DC)를 가정하여 설명한다.
상기 예를 통해 예측 모드에 할당되는 인덱스에 대한 다양한 예를 설명하였으나, 상기 예에 한정되지 않고 다른 설정 하에 인덱스가 할당될 수 있거나 다양한 변형의 예가 가능할 수 있다.
상기 예에서 우선권 정보는 예측 모드의 인덱스 할당에 사용되는 예를 전술하였으나, 우선권 정보는 예측 모드의 인덱스 할당뿐만 아니라 예측 모드의 부/복호화 과정에 사용되는 예가 가능할 수 있다. 예를 들어, MPM 구성 등에 상기 우선권 정보가 사용될 수 있으며, 복수의 우선권 정보 세트가 예측 모드의 부/복호화 과정에 지원될 수 있다.
현재 블록(특히, 휘도 성분)의 화면내 예측 모드를 유도하는 방법에 대해서 살펴 보기로 한다.
현재 블록은 영상 부호화/복호화 장치에 기-정의된 디폴트 모드를 이용할 수 있다. 상기 디폴트 모드는, 방향성 모드 또는 비방향성 모드일 수 있다. 예를 들어, 방향성 모드는, 수직 모드, 수평 모드 또는 대각선 모드 중 적어도 하나를 포함할 수 있다. 비방향성 모드는, Planar 모드 또는 DC 모드 중 적어도 하나를 포함할 수 있다. 현재 블록이 디폴트 모드를 이용하는 것으로 결정된 경우, 현재 블록의 화면내 예측 모드는 디폴트 모드로 설정될 수 있다.
또는, 현재 블록의 화면내 예측 모드는, 복수의 MPM 후보를 기반으로 유도될 수도 있다. 먼저, 전술한 예측 모드 후보군에서 소정의 MPM 후보를 선택할 수 있다. 상기 MPM 후보의 개수는, 3개, 4개, 5개, 또는 그 이상일 수 있다. MPM 후보는, 현재 블록에 인접한 주변 블록의 화면내 예측 모드에 기초하여 유도될 수 있다. 주변 블록은 현재 블록의 좌측, 상단, 좌상단, 좌하단 또는 우상단 중 적어도 하나에 인접한 블록일 수 있다.
구체적으로, 좌측 블록의 화면내 예측 모드(candIntraPredModeA)와 상단 블록의 화면내 예측 모드(candIntraPredModeB) 간의 동일 여부, candIntraPredModeA와 candIntraPredModeB가 비방향성 모드인지 여부를 고려하여 MPM 후보가 결정될 수 있다.
예를 들어, candIntraPredModeA와 candIntraPredModeB이 동일하고, candIntraPredModeA가 비방향성 모드가 아닌 경우, 현재 블록의 MPM 후보는 candIntraPredModeA, (candIntraPredModeA-n), (candIntraPredModeA+n) 또는 비방향성 모드 중 적어도 하나를 포함할 수 있다. 여기서, n은 1, 2, 또는 그 이상의 정수일 수 있다. 상기 비방향성 모드는, Planar 모드 또는 DC 모드 중 적어도 하나를 포함할 수 있다. 일예로, 현재 블록의 MPM 후보는 다음 표 2와 같이 결정될 수 있다. 표 2의 index는 MPM 후보의 위치 또는 우선순위를 특정하나, 이에 한정되지 아니한다. 예를 들어, DC 모드에 index 1이 할당되거나, index 4가 할당될 수도 있다.
Index MPM 후보
0 candIntraPredModeA
1 2 + ( ( candIntraPredModeA + 61 ) % 64 )
2 2 + ( ( candIntraPredModeA - 1 ) % 64 )
3 INTRA_DC
4 2 + ( ( candIntraPredModeA + 60 ) % 64 )
또는, candIntraPredModeA와 candIntraPredModeB가 동일하지 않고, candIntraPredModeA와 candIntraPredModeB 둘다 비방향성 모드가 아닌 경우, 현재 블록의 MPM 후보는 candIntraPredModeA, candIntraPredModeB, (maxAB-n), (maxAB+n) 또는 비방향성 모드 중 적어도 하나를 포함할 수 있다. 여기서, maxAB은 candIntraPredModeA와 candIntraPredModeB 중 최대값을 의미하고, n은 1, 2, 또는 그 이상의 정수일 수 있다. 상기 비방향성 모드는, Planar 모드 또는 DC 모드 중 적어도 하나를 포함할 수 있다. 일예로, 현재 블록의 MPM 후보는 다음 표 3과 같이 결정될 수 있다. 표 3의 index는 MPM 후보의 위치 또는 우선순위를 특정하나, 이에 한정되지 아니한다. 예를 들어, DC 모드에 가장 큰 index가 할당될 수 있다. candIntraPredModeA와 candIntraPredModeB의 차이값이 소정의 문턱범위에 속하는 경우, 표 3의 MPM 후보 1이 적용되고, 그렇지 않은 경우, MPM 후보 2가 적용될 수 있다. 여기서, 문턱범위는, 2보다 크거나 같고 62보다 작거나 같은 범위를 의미할 수 있다.
Index MPM 후보 1 MPM 후보 2
0 candIntraPredModeA candIntraPredModeA
1 candIntraPredModeB candIntraPredModeB
2 INTRA_DC INTRA_DC
3 2 + ( ( maxAB + 61 ) % 64 ) 2 + ( ( maxAB + 60 ) % 64 )
4 2 + ( ( maxAB - 1 ) % 64 ) 2 + ( ( maxAB ) % 64 )
또는, candIntraPredModeA와 candIntraPredModeB가 동일하지 않고, candIntraPredModeA와 candIntraPredModeB 중 어느 하나만이 비방향성 모드인 경우, 현재 블록의 MPM 후보는 maxAB, (maxAB-n), (maxAB+n) 또는 비방향성 모드 중 적어도 하나를 포함할 수 있다. 여기서, maxAB은 candIntraPredModeA와 candIntraPredModeB 중 최대값을 의미하고, n은 1, 2, 또는 그 이상의 정수일 수 있다. 상기 비방향성 모드는, Planar 모드 또는 DC 모드 중 적어도 하나를 포함할 수 있다. 일예로, 현재 블록의 MPM 후보는 다음 표 4와 같이 결정될 수 있다. 표 4의 index는 MPM 후보의 위치 또는 우선순위를 특정하나, 이에 한정되지 아니한다. 예를 들어, DC 모드에 index 0이 할당되거나, 가장 큰 index가 할당될 수도 있다.
Index MPM 후보
0 maxAB
1 INTRA_DC
2 2 + ( ( maxAB + 61 ) % 64 )
3 2 + ( ( maxAB - 1 ) % 64 )
4 2 + ( ( maxAB + 60 ) % 64 )
또는, candIntraPredModeA와 candIntraPredModeB이 동일하지 않고, candIntraPredModeA와 candIntraPredModeB 둘다 비방향성 모드인 경우, 현재 블록의 MPM 후보는 비방향성 모드, 수직 모드, 수평 모드, (수직 모드-m), (수직 모드+m), (수평 모드-m) 또는 (수평 모드+m) 중 적어도 하나를 포함할 수 있다. 여기서, m은 1, 2, 3, 4 또는 그 이상의 정수일 수 있다. 상기 비방향성 모드는, Planar 모드 또는 DC 모드 중 적어도 하나를 포함할 수 있다. 일예로, 현재 블록의 MPM 후보는 다음 표 5와 같이 결정될 수 있다. 표 5의 index는 MPM 후보의 위치 또는 우선순위를 특정하나, 이에 한정되지 아니한다. 예를 들어, 수평 모드에 index 1이 할당되거나, 가장 큰 index가 할당될 수 있다.
Index MPM 후보
0 INTRA_DC
1 수직 모드
2 수평 모드
3 (수직 모드-4)
4 (수직 모드+4)
전술한 복수의 MPM 후보 중에서, MPM 인덱스에 의해 특정된 MPM 후보가 현재 블록의 화면내 예측 모드로 설정될 수 있다. 상기 MPM 인덱스는 영상 부호화 장치에서 부호화되어 시그날링될 수 있다.
전술한 바와 같이, 디폴트 모드 또는 MPM 후보 중 어느 하나를 선택적으로 이용하여 화면내 예측 모드가 유도될 수 있다. 상기 선택은, 부호화 장치에서 시그날링되는 플래그에 기초하여 수행될 수 있다. 이때, 플래그는 현재 블록의 화면내 예측 모드가 디폴트 모드로 설정되는지 여부를 나타낼 수 있다. 상기 플래그가 제1 값인 경우, 현재 블록의 화면내 예측 모드는 디폴트 모드로 설정되고, 그렇지 않은 경우, 현재 블록의 화면내 예측 모드가 MPM 후보로부터 유도되는지 여부, MPM 인덱스 등의 정보가 시그날링될 수 있다.
색차 성분의 경우 휘도 성분의 예측 모드 후보군과 동일한 후보군을 갖거나 휘도 성분의 예측 모드 후보군 중 일부 모드로 구성된 후보군을 가질 수 있다. 이때, 색차 성분의 예측 모드 후보군은 고정적인 구성 또는 가변적인(또는 적응적인) 구성을 가질 수 있다.
(고정적인 후보군 구성 vs 가변적인 후보군 구성)
고정적인 구성의 일 예로, 휘도 성분의 예측 모드 후보군 중 일부 모드(예를 들어, DC, Planar, 수직, 수평, 대각선 모드<DL, UL, UR 중 적어도 하나의 모드라 가정. DL은 왼쪽 아래에서 오른쪽 위 방향으로 예측, UL은 왼쪽 위에서 오른쪽 아래 방향으로 예측, UR은 오른쪽 위에서 왼쪽 아래 방향으로 예측. 각각 도 9에서 2번, 34번, 66번 모드라 가정. 그 밖의 다른 대각선 모드도 가능>라 가정)를 색차 성분의 예측 모드 후보군으로 구성하여 화면내 예측을 수행할 수 있다.
가변적인 구성의 일 예로, 휘도 성분의 예측 모드 후보군 중 일부 모드(예를 들어, DC, Planar, 수직, 수평, 대각선 UR 모드라 가정. 일반적으로 많이 선택되는 모드를 기본 예측 모드 후보군으로 구성한다고 가정)를 색차 성분의 기본 예측 모드 후보군으로 구성할 수 있지만, 상기 후보군에 포함된 모드로 색차 성분의 특성을 제대로 반영하지 못하는 경우가 발생할 수 있다. 이를 개선하기 위해 색차 성분의 예측 모드 후보군 구성을 가변적으로 변경할 수 있다.
예를 들어, 색차 성분의 블록과 동일하거나 대응되는 곳{예를 들어, 휘도 성분에서 색차 성분과 <컬러 포맷에 따라> 대응되는 해당 위치가 하나의 블록으로 구성이 안 되고 블록 분할 등을 통해 복수의 서브 블록으로 구성되어 있는 경우 기 설정된 위치의 블록을 의미. 이때, 기 설정된 블록의 위치는 색차 성분의 블록과 대응되는 휘도 성분 블록 내의 좌상, 우상, 좌하, 우하, 중앙, 상중, 하중, 좌중, 우중 등에서 결정. 영상 내 좌표로 구분할 경우 좌상은 (0,0), 우상은 (blk_width-1, 0), 좌하는 (0, blk_height-1), 우하는 (blk_width-1, blk_height-1)의 좌표를 포함하는 위치일 수 있고, 중앙은 (blk_width/2-1, blk_height/2-1),(blk_width/2,blk_height/2-1), (blk_width/2-1, blk_height/2), (blk_width/2, blk_height/2) 중 하나의 좌표를, 상중은 (blk_width/2-1, 0), (blk_width/2, 0) 중 하나의 좌표를, 하중은 (blk_width/2-1, blk_height-1), (blk_width/2, blk_height-1) 중 하나의 좌표를, 좌중은 (0, blk_height/2-1), (0, blk_height/2) 중 하나의 좌표를, 우중은 (blk_width-1, blk_height/2-1), (blk_width-1, blk_height/2) 중 하나의 좌표를 포함하는 위치일 수 있음. 즉, 상기 좌표 위치를 포함하는 블록을 의미. 위의 설명된 blk_width와 blk_height는 휘도 블록의 가로, 세로 길이를 의미하고, 좌표는 위의 경우로만 한정되지 않고 다른 경우도 가능. 바로 이어지는 설명에서 색차 성분의 예측 모드 후보군에 추가되는 휘도 성분의 예측 모드<또는 컬러 모드>는 기 설정된 우선 순위<예를 들어, 좌상-우상-좌하-우하-중앙 순서라 가정>에 따라 적어도 하나의 예측 모드가 추가 가능. 만약 2개가 추가되는 경우에는 위의 설정에 따라 좌상 블록의 모드, 우상 블록의 모드가 추가. 이때, 좌상과 우상 위치의 블록이 하나의 블록으로 구성되어 있는 경우 그 다음 우선 순위인 좌하 블록의 모드가 추가}에 위치하는 휘도 성분의 블록 또는 서브 블록의 적어도 하나의 예측 모드를 기본 예측 모드 후보군에 포함(후술하는 1번 예)할 수 있거나 또는 일부 모드와 대체하여 새로운 예측 모드 후보군을 구성(후술하는 2번 예)할 수 있다.
또는, 현재 블록을 중심으로 좌, 상, 좌상, 우상, 좌하 등에 위치한 인접한 블록 또는 해당 블록의 서브 블록(인접한 블록이 복수의 블록으로 구성될 경우)의 적어도 하나의 예측 모드(기 설정된 위치의 블록으로 인접한 블록을 지정할 수 있으며, 복수의 모드가 색차 성분의 예측 모드 후보군에 포함되는 경우에는 기 설정된 우선 순위에 위치하는 블록, 서브 블록 내의 기 설정된 우선 순위에 위치하는 서브 블록의 예측 모드가 우선 순위에 따라 후보군으로 포함 가능)를 기본 예측 모드 후보군에 포함할 수 있거나 또는 일부 모드와 대체하여 새로운 예측 모드 후보군을 구성할 수 있다.
상기 설명에 추가적인 내용을 덧붙이면, 휘도 성분의 블록 또는 (휘도 블록의) 인접한 블록의 예측 모드뿐만 아니라 해당 예측 모드로부터 유도되는 적어도 하나의 모드를 색차 성분의 예측 모드로 포함할 수도 있다. 후술하는 예에서는 휘도 성분의 예측 모드를 색차 성분의 예측 모드로 포함하는 예를 들 것이며, 휘도 성분의 예측 모드로부터 유도되는 예측 모드(예를 들어, 해당 모드의 인접한 모드. 방향성 모드를 예로 들면 수평 모드 18번이 휘도 성분의 예측 모드이면 17번, 19번, 16번 등의 모드가 유도되는 예측 모드에 해당. 만약 휘도 성분으로부터 복수의 예측 모드를 색차 성분의 예측 모드 후보군으로 구성한다면 후보군 구성의 우선 순위는 휘도 성분의 예측 모드 - 휘도 성분의 예측 모드에서 유도된 모드 순으로 설정이 가능할 수 있음) 또는 인접한 블록의 예측 모드로부터 유도되는 예측 모드를 색차 성분의 예측 모드 후보군으로 포함하는 예에 대한 상세한 설명은 생략하지만, 후술하는 설명에서의 동일하거나 변경된 설정의 적용이 가능할 수 있다.
일 예(1)로, 휘도 성분의 예측 모드가 색차 성분의 예측 모드 후보군 중 하나와 일치하는 경우에 후보군의 구성은 동일하고(후보군의 수가 변화 없음), 하나도 일치하지 않는 경우에 후보군의 구성은 동일하지 않다(후보군의 수가 증가).
상기 예 중 후보군의 구성이 동일할 때, 예측 모드의 인덱스는 동일하게 둘 수 있거나 또는 다른 인덱스를 할당하여 둘 수 있으며, 이는 부/복호화 설정에 따라 결정될 수 있다. 예를 들어, 색차 성분의 예측 모드 후보군의 인덱스는 Planar(0), DC(1), 수직(2), 수평(3), 대각선 UR(4)일 때, 휘도 성분의 예측 모드가 수평일 경우 예측 모드 후보군의 구성은 변화가 없고, 각 예측 모드의 인덱스는 그대로 두거나 또는 다른 인덱스를 할당{본 예에서 수평(0), Planar(1), DC(2), 수직(3), 대각선 UR(4)}할 수 있다. 위와 같은 인덱스 재구성은 예측 모드 부/복호화 과정에서 모드 비트를 적게 발생(가정: 작은 인덱스에 적은 비트 할당)하게 하려는 목적으로 수행되는 과정의 예일 수 있다.
상기 예 중 후보군의 구성이 동일하지 않을 때, 예측 모드의 인덱스는 동일하게 둔채로 추가하거나 또는 다른 인덱스를 할당하여 둘 수 있다. 예를 들어, 이전 예와 예측 모드 후보군 인덱스 설정과 동일할 때, 휘도 성분의 예측 모드가 대각선 DL일 경우 예측 모드 후보군의 구성은 1만큼 증가하고, 기존의 후보군의 예측 모드 인덱스는 그대로 두고 새로 추가되는 모드의 인덱스를 마지막{본 예에서 대각선 DL(5)}에 두거나 또는 다른 인덱스를 할당{본 예에서 대각선 DL(0), Planar(1), DC(2), 수직(3), 수평(4), 대각선 UL(5)}할 수 있다.
일 예(2)로, 휘도 성분의 예측 모드가 색차 성분의 예측 모드 후보군 중 하나와 일치하는 경우에는 후보군의 구성은 동일(후보군의 모드는 변화 없음)하고 하나도 일치하지 않는 경우에 후보군의 구성은 동일하지 않다(후보군의 모드 중 적어도 하나 대체).
상기 예 중 후보군의 구성이 동일할 때, 예측 모드의 인덱스는 동일하게 둘 수 있거나 또는 다른 인덱스를 할당하여 둘 수 있다. 예를 들어, 색차 성분의 예측 모드 후보군의 인덱스는 Planar(0), DC(1), 수직(2), 수평(3), 대각선 UL(4)일 때, 휘도 성분의 예측 모드가 수직일 경우 예측 모드 후보군의 구성은 변화가 없고, 각 예측 모드의 인덱스는 그대로 두거나 또는 다른 인덱스를 할당{본 예에서 수직(0), 수평(1), 대각선 UL(2), Planar(3), DC(4). 휘도 성분의 모드가 방향성일 때는 방향성 모드를 앞으로, 휘도 성분의 모드가 비방향성일 때는 비방향성 모드를 앞으로 둘 때의 예. 이에 한정되지 않음}할 수 있다.
상기 예 중 후보군의 구성이 동일하지 않을 때, 예측 모드의 인덱스는 변경되지 않은 모드에는 동일하게 두고 변경된 모드에 대체된 모드의 인덱스를 할당하거나 또는 (복수의 예측 모드에 기존과) 다른 인덱스를 할당할 수 있다. 예를 들어, 이전 예와 예측 모드 후보군 인덱스 설정과 동일할 때, 휘도 성분의 예측 모드가 대각선 DL일 경우 예측 모드 후보군 중 하나의 모드(본 예에서 대각선 UL)를 대체하고, 기존의 후보군의 예측 모드 인덱스는 그대로 두고 대체되는 모드의 인덱스를 새로 추가되는 모드의 인덱스{예를 들어, 대각선 DL(4)}로 할당하거나 또는 다른 인덱스를 할당{본 예에서 대각선 DL(0), Planar(1), DC(2), 수직(3), 수평(4)}할 수 있다.
전술한 내용에서 모드 비트를 적게 할당하는 목적으로 인덱스의 재구성을 수행하는 예를 들었으나 이는 부/복호화 설정에 따른 일 예이며, 다른 경우도 가능하다. 예측 모드의 인덱스에 변화가 없는 경우에는 작은 인덱스에 적은 비트를 할당하는 이진화를 수행할 수 있거나 또는 인덱스의 크기와 상관없이 비트를 할당하는 이진화를 수행할 수 있다. 예를 들어, 재구성된 예측 모드 후보군이 Planar(0), DC(1), 수직(2), 수평(3), 대각선 DL(4)일 때 대각선 DL은 큰 인덱스가 할당되어 있어도 휘도 성분으로부터 획득된 모드이기 때문에 다른 예측 모드에 비해 더 적은 모드 비트를 할당하는 설정을 둘 수 있다.
상기 예측 모드는 영상 타입에 상관없이 지원되는 모드일 수 있거나 또는 일부 영상 타입(예를 들어, I 영상 타입에 지원되고 P나 B 영상 타입에 지원되지 않는 모드 등)에 따라 지원 여부가 결정되는 모드일 수 있다.
상기 예를 통해 설명한 내용은 본 예에서만 한정되며 추가적이거나 또는 다른 변경의 예가 가능할 수 있다. 또한, 상기 예를 통해 설명한 부/복호화 설정은 묵시적으로 정해질 수 있거나 또는 명시적으로 관련 정보를 비디오, 비디오, 시퀀스, 픽쳐, 슬라이스, 타일 등의 단위로 포함할 수 있다.
(동일한 컬러 공간에서 예측값 획득 vs 다른 컬러 공간에서 예측값 획득)
상기 예를 통해 설명된 화면내 예측 모드의 경우 동일한 시간에 동일한 공간 내의 인접한 영역으로부터 예측 블록 생성을 위한 데이터를 획득하는 방법(예를 들어, 외삽, 내삽, 평균 등)과 관련된 예측 모드에 대한 설명이었다.
또한, 동일한 시간에 다른 공간 내 위치한 영역으로부터 예측 블록 생성을 위한 데이터를 획득하는 방법과 관련된 예측 모드가 지원될 수 있다.
예를 들어, 컬러 공간 간의 상관성을 이용하여 예측 블록 생성을 위한 데이터를 다른 컬러 공간에서 획득하는 방법에 대한 예측 모드가 그에 대한 예가 될 수 있다. 이때, 컬러 공간 간의 상관성은 YCbCr을 예로 들 경우 Y와 Cb, Y와 Cr, Cb와 Cr 간의 상관성을 의미할 수 있다. 즉, 색차 성분(Cb 또는 Cr)의 경우 현재 블록과 대응되는 휘도 성분의 복원된 블록을 현재 블록의 예측 블록으로 생성할 수 있다(색차 vs 휘도가 후술하는 예의 기본 설정). 또는, 일부 색차 성분(Cr 또는 Cb)의 현재 블록과 대응되는 일부 색차 성분(Cb 또는 Cr)의 복원된 블록을 상기 색차 성분(Cr 또는 Cb)의 예측 블록으로 생성할 수 있다. 이때, 다른 컬러 공간의 복원된 블록을 그대로 예측 블록(즉, 보정을 수행하지 않음)으로 생성할 수 있거나 컬러 공간 간의 상관성을 고려하여 획득된 블록(예를 들어, 기존의 복원 블록에 보정을 수행함. P = a * R + b 에서 a와 b는 보정을 위해 사용되는 값을 의미하고 R과 P는 각각 다른 컬러 공간에서 획득된 값과 현재 컬러 공간의 예측 값을 의미)을 예측 블록으로 생성할 수 있다.
본 예에서는 컬러 공간의 상관성을 이용하여 획득되는 데이터를 현재 블록의 예측값으로 사용하는 경우를 가정하여 설명하나, 해당 데이터를 이미 존재하는 현재 블록의 예측값에 보정되는 보정값(예를 들어, 다른 컬러 공간의 잔차값이 보정값으로 사용. 즉, 다른 예측값이 존재하며 그 예측값을 보정. 결국 합치면 예측값이기는 하지만 세부적으로 구분할 때를 위한 설명)으로 사용되는 경우 또한 가능할 수 있다. 본 발명에서는 전자의 경우를 가정하여 설명하오나 이에 한정되지 않고 보정값으로 사용되는 경우로의 동일하거나 변경 적용이 가능할 수 있다.
상기 예측 모드는 영상 타입에 상관없이 지원되는 모드일 수 있거나 또는 일부 영상 타입(예를 들어, I 영상 타입에 지원되고 P나 B 영상 타입에 지원되지 않는 모드 등)에 따라 지원 여부가 결정되는 모드일 수 있다.
(상관성 정보를 획득하기 위해 비교하는 부분)
상기 예에서 컬러 공간 간의 상관성 정보(a, b 등)는 명시적으로 관련 정보를 포함할 수 있거나 묵시적으로 획득될 수 있다. 이때, 상관성 정보를 획득하기 위해 비교되는 영역은 1)색차 성분의 현재 블록과 휘도 성분의 대응되는 영역 또는 2)색차 성분의 현재 블록의 인접한 영역(예를 들어, 좌, 상, 좌상, 우상, 좌하 블록 등)과 휘도 성분의 대응되는 블록의 인접한 영역일 수 있다. 전자는 명시적, 후자는 묵시적으로 처리되는 경우의 예일 수 있다.
예를 들어, 각 컬러 공간의 적어도 하나의 화소값(이때, 비교가 되는 화소값<Pixel Value>은 각 컬러 공간에서 하나의 화소<Pixel>에서 획득되는 화소값일 수 있고, 복수의 화소에서 획득되는 화소값일 수 있음. 즉, 가중치 평균 등의 필터링 과정을 통해 유도되는 화소값. 즉, 각 컬러 공간의 비교에 사용되는 하나의 화소값을 위해 참조되거나 사용되는 화소의 개수는 하나의 화소 vs 하나의 화소, 하나의 화소 vs 복수의 화소 등일 수 있음. 이때, 전자는 예측값을 생성하는 컬러 공간, 후자는 참조되는 컬러 공간일 수 있음. 위의 예는 컬러 포맷에 따라 발생가능한 경우일 수 있거나 또는 컬러 포맷과 상관없이 색차 성분의 하나의 화소의 화소값과 휘도 성분의 대응되는 하나의 화소의 화소값과의 비교가 가능할 수 있고, 색차 성분의 하나의 화소의 화소값과 휘도 성분의 복수의 화소를 필터링<a-tap separate 1D filter, b x c mask non-separable 2D filter, d-tap directional filter 등>하여 획득되는 화소값과의 비교가 가능할 수 있고, 부/복호화 설정에 따라 둘 중 하나의 방법을 사용할 수 있음. 위에서는 색차와 휘도의 예를 설명하였으나, 색차<Cb>와 색차<Cr>의 예와 같은 변경이 가능할 수 있음)의 비교 등을 통해 상관성 정보를 획득할 수 있다.
상기 예에서 상관성 정보를 묵시적으로 획득할 때 비교되는 영역의 경우, 현재 컬러 성분의 현재 블록의 최인접한 화소 라인(예를 들어, p[-1,-1] ~ p[blk_width - 1, -1], p[-1,0] ~ p[-1, blk_height - 1]에 포함되는 화소)과 그에 대응되는 다른 컬러 공간의 화소 라인일 수 있거나 또는 현재 컬러 성분의 현재 블록의 복수의 화소 라인(예를 들어, 위의 경우에 p[-2, -2] ~ p[blk_width - 1, -2], p[-2, -1] ~ p[-2, blk_height - 1]를 포함하는 복수의 화소 라인에 포함되는 화소)과 그에 대응되는 다른 컬러 공간의 화소 라인일 수 있다.
상세하게는, 컬러 포맷이 4:2:0라 가정할 때 현재 컬러 공간(본 예에서는 색차)의 하나의 화소의 화소값과의 비교를 위해서는 다른 컬러 공간(본 예에서 휘도)에서 대응되는 4개의 화소(색차 성분의 하나의 화소는 휘도 성분의 2 x 2 내의 4개 화소에 대응) 중 기 설정된 위치(본 예에서 2 x 2 내 좌상, 우상, 좌하, 우하 중에서 선택)의 하나의 화소의 화소값이 사용될 수 있다. 또는, 색차 공간의 하나의 화소의 화소값과의 비교를 위해서는 휘도 공간에서 복수의 화소(예를 들어, 대응되는 2 x 2 화소 중 적어도 둘의 화소 등)에 필터링을 수행하여 획득되는 화소값이 사용될 수 있다.
정리하면, 현재 블록의 인접한 영역의 복원된 화소와 이에 대응되는 다른 컬러 공간의 복원된 화소로부터 상기 파라미터 정보를 유도할 수 있다. 즉, 상관성 정보에 기반하여 적어도 하나의 파라미터(예를 들어, a 또는 b, a1, b1 또는 a2, b2 등)가 생성될 수 있으며, 다른 컬러 공간의 복원된 블록의 화소에 곱해지거나 더해지는 값(예를 들어, a, a1, a2 / b, b1, b2)으로 사용될 수 있다.
이때, 상기 예에서 비교되는 화소의 사용 가능성에 대한 확인을 한 후에 비교 과정을 수행할 수 있다. 예를 들어, 인접한 영역이 사용 가능한 경우에는 비교를 위한 화소로 사용이 가능하고, 사용 불가능한 경우에는 부/복호화 설정에 따라 정해질 수 있다. 예를 들어, 인접한 영역의 화소가 사용 불가능한 경우에 컬러 공간의 상관성 정보 획득을 위한 과정에서 제외하거나 또는 사용 불가능한 영역을 채운 후에 비교 과정에 포함할 수 있으며 이는 부/복호화 설정에 따라 정해질 수 있다.
예를 들어, 컬러 공간 간의 상관성 정보 획득을 위한 과정에서 제외할 경우 적어도 하나의 컬러 공간의 화소를 포함하는 영역이 사용 불가능한 경우에 해당하는 예일 수 있다. 상세하게는, 둘 중 하나의 컬러 공간의 화소가 사용 불가능한 경우 또는 두 컬러 공간의 화소가 사용 불가능한 경우에 해당하는 예일 수 있으며, 이는 부/복호화 설정에 따라 정해질 수 있다.
또는, 사용 불가능한 영역에 비교를 위한 데이터를 채운 후(또는 참조 화소 패딩 과정과 비슷한 동작)에 컬러 공간 간의 상관성 정보 획득을 위한 과정이 수행되는 경우, 다양한 채우는 방법이 사용될 수 있다. 예를 들어, 기 설정된 화소값{예를 들어, 비트 심도의 중앙값, 1 << (bit_depth - 1), 영상의 실제 화소 중 최소값과 최대값 사이의 값, 영상의 실제 화소의 평균, 중앙값 등}으로 채울 수 있거나, 또는 인접한 화소 또는 인접한 화소들에 필터링을 수행하여 획득된 값(참조 화소 필터링 과정과 비슷한 동작)으로 채울 수 있거나 그 외의 방법이 가능할 수 있다.
도 10은 상관성 정보를 획득하기 위하여 컬러 공간 간의 비교되는 화소의 예를 나타낸다. 설명의 편의를 위해 4:4:4 컬러 포맷을 가정하여 설명한다. 이때, 컬러 포맷에 따른 성분 비를 고려하여 후술하는 과정(즉, 성분 비에 따른 변환 과정이 포함)이 설명됨을 전제한다.
R0는 양 쪽 컬러 공간 영역이 사용 가능한 예를 나타낸다. 양쪽 모두 사용 가능한 영역이므로 해당 영역의 화소는 상관성 정보를 획득하기 위한 비교 과정에 사용될 수 있다.
R1은 양 쪽 컬러 공간 영역 중 하나가 사용 불가능한 예(본 예에서는 현재 컬러 공간의 인접한 영역은 사용 가능, 다른 컬러 공간의 대응되는 영역은 사용 불가)를 나타낸다. 사용 불가한 영역은 다양한 방법을 사용하여 해당 영역을 채운 후에 비교 과정에 사용될 수 있다.
R2는 양 쪽 컬러 공간 영역 중 하나가 사용 불가능한 예(본 예에서는 현재 컬러 공간의 인접한 영역은 사용 불가, 다른 컬러 공간의 대응되는 영역은 사용 가능)를 나타낸다. 사용 불가한 영역이 한 쪽에 존재하기 때문에 양 쪽 컬러 공간의 해당 영역은 비교 과정에 사용될 수 없다.
R3는 양 쪽 컬러 공간 영역이 모두 사용 불가능한 예를 나타낸다. 사용 불가한 영역은 다양한 방법을 사용하여 해당 영역을 채우기를 하여 비교 과정에 사용될 수 있다.
R4는 양 쪽 컬러 공간 영역이 모두 사용 불가능한 예를 나타낸다. 사용 불가한 영역이 양 쪽에 존재하기 때문에 양 쪽 컬러 공간의 해당 영역은 비교 과정에 사용될 수 없다.
또한, 도 10과 달리 현재 블록의 인접한 영역 또는 다른 컬러 공간의 대응되는 영역이 모두 사용 불가능한 경우에는 다양한 설정이 가능할 수 있다.
일 예로, a와 b는 기 설정된 값(본 예에서 a는 1, b는 0)으로 할당할 수 있다. 이 경우는 다른 컬러 공간의 데이터를 현재 블록의 예측 블록으로 채우겠다는 모드를 유지하겠다는 뜻일 수 있다. 또한, 이 경우는 예측 모드 부/복호화를 수행할 때 해당 모드에 대한 발생(또는 선택) 확률 설정 또는 우선 순위가 기존의 경우와 다른 설정을 갖는 것(예를 들어, 선택되는 확률이 낮은 경우로 보거나 또는 후 순위로 둔다던지 등. 즉, 정확도가 많이 떨어지는 상관성 정보이기 때문에 이 예측 모드를 통해 획득되는 예측 블록의 정확도는 많이 떨어져서 최종적으로 최적의 예측 모드로 선택되지 않으리라는 것을 짐작할 수 있는 상황)을 허용할 수 있다.
일 예로, 비교 대상이 되는 데이터가 존재하지 않기 때문에 다른 컬러 공간의 데이터를 현재 블록의 예측 블록으로 채우겠다는 모드는 지원되지 않을 수 있다. 즉, 상기 모드는 적어도 하나의 사용 가능한 영역이 존재할 경우에 지원되는 모드일 수 있다. 또한, 이 경우는 예측 모드 부/복호화를 수행할 때 해당 모드를 대신하는 다른 모드를 허용하는 설정 또는 허용하지 않는 설정이 가능할 수 있다. 전자의 경우 예측 모드 후보군의 개수는 유지하는 설정이고, 후자의 경우 예측 모드 후보군의 개수가 적어지는 설정일 수 있다.
상기 예에만 한정되지 않고 다양한 변형의 예가 가능할 수 있다.
상기 예에서 사용 불가능한 경우는 해당 영역이 부/복호화가 완료되지 않을 때, 영상(예를 들어, 픽쳐, 슬라이스, 타일 등) 경계 너머 위치할 때(즉, 현재 블록과 해당 영역이 동일한 영상 내에 포함되지 않을 때)에 해당될 수 있다. 또한, 부/복호화 설정(예를 들어, constrained_intra_pred_flag 등. 일 예로, P나 B 슬라이스/타입이고 위의 플래그가 1이며 해당 영역의 부호화 모드가 Inter일 때)에 따라 사용 불가능한 경우가 추가될 수 있다.
후술하는 예에서 컬러 공간의 비교를 통해 상관성 정보를 획득한 후에 다른 컬러 공간의 복원된 데이터를 사용하여 현재 블록의 예측 블록을 생성할 때, 위와 같은 제약 사항이 발생할 수 있다. 즉, 현재 블록과 대응되는 다른 컬러 공간의 해당 영역이 위와 같이 사용 불가능한 경우로 판단되는 경우에는 이 모드는 사용이 제한되거나 불가능할 수 있다.
위의 과정을 통해 획득되는 컬러 공간 간의 상관성 정보를 나타내는 파라미터와 현재 블록과 대응되는 다른 컬러 공간의 복원된 데이터를 사용하여 현재 블록의 예측값을 생성할 수 있다. 이때, 현재 블록의 예측에 사용되는 다른 컬러 공간의 복원된 데이터는 기 설정된 위치의 화소의 화소값 또는 필터링 과정 등을 통해 획득된 화소값일 수 있다.
예를 들어, 4:4:4의 경우 색차 공간의 하나의 화소의 예측값 생성을 위해서는 휘도 공간에서 대응되는 하나의 화소의 화소값이 사용될 수 있다. 또는, 색차 공간의 하나의 화소의 예측값 생성을 위해서는 휘도 공간에서 복수의 화소(예를 들어, 대응되는 화소를 중심으로 좌, 우, 상, 하, 좌상, 우상, 좌하, 우하 등의 방향에 위치하는 화소들. 5-tap, 7-tap 필터를 적용할 때의 예를 들면 대응되는 화소를 중심으로 좌, 우, 상, 하에 2개, 3개씩 있는 경우라 이해할 수 있음)에 필터링을 수행하여 획득되는 화소값이 사용될 수 있다,
예를 들어, 4:2:0의 경우 색차 공간의 하나의 화소의 예측값 생성을 위해서는 휘도 공간에서 대응되는 4개의 화소(색차 성분의 하나의 화소는 휘도 성분의 2 x 2 화소와 대응) 중 기 설정된 위치(좌상, 우상, 좌하, 우하 중 선택)의 하나의 화소의 화소값이 사용될 수 있다. 또는, 색차 공간의 하나의 화소의 예측값 생성을 위해서는 휘도 공간에서 복수의 화소(예를 들어, 대응되는 2 x 2 화소 중 적어도 둘의 화소 또는 2 x 2 화소를 중심으로 좌, 우, 상, 하, 좌상, 우상, 좌하, 우하 등의 방향에 위치하는 화소들)에 필터링을 수행하여 획득되는 화소값이 사용될 수 있다.
정리하면, 다른 컬러 공간에서 획득되는 화소값에 상기 과정을 통해 획득된 상관성 정보를 나타내는 파라미터를 적용(곱하거나 더하거나 등)하여 획득된 화소값이 현재 컬러 공간 내 화소의 예측값으로 획득될 수 있다.
상기 예에서는 일부 컬러 포맷, 일부 화소값 획득 과정 등에 대한 경우를 설명하였으나, 이에 한정되지 않고 다른 경우에서도 동일하거나 변형의 예가 가능할 수 있다.
(동일한 컬러 공간에서 예측값 획득 vs 다른 컬러 공간에서 예측값 획득)에서 설명되는 내용은 (고정적인 후보군 구성 vs 가변적인 후보군 구성)에 적용되어 설명될 수도 있다. 예를 들어, 다른 컬러 공간에서 예측값을 획득할 수 없는 경우에는 그에 대한 대체 모드가 후보군에 포함되어 구성될 수 있다.
상기 예를 통해 전술한 예측 모드의 경우 관련 정보(예를 들어, 지원 여부에 대한 정보, 파라미터 정보 등)가 비디오, 시퀀스, 픽쳐, 슬라이스, 타일 등의 단위로 포함될 수 있다.
정리하면, 부/복호화 설정에 따라 동일한 시간에 동일한 공간 내의 인접한 영역으로부터 예측 블록 생성을 위한 데이터를 획득하는 방법과 관련된 예측 모드(A 모드)로 예측 모드 후보군을 구성할 수 있거나 또는 상기 예측 모드에 추가적으로 동일한 시간에 다른 공간 내 위치한 영역으로부터 예측 블록 생성을 위한 데이터를 획득하는 방법과 관련된 예측 모드(B_모드)가 예측 모드 후보군에 포함될 수 있다.
상기 예에서 A 모드만 사용하거나 B 모드만 사용하여 예측 모드 후보군을 구성할 수 있고, A 모드와 B 모드를 혼합 사용하여 예측 모드 후보군을 구성할 수 있다. 이와 관련하여 명시적으로 예측 모드 후보군 구성에 관한 설정 정보가 생성될 수 있거나 또는 묵시적으로 예측 모드 후보군 구성에 대한 정보가 미리 결정될 수 있다.
예를 들어, 일부 부/복호화 설정(본 예에서 영상 타입)과 관계없이 동일한 구성을 가질 수 있거나 또는 일부 부/복호화 설정에 따라 개별적인 구성(예를 들어, I 영상 타입에는 A 모드와 B_1<컬러 모드> 모드와 B_2<컬러 복사 모드> 모드를 사용하여 예측 모드 후보군을 구성하고, P 영상 타입에는 A 모드와 B_1 모드를 사용하여 예측 모드 후보군을 구성하고, B 영상 타입에는 A 모드와 B_2 모드를 사용하여 예측 모드 후보군을 구성하는 등)을 가질 수 있다.
본 발명에서는 휘도 성분을 위한 예측 모드 후보군은 도 9와 같으며, 색차 성분을 위한 예측 모드 후보군은 도 9에서 수평, 수직, 대각선 모드(도 9의 Planar, DC, 컬러 모드1, 컬러 모드2, 컬러 모드3, 컬러 복사 모드1, 컬러 복사 모드2, 이웃 블록 모드1(좌 블록), 이웃 블록 모드2(상 블록)로 구성된다는 가정 하에 설명하지만, 그 밖의 다양한 예측 모드 후보군에 대한 설정이 가능할 수 있다.
본 발명의 일 실시예에 따른 영상 부호화 방법에서 화면내 예측은 다음과 같이 구성될 수 있다. 예측부의 화면내 예측은 참조 화소 구성 단계, 예측 블록 생성 단계, 예측 모드 결정 단계, 예측 모드 부호화 단계를 포함할 수 있다. 또한, 영상 부호화 장치는 참조 화소 구성 단계, 예측 블록 생성 단계, 예측 모드 결정 단계, 예측 모드 부호화 단계를 구현하는 참조 화소 구성부, 예측 블록 생성부, 예측 모드 부호화부를 포함하도록 구성할 수 있다. 전술한 과정의 일부는 생략될 수 있거나 다른 과정이 추가될 수 있고, 상기 기재된 순서가 아닌 다른 순서로 변경될 수 있다.
또한, 본 발명의 일 실시예에 따른 영상 복호화 방법에서 화면내 예측은 다음과 같이 구성될 수 있다. 예측부의 화면내 예측은 예측 모드 복호화 단계, 참조 화소 구성 단계, 예측 블록 생성 단계를 포함할 수 있다. 또한, 영상 복호화 장치는 예측 모드 복호화 단계, 참조 화소 구성 단계, 예측 블록 생성 단계를 구현하는 예측 모드 복호화부, 참조 화소 구성부, 예측 블록 생성부를 포함하도록 구성할 수 있다. 전술한 과정의 일부는 생략될 수 있거나 다른 과정이 추가될 수 있고, 상기 기재된 순서가 아닌 다른 순서로 변경될 수 있다.
상기 예측 블록 생성 단계에서, 화면내 예측은 현재 블록의 단위(예를 들어, 부호화 블록, 예측 블록, 변환 블록 등)로 수행될 수도 있고, 소정의 서브 블록의 단위로 수행될 수도 있다. 이를 위해, 현재 블록이 서브 블록의 분할되어 화면내 예측이 수행되는지 여부를 나타내는 플래그가 이용될 수 있다. 상기 플래그는, 부호화 장치에서 부호화되어 시그날링될 수 있다. 상기 플래그가 제1 값인 경우, 현재 블록은 복수의 서브 블록으로 분할되고, 그렇지 않은 경우, 현재 블록은 복수의 서브 블록으로 분할되지 않는다. 여기서의 분할은 전술한 트리 구조 기반의 분할 이후에 수행되는 추가적인 분할일 수 있다. 현재 블록에 속한 서브 블록은 하나의 화면내 예측 모드를 공유하나, 서브 블록 별로 상이한 참조 화소가 구성될 수 있다. 또는, 상기 서브 블록은 동일한 화면내 예측 모드 및 참조 화소를 이용할 수도 있다. 또는, 서브 블록은 동일한 참조 화소를 이용하나, 서브 블록 별로 서로 상이한 화면내 예측 모드를 이용할 수 있다.
상기 분할은, 수직 또는 수평 방향으로 수행될 수 있다. 분할 방향은, 부호화 장치에서 시그날링되는 플래그에 기초하여 결정될 수 있다. 예를 들어, 상기 플래그가 제1 값인 경우, 수평 방향으로 분할되고, 그렇지 않은 경우, 수직 방향으로 분할될 수 있다. 또는, 분할 방향은, 현재 블록의 크기에 기초하여 결정될 수도 있다. 예를 들어, 현재 블록의 높이가 소정의 문턱크기보다 큰 경우, 수평 방향으로 분할되고, 현재 블록의 너비가 소정의 문턱크기보다 큰 경우, 수직 방향으로 분할될 수 있다. 여기서, 문턱크기는, 부호화/복호화 장치에 기-정의된 고정된 값일 수도 있고, 블록 크기에 관한 정보(예를 들어, 최대 변환 블록의 크기, 최대 부호화 블록의 크기 등)에 기초하여 결정될 수 있다. 블록 크기에 관한 정보는, 시퀀스, 픽쳐, 슬라이스, 타일, 브릭 또는 CTU row 중 적어도 하나의 레벨에서 시그날링될 수 있다.
서브 블록의 개수는, 현재 블록의 크기, 형태, 분할 깊이, 화면내 예측 모드 등에 기초하여 가변적으로 결정될 수 있다. 예를 들어, 현재 블록이 4x8 또는 8x4인 경우, 현재 블록은 2개의 서브 블록으로 분할될 수 있다. 또는, 현재 블록이 8x8보다 크거나 같은 경우, 현재 블록은 4개의 서브 블록으로 분할될 수 있다.
본 발명에서는 부호화기를 중심으로 설명을 할 것이며, 복호화기의 경우 부호화기의 내용으로부터 역으로 유도 가능하므로 상세한 설명은 생략한다.
도 11은 화면내 예측에 사용되는 참조 화소 구성을 설명하기 위한 예시도이다. 예측이 수행되는 현재 블록의 크기 및 형태(M × N)는 블록 분할부로부터 획득될 수 있으며, 화면내 예측을 위해 4×4 내지 128×128 범위에서 지원되는 가정 하에 설명한다. 화면내 예측은 예측 블록 단위로 수행되는 것이 일반적일 수 있으나 블록 분할부의 설정에 따라 부호화 블록, 변환 블록 등의 단위로 수행될 수 있다. 블록 정보를 확인한 후 참조 화소 구성부에서는 현재 블록의 예측에 사용되는 참조 화소를 구성할 수 있다. 이때, 참조 화소는 임시 메모리(예를 들어, 배열<Array>. 1차, 2차 배열 등)를 통해 관리될 수 있으며, 블록의 화면내 예측 과정마다 생성 및 제거되고, 임시 메모리의 크기는 참조 화소의 구성에 따라 결정될 수 있다.
본 예에서는 현재 블록을 중심으로 좌, 상, 좌상, 우상, 좌하 블록이 현재 블록의 예측에 사용되는 경우를 가정하여 설명하지만, 이에 한정되지 않고 다른 구성의 블록 후보군이 현재 블록의 예측에 사용될 수도 있다. 예를 들어, 상기 참조 화소를 위한 이웃 블록의 후보군은 래스터 또는 Z 스캔을 따르는 경우의 일 예일 수 있으며, 스캔 순서에 따라 상기 후보군 중 일부를 제거할 수 있거나 또는 다른 블록 후보군(예를 들어, 우, 하, 우하 블록 등이 추가 구성)을 포함하여 구성될 수 있다.
또는, 다른 컬러 공간(예를 들어, 현재 블록이 Cr에 속할 경우 다른 컬러 공간은 Y 또는 Cb가 해당)에서 현재 블록과 대응되는 블록(예를 들어, 각 컬러 공간에서 동일 좌표 또는 컬러 성분 구성 비율에 따라 대응되는 좌표를 갖는 경우)이 현재 블록의 예측에 사용될 수 있다. 또한, 설명의 편의를 위해 상기 기 설정된 위치(좌, 상, 좌상, 우상, 좌하)에 하나의 블록으로 구성된 예를 가정하여 설명하지만, 해당 위치에는 적어도 하나의 블록이 존재할 수 있다. 즉, 상기 기 설정된 위치에는 해당 블록의 블록 분할에 따른 복수의 서브 블록이 존재할 수 있다.
정리하면, 현재 블록의 인접한 영역이 현재 블록의 화면내 예측을 위한 참조 화소의 위치일 수 있고, 예측 모드에 따라 다른 컬러 공간의 현재 블록과 대응되는 영역이 추가로 참조 화소의 위치로 고려될 수 있다. 상기 예 외에도 예측 모드, 방법 등에 따라 정의되는 참조 화소의 위치가 결정될 수 있다. 예를 들어, 블록 매칭 등의 방법을 통해 예측 블록을 생성할 경우에 참조 화소 위치는 현재 영상의 현재 블록 이전의 부/복호화가 완료된 영역 혹은 부/복호화가 완료된 영역에서 탐색 범위(예를 들어, 현재 블록의 왼쪽 또는 위쪽 또는 왼쪽 위, 오른쪽 위 등을 포함) 내에 포함된 영역이 참조 화소의 위치로 고려될 수 있다.
도 11과 같이 현재 블록의 예측에 사용되는 참조 화소는 좌, 상, 좌상, 우상, 좌하 블록의 인접한 화소(도 11의 Ref_L, Ref_T, Ref_TL, Ref_TR, Ref_BL)로 구성할 수 있다. 이때, 참조 화소는 현재 블록과 가장 인접한 이웃 블록의 화소들(도 11 a)로 구성하는 것이 일반적이나 그 외의 화소들(도 11 b와 그 외의 바깥 라인의 화소들)도 포함하는 것도 가능할 수 있다. 즉, 현재 블록에 인접한 제1 화소 라인(a), 제1 화소 라인에 인접한 제2 화소 라인(b), 제2 화소 라인에 인접한 제3 화소 라인 또는 제3 화소 라인에 인접한 제4 화소 라인 중 적어도 하나가 이용될 수 있다. 예를 들어, 부호화/복호화 설정에 따라, 복수의 화소 라인은 제1 내지 제4 화소 라인을 모두 포함할 수도 있고, 제3 화소 라인을 제외한 나머지 화소 라인만을 포함할 수도 있다. 또는, 복수의 화소 라인은 제1 화소 라인 및 제4 화소 라인만을 포함할 수도 있다.
현재 블록은 상기 복수의 화소 라인 중 어느 하나를 선택적으로 참조하여 화면내 예측을 수행할 수 있다. 이때, 상기 선택은, 부호화 장치에서 시그날링되는 인덱스(refIdx)에 기초하여 수행될 수 있다. 또는, 현재 블록의 크기, 형태, 분할 타입, 화면내 예측 모드가 비방향성 모드인지 여부, 화면내 예측 모드의 각도 등에 기초하여, 상기 복수의 화소 라인 중 어느 하나가 선택적으로 이용될 수도 있다. 예를 들어, 화면내 예측 모드가 Planar 모드 또는 DC 모드인 경우, 제1 화소 라인만이 이용되도록 제한될 수 있다. 또는, 현재 블록의 크기(너비 또는 높이)가 소정의 문턱값보다 작거나 같은 경우, 제1 화소 라인만이 이용되도록 제한될 수 있다. 또는, 화면내 예측 모드가 소정의 문턱각도보다 큰 경우(또는, 소정의 문턱각도보다 작은 경우), 제1 화소 라인만이 이용되도록 제한될 수 있다. 상기 문턱각도는, 전술한 예측 모드 후보군 중 모드 2, 모드 66에 대응하는 화면내 예측 모드의 각도일 수 있다.
한편, 현재 블록과 인접한 화소는 적어도 하나의 참조 화소 계층으로 분류할 수 있는데, 현재 블록과 가장 인접한 화소는 ref_0{현재 블록의 경계 화소와 화소값 차이가 1인 화소들. p(-1,-1) ~ p(2m-1,-1), p(-1,0) ~ p(-1,2n-1)}, 그 다음 인접한 화소{현재 블록의 경계 화소와 화소값 차이 2. p(-2,-2) ~ p(2m,-2), p(-2,-1) ~ p(-2,2n)}는 ref_1, 그 다음 인접한 화소{현재 블록의 경계 화소와 화소값 차이 3. p(-3,-3) ~ p(2m+1, -3), p(-3,-2) ~ p(-3,2n+1)}는 ref_2 등으로 나눌 수 있다. 즉, 현재 블록의 경계 화소와 인접한 화소 거리에 따라 참조 화소를 복수의 참조 화소 계층으로 분류할 수 있다.
또한, 여기서 참조 화소 계층은 인접한 이웃 블록마다 달리 설정할 수 있다. 예를 들어, 현재 블록과 상단으로 이웃한 블록을 참조 블록으로 사용할 때에는 ref_0번 계층에 따른 참조 화소를 사용하고, 우상단으로 이웃한 블록을 참조 블록으로 사용할 때에는 ref_1번 계층에 따른 참조 화소를 사용할 수 있다.
여기서 일반적으로 화면내 예측을 수행할 때 참조되는 참조 화소 집합은 현재 블록과 좌하, 좌, 좌상, 상단, 우상단으로 인접한 이웃 블록들에 속하고, ref_0번 계층(경계 화소와 가장 인접한 화소들)에 속하는 화소들이며, 이하에서 별도의 설명이 없다면, 이러한 화소들임을 전제한다. 그러나, 앞서 언급한 이웃 블록들 중 일부 블록에 속하는 화소들만 참조 화소 집합으로 사용할 수도 있고, 둘 이상의 계층에 속하는 화소들을 참조 화소 집합으로 사용할 수도 있다. 여기서 참조 화소 집합이나 계층은 묵시적으로 결정(부/복호화 장치에서 미리 설정)될 수도 있고, 명시적으로 결정(부호화 장치로부터 결정할 수 있는 정보를 수신)될 수도 있다.
여기서, 지원되는 참조 화소 계층은 최대 3개인 것을 전제로 설명하지만 그 이상의 값 또한 가질 수 있고, 참조 화소 계층의 개수와 참조 가능한 이웃 블록들의 위치에 따른 참조 화소 집합의 수(또는 참조 화소 후보군으로 지칭될 수 있음)는 블록의 크기, 형태, 예측 모드, 영상 타입<I/P/B. 이때, 영상은 픽쳐, 슬라이스, 타일 등>, 컬러 성분 등에 따라 달리 설정될 수 있고, 관련 정보를 시퀀스, 픽쳐, 슬라이스, 타일 등의 단위에 포함할 수 있다.
본 발명에서는 현재 블록과 가장 인접한 참조 화소 계층부터 낮은 인덱스(0부터 1씩 증가)를 할당하는 경우를 전제로 설명하지만, 이에 한정되지 않는다. 또한, 후술하는 참조 화소 구성 관련 정보는 위와 같은 인덱스 설정(복수의 참조 화소 집합 중 하나를 선택하는 경우에 작은 인덱스에 짧은 비트를 할당하는 이진화 등) 하에 생성될 수 있다.
또한, 지원되는 참조 화소 계층이 두 개 이상인 경우, 두 개 이상의 참조 화소 계층에 포함된 각각의 참조 화소를 이용하여 가중치 평균 등을 적용할 수 있다.
예를 들어, 도 11의 ref_0번 계층(최인접 화소 계층)과 ref_1번 계층(그 다음 화소 계층)에 위치한 화소들의 가중치 합으로 획득한 참조 화소를 사용하여 예측 블록을 생성할 수 있다. 이때, 각 참조 화소 계층에서 가중치 합이 적용되는 화소는 예측 모드(예를 들어, 예측 모드 방향성 등)에 따라 정수 단위 화소뿐만 아니라 소수 단위 화소일 수도 있다. 또한, 제1 참조 화소 계층에 따른 참조 화소를 사용하여 획득되는 예측 블록과 제2 참조 화소 계층에 따른 참조 화소를 사용하여 획득되는 예측 블록에 각각 가중치(예를 들어, 7:1, 3:1, 2:1, 1:1 등)를 주어 하나의 예측 블록을 획득할 수 있다. 이때, 가중치는 현재 블록과 인접한 참조 화소 계층에 따른 예측 블록일수록 더 높은 가중치를 가질 수 있다.
일반적으로 이웃 블록의 가장 인접한 화소를 참조 화소로 구성하는 것이 그에 대한 예일 수 있으나, 이에 한정되지 않고 다양한 경우의 수(예를 들어, ref_0와 ref_1이 참조 화소 계층으로 선택되고 ref_0와 ref_1을 통해 가중치 합 등의 방법으로 예측 화소값을 생성하는 경우 등. 즉, 묵시적인 경우)가 가능할 수 있다.
또한, 참조 화소 구성 관련 정보(예를 들어 참조 화소 계층 또는 집합에 대한 선택 정보 등)는 미리 설정된 정보(예를 들어, 참조 화소 계층이 ref_0로 미리 설정된 경우)를 제외하고 구성(예를 들어, ref_1, ref_2, ref_3 등)될 수 있으나, 역시 이에 한정되지 않는다.
상기 예를 통해 참조 화소 구성에 관한 일부 경우를 살펴보았는데, 이는 다양한 부/복호화 정보 등과 결합되어 화면내 예측 설정이 정해질 수 있다. 이때, 부/복호화 정보는 영상 타입, 컬러 성분, 현재 블록의 크기, 형태, 예측 모드{예측 모드의 종류(방향성, 비방향성), 예측 모드의 방향(수직, 수평, 대각선1, 대각선2 등)} 등이 해당될 수 있으며, 이웃 블록의 부/복호화 정보와 현재 블록과 이웃 블록의 부/복호화 정보 조합 등에 따라 화면내 예측 설정(본 예에서는 참조 화소 구성 설정)이 정해질 수 있다.
도 12는 화면내 예측에 사용되는 참조 화소 범위를 설명하기 위한 예시도이다. 상세하게는, 블록의 크기, 형태, 예측 모드의 구성(본 예에서 예측 모드의 각도 정보) 등에 따라 결정되는 참조 화소 범위를 나타낸다. 도 12에서 화살표가 가리키는 위치는 예측에 사용되는 화소를 의미한다.
도 12를 참조하면, A, A', B, B', C 화소는 8×2, 2×8, 8×4, 4×8, 8×8 블록의 우측 하단의 화소를 의미하며, 해당 화소의 예측을 위해 상측과 좌측 블록에서 사용되는 화소(AT, AL, BT, BL, CT, CL)를 통해 각 블록의 참조 화소 범위를 확인할 수 있다.
예를 들어, A와 A'화소(직사각 블록)의 경우 p(0,-1) ~ p(9,-1), p(-1,0) ~ p(-1,9), p(-1,-1)의 범위에, B와 B'화소(직사각 블록)의 경우 p(0,-1) ~ p(11,-1), p(-1,0) ~ p(-1,11), p(-1,-1)의 범위에, C 화소(정사각 블록)의 경우 p(0,-1) ~ p(15,-1), p(-1,0) ~ p(-1,15), p(-1,-1)의 범위에 참조 화소가 위치할 수 있다.
상기 과정을 통해 획득되는 참조 화소의 범위 정보{예를 들어, P(-1,-1), P(M+N-1,-1), P(-1,N+M-1) 등}에 기반하여 화면내 예측 과정(예를 들어, 참조 화소 필터링, 예측 화소 생성 과정 등)에 사용될 수 있다. 또한, 상기 경우에만 한정되어 참조 화소가 지원되지 않으며 그 밖의 다양한 경우가 가능할 수 있다.
화면내 예측의 참조 화소 구성부는 참조 화소 생성부, 참조 화소 보간부, 참조 화소 필터부 등을 포함할 수 있으며, 상기 구성의 전부 또는 일부를 포함하여 구성할 수 있다.
참조 화소 구성부에서 참조 화소 사용 가능성(Availability)을 확인하여 사용 가능한 참조 화소와 사용 불가한 참조 화소를 분류할 수 있다. 예를 들어, 기 설정된 위치의 블록(또는 참조 화소 후보 블록)이 사용 가능한 경우 해당 블록을 참조 화소로 사용할 수 있고, 사용 불가한 경우 해당 블록을 참조 화소로 사용할 수 없다.
상기 참조 화소 사용 가능성은 다음의 조건 중 적어도 하나를 만족하는 경우에 사용 불가로 판단한다. 예를 들어, 픽쳐 경계 바깥에 위치하는 경우, 현재 블록과 동일한 분할 단위(예를 들어, 슬라이스, 타일 등)에 속하지 않는 경우, 부/복호화가 완료되지 않은 경우, 부/복호화 설정에 따라 사용이 제한되는 경우 중 하나라도 만족하는 경우에는 사용 불가로 판단할 수 있다. 즉, 상기 조건을 하나도 만족하지 않는 경우에는 사용 가능으로 판단할 수 있다.
또한, 부/복호화 설정에 의해 참조 화소 사용을 제한할 수 있다. 예를 들어, 제한된 화면내 예측(예를 들어, constrained_intra_pred_flag)의 수행 여부에 따라 참조 화소 사용이 제한될 수 있다. 제한된 화면내 예측은 통신 환경 등의 외부 요인에 에러 강인한 부/복호화를 수행하고자 할 때 다른 영상으로부터 참조되어 복원된 블록을 참조 화소로 사용을 금지하고자 할 때 수행될 수 있다.
상기 제한된 화면내 예측이 비활성화된 경우(예를 들어, I 영상 타입 또는 P나 B 영상 타입에서 constrained_intra_pred_flag = 0)에 참조 화소 후보 블록은 모두 사용 가능할 수 있고, 활성화된 경우(예를 들어, P나 B 영상 타입에서 constrained_intra_pred_flag = 1)에 참조 화소 후보 블록의 부호화 모드(Intra 또는 Inter)에 따라 해당 블록의 참조 화소 사용 여부가 결정될 수 있다. 즉, 해당 블록의 부호화 모드가 Intra일 경우에는 제한된 화면내 예측의 활성화 여부와 관계없이 사용 가능할 수 있고, Inter일 경우에는 제한된 화면내 예측의 활성화 여부에 따라 사용 가능(비활성화)하거나 사용 불가(활성화)할 수 있다.
또한, 제한된 화면내 예측은 다른 컬러 공간에서 현재 블록과 대응되는 복원된 블록의 부호화 모드에 따라 적용될 수 있다. 예를 들어, 현재 블록이 일부 색차 성분(Cb, Cr)에 속하며 현재 블록과 대응되는 휘도 성분(Y)의 부/복호화가 완료된 블록의 부호화 모드에 따라 사용 가능 여부가 결정될 수 있다. 상기 예는 다른 컬러 공간의 복원된 블록을 참조 화소로 사용하는 경우 해당하는 예일 수 있다. 또한, 컬러 공간에 따라 독립적으로 부호화 모드가 결정되는 경우에 해당하는 예일 수 있다.
이때, 참조 화소 후보 블록이 일부 예측 방법(예를 들어, 현재 영상에서 블록 매칭 또는 템플릿 매칭 등으로 예측)으로 부/복호화가 완료된 경우 부/복호화 설정에 따라 참조 화소 사용 여부가 결정될 수 있다.
일 예로, 상기 예측 방법으로 부/복호화가 되었을 때 해당 부호화 모드를 Intra로 설정할 경우 해당 블록은 사용 가능으로 정할 수 있다. 또는, Intra임에도 불구하고 사용 불가인 상태로 두는 예외적인 경우를 허용할 수 있다.
일 예로, 상기 예측 방법으로 부/복호화가 되었을 때 해당 부호화 모드를 Inter로 설정할 경우 해당 블록은 사용 불가로 정할 수 있다. 또는, Inter임에도 불구하고 사용 가능인 상태로 두는 예외적인 경우를 허용할 수 있다.
즉, 부호화 모드에 따라 사용 여부가 결정되는 경우에 예외적인 경우를 둘 것인지 아닌지는 부/복호화 설정에 따라 결정될 수 있다.
제한된 화면내 예측은 일부 영상 타입(예를 들어, P 또는 B 슬라이스/타일 타입 등)에서 적용되는 설정일 수 있다.
참조 화소 사용 가능성을 통해 참조 화소 후보 블록이 모두 사용 가능, 일부 사용 가능, 모두 사용 불가한 경우로 분류할 수 있다. 모두 사용 가능한 경우를 제외한 나머지 경우에는 사용 불가한 후보 블록 위치의 참조 화소를 채우거나 생성할 수 있다.
참조 화소 후보 블록이 사용 가능한 경우에는 해당 블록의 기 설정된 위치의 화소(본 예에서 현재 블록과 인접한 화소라 가정)를 현재 블록의 참조 화소 메모리에 포함할 수 있다. 이때, 해당 블록 위치의 화소 데이터는 그대로 복사되거나 참조 화소 필터링 등의 과정을 통해 참조 화소 메모리에 포함할 수 있다.
참조 화소 후보 블록이 사용 불가한 경우에는 참조 화소 생성 과정을 통해 획득된 화소를 현재 블록의 참조 화소 메모리에 포함할 수 있다.
정리하면, 참조 화소 후보 블록이 사용 가능 상태인 경우 참조 화소를 구성할 수 있고, 참조 화소 후보 블록이 사용 불가 상태인 경우 참소 화소를 생성할 수 있다.
다음은 다양한 방법을 사용하여 사용 불가한 블록 위치의 참조 화소를 채우는 예를 나타낸다.
예를 들어, 임의의 화소값을 사용하여 참조 화소를 생성할 수 있으며, 화소값 범위에 속하는 하나의 화소값(예를 들어, 비트 심도에 기초한 화소값 조정 과정 또는 영상의 화소값 범위 정보에 기초한 화소값 조정 과정 등의 최소값, 최대값, 중앙값 등으로부터 유도되는 값)일 수 있다. 상세하게는, 참조 화소 후보 블록이 모두 사용 불가한 경우에 적용되는 예일 수 있다.
또는, 영상의 부/복호화가 완료된 영역으로부터 참조 화소를 생성할 수 있다. 상세하게는, 사용 불가한 블록에 인접한 적어도 하나의 사용 가능한 블록으로부터 참조 화소를 생성할 수 있다. 이때, 외삽, 내삽, 복사 등의 방법 중 적어도 하나를 사용할 수 있으며, 참조 화소 생성(또는 복사, 외삽) 방향은 시계 방향 또는 시계 반대 방향일 수 있으며, 부/복호화 설정에 따라 정해질 수 있다. 예를 들어, 블록 내의 참조 화소 생성 방향은 기 설정된 하나의 방향을 따르거나 사용 불가한 블록의 위치에 따라 적응적으로 결정되는 방향을 따를 수 있다. 또는, 다른 컬러 공간에서 현재 블록과 대응되는 영역의 경우에는 상기 예와 같은 방법을 사용할 수 있다. 다른 점은 현재 컬러 공간에서는 현재 블록의 인접한 참조 화소를 채우는 과정이라고 한다면 다른 컬러 공간의 경우 현재 블록(m x n)과 대응되는 블록(M x N)을 채우는 과정이기 때문에 상기 방법을 포함하여 그 밖의 다양한 방법(예를 들어, 주변 화소의 수직, 수평, 대각선 등의 방향의 외삽, Planar와 같은 내삽, 평균 등. 이때 채우는 방향은 현재 블록과 대응되는 블록의 주변 화소로부터 대응되는 블록 내부를 향함)을 사용하여 해당 영역(본 예에서 참조 화소라 지칭할 수 있음)을 생성할 수 있다. 본 예는 다른 컬러 공간으로부터 예측 블록을 생성하는 예측 모드가 후보군에 제외되지 않고 포함되는 경우에 해당하는 예일 수 있다.
또한, 참조 화소 사용 가능성의 확인 과정을 통해 참조 화소 구성을 완료한 후, 참조 화소의 선형 보간을 통해 소수 단위의 참조 화소를 생성할 수 있다. 또는, 참조 화소 필터 과정을 수행한 후에 참조 화소 보간 과정을 수행할 수 있다. 또는, 구성된 참조 화소에 대한 필터링 과정만을 수행할 수도 있다. 정리하면, 예측 블록 생성 과정 이전에 수행될 수 있다.
이때, 수평, 수직, 일부 대각선 모드(예를 들어, Diagonal down right, Diagonal down left, Diagonal up right)와 비방향성 모드, 컬러 모드, 컬러 복사 모드 등의 경우에는 보간 과정을 수행하지 않으며, 그 외의 모드(다른 대각선 모드)의 경우 보간 과정을 수행할 수 있다.
보간 정밀도는 지원하는 예측 모드 후보군(또는 전체 예측 모드 개수), 예측 모드 구성(예를 들어, 예측 모드 방향 각도, 예측 모드 간격) 등에 따라 결정될 수 있다.
소수 단위의 참조 화소 보간을 위해 기 설정된 하나의 필터(예를 들어, 2-tap 선형 보간 필터)를 사용할 수 있고, 복수의 필터 후보군(예를 들어, 4-tap 큐빅 필터, 4-tap 가우시안 필터, 6-tap 위너 필터, 8-tap 칼만 필터등) 중 하나를 사용할 수 있다.
복수의 필터 후보군 중 하나를 사용하는 경우 필터 선택 정보를 명시적으로 생성할 수 있거나 또는 묵시적으로 정할 수 있으며, 부/복호화 설정(예를 들어, 보간 정밀도, 블록의 크기, 형태, 예측 모드 등)에 따라 정해질 수 있다.
예를 들어, 블록 크기의 범위에 따라 사용되는 보간 필터가 정해질 수 있고, 보간 정밀도에 따라 사용되는 보간 필터가 정해질 수 있으며, 예측 모드의 특성(예를 들어, 방향성 정보 등)에 따라 보간 필터가 정해질 수 있다.
상세하게는, 블록 크기 범위에 따라 일부 범위(A)에서는 기 설정된 보간 필터(a)가 사용되고 일부 범위(B)에서는 기 설정된 보간 필터(b)가 사용될 수 있고, 일부 범위(C)에서는 복수의 보간 필터(C) 중 하나의 보간 필터(c)가 사용될 수 있고, 일부 범위(D)에서는 복수의 보간 필터(C) 중 하나의 보간 필터(d)가 사용될 수 있고, 일부 범위에서는 기 설정된 보간 필터가 사용되고 일부 범위에서는 복수의 보간 필터 중 하나가 사용될 수 있다. 이때, 하나의 보간 필터가 사용되는 경우는 묵시적, 복수의 보간 필터 중 하나의 보간 필터가 사용되는 경우는 명시적인 경우이며, 블록 크기 범위를 나누는 블록의 크기는 M x N (본 예에서 M과 N은 4, 8, 16, 32, 64, 128 등. 즉, M과 N이 각 블록 크기 범위의 최소 또는 최대값이 될 수 있음)일 수 있다.
상기 보간 관련 정보는 비디오, 시퀀스, 픽쳐, 슬라이스, 타일, 블록 등의 단위로 포함될 수 있다. 보간 과정은 참조 화소 구성부에서 수행될 수 있거나 또는 예측 블록 생성부에서 수행되는 과정일 수 있다.
또한, 참조 화소를 구성한 후 부/복호화 과정을 통해 남아있는 열화를 줄여줌으로써 예측의 정확도를 높이는 목적으로 참조 화소에 필터링을 수행할 수 있으며, 이때 사용되는 필터는 저역 통과 필터(Low-pass Filter)일 수 있다. 부/복호화 설정에 따라 필터링의 적용 유무가 결정될 수 있고, 필터링이 적용되는 경우에는 고정적인 필터링 또는 적응적인 필터링이 적용될 수 있으며, 부/복호화 설정은 블록의 크기, 형태, 예측 모드 등에 따라 정의될 수 있다.
고정적인 필터링은 기 설정된 하나의 필터가 참조 화소 필터부에 적용되는 경우를 의미하고, 적응적인 필터링은 복수의 필터 중 하나가 참조 화소 필터부에 적용되는 경우를 의미한다. 이때, 적응적인 필터링의 경우 부/복호화 설정에 따라 복수의 필터 중 하나가 묵시적으로 정해질 수 있거나 명시적으로 선택 정보가 발생할 수 있으며, 필터 후보군으로 3-tap(예를 들어, [1,2,1]/4) 또는 5-tap(예를 들어, [2,3,6,3,2]) 등의 필터를 포함할 수 있다.
일 예로, 일부 설정(블록 범위 A)에서 필터링이 적용되지 않을 수 있다.
일 예로, 일부 설정(블록 범위 B, 일부 모드 C)에서 필터링이 적용되지 않고, 일부 설정(블록 범위 B, 일부 모드 D)에서 기 설정된 필터(3-tap 필터)를 통해 필터링이 적용될 수 있다.
일 예로, 일부 설정(블록 범위 E, 일부 모드 F)에서 필터링이 적용되지 않고, 일부 설정(블록 범위 E, 일부 모드 G)에서 기 설정된 필터(3-tap 필터)를 통해 필터링이 적용될 수 있고, 일부 설정(블록 범위 E, 일부 모드 H)에서 기 설정된 필터(5-tap 필터)를 통해 필터링이 적용될 수 있고, 일부 설정(블록 범위 E, 일부 모드 I)에서 복수의 필터 중 하나가 선택되어 필터링이 적용될 수 있다.
일 예로, 일부 설정(블록 범위 J, 일부 모드 K)에서 기 설정된 필터(5-tap 필터)를 통해 필터링이 적용될 수 있고, 추가적으로 기 설정된 필터(3-tap 필터)를 통해 필터링이 적용될 수 있다. 즉, 복수의 필터링 과정이 수행될 수 있다. 상세하게는, 선행된 필터링의 결과에 기반하여 필터링이 추가로 적용될 수 있다.
상기 예에서 블록 크기 범위를 나누는 블록의 크기는 M x N (본 예에서 M과 N은 4, 8, 16, 32, 64, 128 등. 즉, M과 N이 각 블록 크기 범위의 최소 또는 최대값이 될 수 있음)일 수 있다. 또한, 예측 모드는 방향성 모드, 비방향성 모드, 컬러 모드, 컬러 복사 모드 등과 같은 크게 분류할 수 있고, 세부적으로는 수평 또는 수직 모드/ 대각선 모드(45도 간격)/ 수평 또는 수직 모드에 인접한 모드1, 수평 또는 수직 모드에 인접한 모드2(앞선 것보다 모드 간격이 조금 더 먼 것) 등으로 분류할 수 있다. 즉, 상기의 경우와 같이 분류된 모드에 따라 필터링 적용 유무, 필터링의 종류 등이 결정될 수 있다.
또한, 상기 예에서는 블록 범위, 예측 모드 등의 복수의 요인에 따라 적응적인 필터링을 적용하는 경우를 나타냈지만, 상기 복수의 요인이 항시 필요한 것은 아니고 적어도 하나의 요소에 따라 적응적인 필터링이 수행되는 예 또한 가능할 수 있다. 또한, 상기 예에 한정되지 않고 다양한 변형의 예가 가능할 수 있으며, 참조 화소 필터 관련 정보는 비디오, 시퀀스, 픽쳐, 슬라이스, 타일, 블록 등의 단위로 포함할 수 있다.
전술한 필터링은 소정의 플래그에 기초하여 선택적으로 수행될 수 있다. 여기서, 플래그는 화면내 예측을 위한 참조 화소에 필터링이 수행되는지 여부를 나타낼 수 있다. 상기 플래그는, 부호화 장치에서 부호화되어 시그날링될 수 있다. 또는, 상기 플래그는, 현재 블록의 부호화 파라미터에 기초하여 복호화 장치에서 유도될 수 있다. 상기 부호화 파라미터는, 참조 화소의 위치/영역, 블록 크기, 성분 타입, 서브 블록 단위의 화면내 예측이 적용되는지 여부, 화면내 예측 모드 중 적어도 하나를 포함할 수 있다.
예를 들어, 현재 블록의 참조 화소가, 현재 블록에 인접한 제1 화소 라인인 경우, 참조 화소에 필터링이 수행되고, 그렇지 않은 경우, 참조 화소에 필터링이 수행되지 않을 수 있다. 또는, 현재 블록에 속한 화소의 개수가 소정의 문턱개수보다 큰 경우, 참조 화소에 필터링이 수행되고, 그렇지 않은 경우, 참조 화소에 필터링이 수행되지 않을 수 있다. 상기 문턱개수는, 부호화/복호화 장치에 기-약속된 값으로서, 16, 32, 64 또는 그 이상의 정수일 수 있다. 또는, 현재 블록이 소정의 문턱크기보다 큰 경우, 참조 화소에 필터링이 수행되고, 그렇지 않은 경우, 참조 화소에 필터링이 수행되지 않을 수 있다. 상기 문턱크기는 M x N으로 표현될 수 있고 부호화/복호화 장치에 기-약속된 값으로, M과 N은 8, 16, 32 또는 그 이상의 정수일 수 있다. 상기 문턱개수 또는 문턱크기는 둘 중 하나 또는 두 요소가 혼합되어 참조 화소에 필터링 수행 여부를 결정하는 조건으로 설정될 수 있다. 또는, 현재 블록이 휘도 성분인 경우, 참조 화소에 필터링이 수행되고, 그렇지 않은 경우, 참조 화소에 필터링이 수행되지 않을 수 있다. 또는, 현재 블록이 전술한 서브 블록 단위의 화면내 예측을 수행하지 않는 경우(즉, 현재 블록의 복수의 서브 블록으로 분할되지 않는 경우), 참조 화소에 필터링이 수행되고, 그렇지 않은 경우, 참조 화소에 필터링이 수행되지 않을 수 있다. 또는, 현재 블록의 화면내 예측 모드가 비방향성 모드 또는 소정의 방향성 모드인 경우, 참조 화소에 필터링이 수행되고, 그렇지 않은 경우, 참조 화소에 필터링이 수행되지 않을 수 있다. 여기서, 비방향성 모드는 Planar 모드 또는 DC 모드일 수 있다. 다만, 비방향성 모드 중 DC 모드에 대해서는 참조 화소의 필터링이 수행되지 않도록 제한될 수도 있다. 상기 방향성 모드는, 정수 화소를 참조하는 화면내 예측 모드를 의미할 수 있다. 예를 들어, 상기 방향성 모드는, 도 9에 도시된 모드 -14, -12, -10, -6, 2, 18, 34, 50, 66, 72, 78, 80에 대응하는 화면내 예측 모드 중 적어도 하나를 포함할 수 있다. 다만, 상기 방향성 모드는, 모드 18 및 50에 각각 대응하는 수평 모드와 수직 모드는 포함되지 않도록 제한될 수도 있다.
상기 플래그에 따라 참조 화소에 필터링이 수행되는 경우, 부호화/복호화 장치에 기-정의된 필터를 기반으로 필터링이 수행될 수 있다. 상기 필터의 탭수는 1, 2, 3, 4, 5 또는 그 이상일 수 있다. 필터 탭수는 참조 화소의 위치에 따라 가변적으로 결정될 수 있다. 예를 들어, 화소 라인의 최하단, 최상단, 최좌측 또는 최우측 중 적어도 하나에 대응하는 참조 화소에는 1-tap 필터가 적용되고, 나머지 참조 화소에 대해서는 3-tap 필터가 적용될 수 있다. 또한, 필터 강도는 참조 화소의 위치에 따라 가변적으로 결정될 수 있다. 예를 들어, 화소 라인의 최하단, 최상단, 최좌측 또는 최우측 중 적어도 하나에 대응하는 참조 화소에 대해서는 s1의 필터 강도가 적용되고, 나머지 참조 화소에 대해서는 s2의 필터 강도가 적용될 수 있다(s1<s2). 상기 필터 강도는 부호화 장치에서 시그날링될 수도 있고, 전술한 부호화 파라미터에 기초하여 결정될 수도 있다. 참조 화소에 n-tap 필터가 적용되는 경우, 현재 참조 화소 및 (n-1)개의 주변 참조 화소에 필터가 적용될 수 있다. 상기 주변 참조 화소는, 현재 참조 화소의 상단, 하단, 좌측 또는 우측 중 적어도 하나의 방향에 위치한 화소를 의미할 수 있다. 상기 주변 참조 화소는, 현재 참조 화소와 동일한 화소 라인에 속할 수도 있고, 주변 참조 화소의 일부는 현재 참조 화소와 상이한 화소 라인에 속할 수도 있다.
예를 들어, 현재 참조 화소가 현재 블록의 좌측에 위치한 경우, 상기 주변 참조 화소는 현재 참조 화소의 상단 또는 하단 중 적어도 하나의 방향으로 인접한 화소일 수 있다. 또는, 현재 참조 화소가 현재 블록의 상단에 위치한 경우, 상기 주변 참조 화소는 현재 참조 화소의 좌측 또는 우측 중 적어도 하나의 방향으로 인접한 화소일 수 있다. 또는, 현재 참조 화소가 현재 블록의 좌상단에 위치한 경우, 상기 주변 참조 화소는 현재 참조 화소의 하단 또는 우측 중 적어도 하나의 방향으로 인접한 화소일 수 있다. 상기 필터의 계수 간의 비율은 [1:2:1], [1:3:1] 또는 [1:4:1]일 수 있다.
예측 블록 생성부에서 적어도 하나의 예측 모드에 따라 예측 블록을 생성할 수 있으며, 상기 화면내 예측 모드에 기반하여 참조 화소를 사용할 수 있다. 이때, 참조 화소는 예측 모드에 따라 외삽(Extrapolation) 등의 방법(방향성 모드)에 사용될 수 있고, 내삽(Interpolation) 또는 평균(DC) 또는 복사(Copy) 등의 방법(비방향성 모드)에 사용될 수 있다. 한편, 전술한 바와 같이, 현재 블록은, 필터링된 참조 화소를 이용할 수도 있고, 필터링되지 않은 참조 화소를 이용할 수도 있다.
도 13은 예측 블록 생성과 관련하여 현재 블록과 인접한 블록을 나타내는 그림이다.
예를 들어, 방향성 모드의 경우 수평과 일부 대각선 모드(Diagonal up right. 수평은 제외되고 대각선은 포함) 사이의 모드는 좌하+좌 블록(도 13에서 Ref_BL, Ref_L), 수평 모드는 좌 블록, 수평과 수직 사이의 모드는 좌+좌상+상 블록(도 13에서 Ref_L, Ref_TL, Ref_T), 수직 모드는 상 블록(도 13에서 Ref_L), 수직과 일부 대각선 모드(Diagonal down left. 수직은 제외되고 대각선은 포함) 사이의 모드는 상+우상 블록(도 13에서 Ref_T, Ref_TR)의 참조 화소를 사용할 수 있다. 또는, 비방향성 모드의 경우 좌, 상 블록(도 13에서 Ref_L, Ref_T) 또는 좌하, 좌, 좌상, 상, 우상 블록의 참조 화소(도 13에서 Ref_BL, Ref_L, Ref_TL, Ref_T, Ref_TR)를 사용할 수 있다. 또는, 컬러 공간의 상관성을 이용하는 모드(컬러 복사 모드)의 경우 다른 컬러 공간의 복원된 블록(도 12에서 도시되지 않았지만 본 발명에서 Ref_Col이라 지칭. 동일한 시간의 다른 공간의 블록을 의미하는 Collocated reference)을 참조 화소로 사용할 수 있다.
화면내 예측을 위해 사용되는 참조 화소는 복수의 개념으로 구분할 수 있다. 예를 들어, 화면내 예측에 사용되는 참조 화소는 제 1 참조 화소와 제 2 참조 화소로 구분할 수 있으며, 제 1 참조 화소는 현재 블록의 예측값 생성에 직접적으로 사용되는 화소일 수 있고, 제 2 참조 화소는 현재 블록의 예측값 생성에 간접적으로 사용되는 화소일 수 있다. 또는, 제 1 참조 화소는 현재 블록의 모든 화소의 예측값 생성에 사용되는 화소일 수 있고, 제 2 참조 화소는 현재 블록의 일부 화소의 예측값 생성에 사용되는 화소일 수 있다. 또는, 제 1 참조 화소는 현재 블록의 1차 예측값 생성에 사용되는 화소일 수 있고, 제 2 참조 화소는 현재 블록의 2차 예측값 생성에 사용되는 화소일 수 있다, 또는, 제 1 참조 화소는 (무조건) 현재 블록의 예측 방향의 시작점에 위치한 영역에 위치하는 화소일 수 있고, 제 2 참조 화소는 현재 블록의 (꼭) 예측 방향의 시작점에 위치하지 않는 화소일 수 있다.
상기 예와 같이 다양한 정의를 통해 참조 화소를 구분할 수 있지만, 예측 모드에 따라 일부 정의로 구분할 수 없는 경우도 존재할 수 있다. 즉, 예측 모드에 따라 참조 화소 구분을 위해 사용되는 정의는 다를 수 있다는 점을 유의하여야 한다.
상기 예를 통해 설명된 참조 화소는 제 1 참조 화소일 수 있으며, 추가적으로 제 2 참조 화소가 예측 블록 생성에 관여할 수 있다. 일부 대각선 모드(Diagonal up right. 수평은 제외되고 대각선은 포함) 사이의 모드는 좌상+상+우상 블록(도 13에서 Ref_TL, Ref_T, Ref_TR), 수평 모드는 좌상+상+우상 블록(도 13에서 Ref_TL, Ref_T, Ref_TR), 수직 모드는 좌상+좌+좌하 블록(도 13에서 Ref_TL, Ref_L, Ref_BL), 수직과 일부 대각선 모드(Diagonal down left, 수직은 제외되고 대각선은 포함) 사이의 모드는 좌상+좌+좌하 블록(도 13에서 Ref_TL, Ref_L, Ref_BL)의 참조 화소를 사용할 수 있다. 상세하게는, 상기 참조 화소를 제 2 참조 화소로 사용할 수 있다. 또한, 비방향성 모드와 컬러 복사 모드 등에서 제 1 참조 화소를 사용하거나 또는 제 1 + 2 참조 화소를 사용하여 예측 블록을 생성할 수 있다.
또한, 제 2 참조 화소는 부/복호화가 완료된 화소뿐만 아니라 현재 블록 내의 화소(본 예에서 예측 화소)도 포함하여 고려될 수 있다. 즉, 1차 예측값이 2차 예측값 생성에 사용되는 화소일 수 있다. 본 발명에서는 부/복호화가 완료된 화소를 제 2 참조 화소로 고려하는 예를 중심으로 설명하오나, 이에 한정되지 않고 부/복호화가 완료되지 않은 화소(본 예에서 예측 화소)를 사용하는 변형의 예 또한 가능할 수 있다.
복수의 참조 화소를 사용하여 예측 블록을 생성 또는 보정하는 것은 기존의 예측 모드의 단점을 보완하기 위한 목적으로 수행되는 경우일 수 있다.
예를 들어, 방향성 모드의 경우 일부 참조 화소(제 1 참조 화소)를 사용하여 해당 블록의 방향성을 예측하고자 하는 목적으로 사용되는 모드이지만, 블록 내의 변화를 정확하게 반영하지 못할 수 있으며 이는 예측의 정확도가 감소되는 경우가 발생할 수 있다. 이때, 추가적인 참조 화소(제 2 참조 화소)를 사용하여 예측 블록을 생성하거나 보정하는데 사용할 경우 예측의 정확도를 증가시킬 수 있다.
이를 위해 후술하는 예에서는 상기 예와 같은 다양한 참조 화소를 사용하여 예측 블록을 생성하는 경우에 대한 설명할 것이지만 상기 예의 경우로만 제한되지 않으며, 제 1, 2 참조 화소와 같은 용어는 사용하지 않더라도 상기 정의로부터 유도되어 이해될 수 있다.
추가적인 참조 화소를 사용하여 예측 블록을 생성하는 것에 대한 설정은 명시적으로 결정할 수 있거나 묵시적으로 설정할 수 있다. 명시적인 경우의 단위는 비디오, 시퀀스, 픽쳐, 슬라이스, 타일 등이 포함될 수 있다. 후술하는 예에서는 묵시적으로 처리하는 경우를 설명할 것이나 이에 한정되지 않고 다른 변형(명시적인 경우 또는 혼합 사용의 경우)의 예가 가능할 수 있다.
예측 모드에 따라 다양한 방법으로 예측 블록을 생성할 수 있다. 상세하게는, 예측 모드가 사용하는 참조 화소의 위치에 따라 예측 방법이 결정될 수 있다. 또한, 블록 내 화소 위치에 따라 예측 방법이 결정될 수 있다.
다음은 수평 모드에 대한 경우를 살펴본다.
예를 들어, 좌 블록을 참조 화소(도 13에서 Ref_L)로 사용하는 경우에는 해당 블록의 최인접한 화소(도 13에서 1300)를 사용(예를 들어, 외삽 등)하여 수평 방향으로 예측 블록을 생성할 수 있다.
또한, 수평 방향에 상응하는 현재 블록과 인접한 참조 화소(도 13에서 Ref_T)를 활용하여 예측 블록을 생성(또는 보정. 생성은 최종적인 예측값에 관여를 한다는 측면에서. 보정은 전체 화소에 관여를 하지 않을 수 있다는 측면에서)할 수 있다. 상세하게는, 해당 블록의 최인접 화소(도 13에서 1310. 추가적으로 1320, 1330도 고려 가능)를 사용하여 예측값을 보정할 수 있으며, 상기 화소들의 화소값 변화도 또는 기울기 정보 등(예를 들어, R0 - T0, T0 - TL, T2 - TL, T2 - T0, T2 - T1 등과 같은 화소값 변화도 또는 기울기 정보에 반영됨)이 상기 보정 과정에 반영될 수 있다.
이때, 보정되는 화소는 현재 블록 내의 모든 화소일 수 있거나 또는 일부(예를 들어, 특정한 형태가 없거나 불규칙한 위치에 존재하는 낱개의 화소 단위로 결정될 수 있고 후술하는 예처럼 라인과 같은 일정 형태가 있는 화소 단위로 결정될 수도 있음. 설명의 편의를 위해 후술하는 예에서는 라인 단위의 화소 단위를 가정하여 설명할 것임)에 한정될 수 있다. 상기 보정되는 화소가 일부 화소에 한정 적용되는 경우라면 예측 모드 방향에 상응하는 적어도 하나의 라인 단위로 결정될 수 있다. 예를 들어, a 내지 d에 해당하는 화소가 보정 대상에 포함될 수 있고, 추가적으로 e 내지 h에 해당하는 화소가 보정 대상에 포함될 수 있다. 또한, 해당 블록의 인접 화소로부터 획득되는 보정 정보는 상기 라인 위치에 관계없이 동일하게 적용될 수 있거나 또는 라인 단위로 다르게 적용될 수 있으며, 상기 인접 화소로부터 거리가 멀어질수록 상기 보정 정보는 덜 적용(예를 들어, L1 - TL, L0 - TL 등과 같이 거리에 따라 나눔값을 크게 설정한다던지)될 수 있다.
이때, 보정 대상에 포함되는 화소는 하나의 영상에서 하나의 설정만을 갖던지 또는 다양한 부/복호화 요소에 따라 적응적으로 결정될 수 있다.
적응적으로 결정되는 경우에 대한 예를 들면, 블록의 크기에 따라 보정 대상이 되는 화소가 결정될 수 있다. 8 x 8 이하의 블록에서는 어떠한 라인도 보정이 수행되지 않고, 8 x 8 초과 32 x 32 이하의 블록에서는 하나의 화소 라인에 보정을 수행할 수 있고, 그 이상의 블록에서는 두 화소 라인에 보정을 수행할 수 있다. 블록 크기 범위에 대한 정의는 본 발명의 이전 설명에서 유도 가능하다.
또는, 블록의 형태(예를 들어, 정사각, 직사각. 상세하게는, 가로가 긴 직사각 또는 세로가 긴 직사각)에 따라 보정 대상이 되는 화소가 결정될 수 있다. 예를 들어, 8 x 4 블록의 경우 두 화소 라인(도 13에서 a 내지 h)에 보정을 수행할 수 있고, 4 x 8 블록의 경우 하나의 화소 라인(도 13에서 a 내지 d)에 보정을 수행할 수 있다. 8 x 4의 경우 가로로 길게 늘어진 블록 형태에서 수평 모드로 결정되는 경우라면 현재 블록의 방향성은 윗 블록에 더 의존적인 경향을 띨 수 있고, 4 x 8의 경우 세로로 길게 늘어진 블록 형태에서 수평 모드로 결정되는 경우라면 현재 블록의 방향성은 윗 블록과 크게 의존적이지 않을 수 있다는 경향을 띨 수 있기 때문일 수 있다. 또한, 위의 반대의 설정이 가능할 수도 있다.
또는, 예측 모드에 따라 보정 대상이 되는 화소가 결정될 수 있다. 수평 또는 수직 모드에는 a개의 화소 라인이 보정 대상이 될 수 있고, 그 외의 모드에서는 b개의 화소 라인이 보정 대상이 될 수 있다. 일부 모드(예를 들어, 비방향성 모드 DC, 컬러 복사 모드 등)의 경우 상기 설명과 같이 보정 대상이 되는 화소가 직사각 형태가 아니라 화소 단위(예를 들어, a 내지 d, e, i, m)로 범위가 지정될 수 있다. 상세한 설명은 후술하는 예에서 이어간다.
상기 설명 외에도 추가적인 부/복호화 요소에 따라 적응적인 설정이 가능할 수 있고, 상기 설명에서는 수평 모드에 대한 제한적인 경우를 중심으로 설명하였으나 상기 예에서만 한정 적용되는 것은 아니며 동일하거나 비슷한 설정이 다른 모드에서도 적용될 수 있다. 또한, 하나의 부/복호화 요소가 아닌 복수의 요소의 조합에 따라 상기 예와 같은 경우가 가능할 수 있다.
수직 모드의 경우 상기 수평 모드의 예측 방법에 방향만 달리 적용하여 유도할 수 있기 때문에 상세한 설명은 생략한다. 또한, 후술하는 예는 수평 모드에서의 설명과 중복되는 내용으로부터 유도할 수 있는 내용은 생략한다.
다음은 대각선 모드(Diagonal up right)에 대한 경우를 살펴본다.
예를 들어, 좌 블록과 좌하 블록을 참조 화소(제 1 참조 화소 또는 주 참조 화소. 도 13에서 Ref_L, Ref_BL)로 사용하는 경우에는 해당 블록의 최인접한 화소(도 13에서 1300 및 1340)를 사용(예를 들어, 외삽 등)하여 대각선 방향으로 예측 블록을 생성할 수 있다.
또한, 대각선 방향에 대척되는 위치에 존재하는 현재 블록과 인접한 참조 화소(제 2 참조 화소 또는 보조 참조 화소. 도 13에서 Ref_T, Ref_TR)를 활용하여 예측 블록을 생성(또는 보정)할 수 있다. 상세하게는, 해당 블록의 최인접 화소(도 13에서 1310 및 1330, 추가적으로 1320도 고려 가능)를 사용하여 예측값을 보정할 수 있으며, 상기 보조 참조 화소와 주 참조 화소의 가중치 평균(예를 들어, 예측되는 화소와 주 참조 화소, 예측되는 화소와 보조 참조 화소의 각각의 x축 또는 y축의 거리 차이 중 적어도 하나에 기반하여 가중치가 획득될 수 있음. 주 참조 화소와 보조 참조 화소에 적용되는 가중치의 예로 15:1 ~ 8:8 등을 가질 수 있음. 만약 보조 참조 화소가 2개 이상인 경우 가중치의 예로 14:1:1, 12:2:2, 10:3:3, 8:4:4 등과 같이 보조 참조 화소에 동일한 가중치를 갖던지 또는 12:3:1, 10:4:2, 8:6:2 등과 같이 보조 참조 화소 간의 다른 가중치를 가질 수 있음. 이때, 다르게 적용되는 가중치는 해당 예측 화소를 중심으로 현재 예측 모드 방향으로 기울기 정보 등이 얼마나 가까운지 여부에 따라 결정될 수 있음. 즉, 해당 예측 화소와 각 보조 참조 화소와의 기울기가 현재 예측 모드 기울기와 어느 것이 다 가까운지를 확인) 등을 통해 상기 보정 과정에 반영될 수 있다.
이때, 상기 필터링은 하나의 영상에서 하나의 설정만을 갖던지 또는 다양한 부/복호화 요소에 따라 적응적으로 결정될 수 있다.
적응적으로 결정되는 경우에 대한 예를 들면, 보정 대상이 되는 화소의 위치에 따라 필터링 적용되는 화소(예를 들어, 화소 개수 등)가 결정될 수 있다. 예측 모드가 대각선 모드(본 예에서 2번 모드)이며 보정 대상이 되는 화소가 c일 경우 L3(본 예에서 제 1 참조 화소)를 사용하여 예측되며, T3(본 예에서 제 2 참조 화소)를 사용하여 보정될 수 있다. 즉, 하나의 화소 예측을 위해 하나의 제 1 참조 화소와 하나의 제 2 참조 화소를 사용한 경우일 수 있다.
또는, 예측 모드가 대각선 모드(본 예에서 3번 모드)이며 보정 대상이 되는 화소가 b일 경우 L1과 L2 사이의 소수 단위 화소를 보간하여 획득된 L1*(또는 L2*. 본 예에서 제 1 참조 화소)를 사용하여 예측되며, T2(본 예에서 제 2 참조 화소)를 사용하여 보정될 수 있거나 T3를 사용하여 보정될 수 있다. 또는, T2와 T3를 사용하여 보정될 수 있거나 예측 모드의 방향성에 기반하여 획득되는 T2와 T3 사이의 소수 단위 화소를 보간하여 획득된 T2*(또는 T3*)를 사용하여 보정될 수 있다. 즉, 하나의 화소 예측을 위해 하나의 제 1 참조 화소(본 예에서 L1* 라 가정할 경우. 직접 사용되는 화소는 L1과 L2로 볼 경우 2개의 화소로 볼 수 있음. 또는 L1*을 보간하기 위해 사용되는 필터에 따라 2개 이상의 화소로 볼 수 있음)와 두 개의 제 2 참조 화소(본 예에서 T2와 T3라 가정할 경우. L1*일 경우에는 하나의 화소로 볼 수 있음)를 사용한 경우일 수 있다.
정리하면, 하나의 화소 예측을 위해 적어도 하나의 제 1 참조 화소와 적어도 하나의 제 2 참조 화소를 사용할 수 있으며, 이는 예측 모드와 예측 화소의 위치에 따라 결정될 수 있다.
상기 보정되는 화소가 일부 화소에 한정 적용되는 경우라면 화면내 예측 모드 방향에 따라 적어도 하나의 수평 또는 수직 라인 단위로 결정될 수 있다. 예를 들어, a, e, i, m에 해당하는 화소 또는 a 내지 d에 해당하는 화소가 보정 대상에 포함될 수 있고, 추가적으로 b, f, j, n에 해당하는 화소 또는 e 내지 h에 해당하는 화소가 보정 대상에 포함될 수 있다. 일부 대각선 모드(Diagonal up right)의 경우 수평 라인 단위, 일부 대각선 모드(Diagonal down left)의 경우 수직 라인 단위의 화소가 보정될 수 있으나 이에 한정되지 않는다.
상기 설명 외에도 추가적인 부/복호화 요소에 따라 적응적인 설정이 가능할 수 있고, 상기 설명에서는 대각선 모드(Diagonal up right)에 대한 제한적인 경우를 중심으로 설명하였으나 상기 예에서만 한정 적용되는 것은 아니며 동일하거나 비슷한 설정이 다른 모드에서도 적용될 수 있다. 또한, 하나의 부/복호화 요소가 아닌 복수의 요소의 조합에 따라 상기 예와 같은 경우가 가능할 수 있다.
대각선 모드(Diagonal down left)의 경우 대각선 모드(Diagonal up right)의 예측 방법에 방향만 달리 적용하여 유도할 수 있기 때문에 상세한 설명은 생략한다.
다음은 대각선 모드(Diagonal up left)에 대한 경우를 살펴본다.
예를 들어, 좌 블록과 좌상 블록, 그리고 상 블록을 참조 화소(제 1 참조 화소 또는 주 참조 화소. 도 13에서 Ref_L, Ref_TL, Ref_T)로 사용하는 경우에는 해당 블록의 최인접한 화소(도 13에서 1300, 1310, 1320)를 사용(예를 들어, 외삽 등)하여 대각선 방향으로 예측 블록을 생성할 수 있다.
또는, 대각선 방향에 일치하는 위치에 존재하는 현재 블록과 인접한 참조 화소(제 2 참조 화소 또는 보조 참조 화소. 도 13에서 Ref_L, Ref_TL, Ref_T. 위치는 주 참조 화소와 동일)를 활용하여 예측 블록을 생성(또는 보정)할 수 있다. 상세하게는, 해당 블록의 최인접 화소 외의 화소(도 13에서 1300의 왼쪽에 위치한 화소, 1320 왼쪽, 위쪽, 왼쪽 위에 위치한 화소, 1310의 위쪽에 위치한 화소 등)를 사용하여 예측값을 보정할 수 있으며, 상기 보조 참조 화소와 주 참조 화소의 가중치 평균(예를 들어, 주 참조 화소와 보조 참조 화소에 적용되는 가중치의 비의 예로 7:1 ~ 4:4 등을 가질 수 있음. 만약 보조 참조 화소가 2개 이상인 경우 가중치의 예로 14:1:1, 12:2:2, 10:3:3, 8:4:4 등과 같이 보조 참조 화소에 동일한 가중치를 갖던지 또는 12:3:1, 10:4:2, 8:6:2 등과 같이 보조 참조 화소 간의 다른 가중치를 가질 수 있음. 이때, 다르게 적용되는 가중치는 주 참조 화소에 가까운지 여부에 따라 결정될 수 있음) 또는 선형 외삽 등을 통해 상기 보정 과정에 반영될 수 있다.
상기 보정되는 화소가 일부 화소에 한정 적용되는 경우라면 예측 모드에 사용되는 참조 화소에 인접한 수평 또는 수직 라인 단위로 결정될 수 있다. 이때, 수평과 수직 라인은 동시에 고려될 수 있으며 겹침을 허용할 수 있다. 예를 들어, a 내지 d에 해당하는 화소와 a, e, i, m에 해당하는 화소(a가 겹침)가 보정 대상에 포함될 수 있다. 추가적으로, e 내지 h에 해당하는 화소와 b, f, j, n에 해당하는 화소(a, b, e, f가 겹침)가 보정 대상에 포함될 수 있다.
다음은 비방향성 모드(DC)에 대한 경우를 살펴본다.
예를 들어, 좌, 상, 좌상, 우상, 좌하 블록 중 적어도 하나의 블록을 참조 화소로 사용하는 경우에는 해당 블록의 최인접한 화소(도 13에서 1300, 1310의 화소라 본 예에서 가정)를 사용(예를 들어, 평균 등)하여 예측 블록을 생성할 수 있다.
또는, 상기 참조 화소의 인접 화소(제 2 참조 화소 또는 보조 참조 화소. 도 13에서 Ref_L, Ref_T. 본 예에서 위치는 주 참조 화소와 동일하거나 주 참조 화소를 포함하여 그 다음 인접한 곳에 위치하는 화소도 포함. Diagonal up left의 경우와 비슷)를 활용하여 예측 블록을 생성(또는 보정)할 수 있다. 상세하게는, 해당 블록의 주 참조 화소와 동일하거나 비슷한 위치 화소를 사용하여 예측값을 보정할 수 있으며, 상기 보조 참조 화소와 주 참조 화소의 가중치 평균(예를 들어, 주 참조 화소와 보조 참조 화소에 적용되는 가중치의 비의 예로 15:1 ~ 8:8 등을 가질 수 있음. 만약 보조 참조 화소가 2개 이상인 경우 가중치의 예로 14:1:1, 12:2:2, 10:3:3, 8:4:4 등과 같이 보조 참조 화소에 동일한 가중치를 갖던지 또는 12:3:1, 10:4:2, 8:6:2 등과 같이 보조 참조 화소 간의 다른 가중치를 가질 수 있음) 등을 통해 상기 보정 과정에 반영될 수 있다.
이때, 상기 필터링은 하나의 영상에서 하나의 설정만을 갖던지 또는 다양한 부/복호화 요소에 따라 적응적으로 결정될 수 있다.
적응적으로 결정되는 경우에 대한 예를 들면, 블록의 크기에 따라 필터가 결정될 수 있다. 현재 블록의 좌상단, 상단, 좌단에 위치하는 화소(본 예에서 좌상단에 위치하는 화소는 해당 화소의 왼쪽과 위쪽의 화소, 상단에 위치하는 화소는 해당 화소의 위쪽의 화소, 좌단에 위치하는 화소는 해당 화소의 왼쪽의 화소에 필터링을 적용한다는 가정)의 경우 16 x 16 이하의 블록에서는 일부 필터링 설정(본 예에서 8:4:4, 12:4의 가중치 비로 필터링 적용)을 따를 수 있고, 16 x 16 초과의 블록에서는 일부 필터링 설정(본 예에서 10:3:3, 14:2의 가중치 비로 필터링 적용)을 따를 수 있다.
또는, 블록의 형태에 따라 필터가 결정될 수 있다. 예를 들어, 16 x 8 블록의 경우 현재 블록의 상단에 위치하는 화소는 일부 필터링 설정(본 예에서 해당 화소의 왼쪽 위, 위쪽, 오른쪽 위의 화소에 필터링을 적용한다는 가정. 즉, 필터링이 적용되는 화소까지 변경되는 예로 볼 수 있음. 10:2:2:2의 가중치 비로 필터링 적용)을 따를 수 있고, 현재 블록의 좌단에 위치하는 화소는 일부 필터링 설정(본 예에서 해당 화소의 왼쪽 화소에 필터링을 적용한다는 가정. 12:4의 가중치 비로 필터링 적용)을 따를 수 있다. 이는 가로로 길게 늘어진 블록 형태에서 블록 위의 복수의 화소에 의존적일 수 있다는 가정 하에 적용되는 예일 수 있다. 또한, 위의 반대의 설정이 가능할 수 있다.
상기 보정되는 화소가 일부 화소에 한정되는 경우라면 예측 모드에 사용되는 참조 화소에 인접한 수평 또는 수직 라인 단위로 결정될 수 있다. 이때, 수평과 수직 라인은 동시에 고려될 수 있으며 겹침을 허용할 수 있다. 예를 들어, a 내지 d에 해당하는 화소와 a, e, i, m에 해당하는 화소(a가 겹침)가 보정 대상에 포함될 수 있다. 추가적으로, e 내지 h에 해당하는 화소와 b, f, j, n에 해당하는 화소(a, b, e, f가 겹침)가 보정 대상에 포함될 수 있다.
상기 설명 외에도 추가적인 부/복호화 요소에 따라 적응적인 설정이 가능할 수 있고, 상기 설명에서는 비방향성 모드에 대한 제한적인 경우를 중심으로 설명하였으나 상기 예에서만 한정 적용되는 것은 아니며 동일하거나 비슷한 설정이 다른 모드에서도 적용될 수 있다. 또한, 하나의 부/복호화 요소가 아닌 복수의 요소의 조합에 따라 상기 예와 같은 경우가 가능할 수 있다.
다음은 컬러 복사 모드에 대한 경우를 살펴본다.
컬러 복사 모드의 경우 기존 예측 모드의 예측 방법과 다른 방법으로 예측 블록이 생성되지만 동일하거나 비슷하게 참조 화소를 사용하여 예측 블록을 생성(또는 보정)할 수 있다. 예측 블록을 획득하는 내용은 전술한 예와 후술한 예를 통해 유도 가능하므로 생략한다.
예를 들어, 현재 블록과 다른 컬러 공간에 대응되는 블록을 참조 화소(제 1 참조 화소 또는 주 참조 화소)로 사용(예를 들어, 복사 등)하여 예측 블록을 생성할 수 있다.
또는, 현재 블록과 인접한 블록의 참조 화소(제 2 참조 화소 또는 보조 참조 화소. 도 13에서 Ref_L, Ref_T, Ref_TL, Ref_TR, Ref_BL)를 활용하여 예측 블록을 생성(또는 보정)할 수 있다. 상세하게는, 해당 블록의 최인접 화소(본 예에서 도 13의 1300, 1310이라 가정)를 사용하여 예측값을 보정할 수 있으며, 상기 보조 참조 화소와 주 참조 화소의 가중치 평균(예를 들어, 주 참조 화소와 보조 참조 화소에 적용되는 가중치의 비의 예로 15:1 ~ 8:8 등을 가질 수 있음. 만약 보조 참조 화소가 2개 이상인 경우 가중치의 예로 14:1:1, 12:2:2, 10:3:3, 8:4:4 등과 같이 보조 참조 화소에 동일한 가중치를 갖던지 또는 12:3:1, 10:4:2, 8:6:2 등과 같이 보조 참조 화소 간의 다른 가중치를 가질 수 있음) 등을 통해 상기 보정 과정에 반영할 수 있다.
또는, 다른 컬러 공간에서 획득되는 블록과 인접한 블록의 화소(제 2 참조 화소 또는 보조 참조 화소. 도 13의 그림을 다른 컬러 공간에서 현재 블록과 대응되는 블록이라 가정할 경우 Ref_L, Ref_T, Ref_TL, Ref_TB, Ref_BL과 도 13에 도시되지 않은 Ref_R, Ref_BR, Ref_B)를 활용하여 예측 블록을 생성(또는 보정)할 수 있다. 보정 대상 화소와 그 주위 화소(예를 들어, 다른 컬러 공간의 제 1 참조 화소 또는 제 1 참조 화소와 제 2 참조 화소. 즉, 블록 내부에서 가중치 평균 등이 적용되는 경우에는 보정 대상이 되는 제 1 참조 화소와 필터링이 적용되는 제 1 참조 화소가 필요하며, 블록 경계에서 보정 대상이 되는 제 1 참조 화소와 필터링이 적용되는 제 1 참조 화소와 제 2 참조 화소가 필요함)에 필터링을 적용하여 상기 보정 과정에 반영할 수 있다.
상기 두 경우가 혼합되어 발생하는 경우로 현재 블록의 인접한 블록의 화소뿐만 아니라 다른 컬러 공간에서 획득한 예측 블록 내의 화소를 사용하여 보정할 수 있으며, 보정 대상 화소와 그 주위 화소(예를 들어, 보정 대상 화소의 인접한 이웃 블록의 화소와 보정 대상 화소의 인접한 현재 블록 내 화소)에 필터링(예를 들어, 보정 대상 화소 위치에 M x N 마스크를 씌워서 필터링을 적용하는 예. 이때, 상기 마스크에는 해당 화소와 상, 하, 좌, 우, 좌상, 우상, 좌하, 우하 등의 전체 또는 일부 화소에 필터링)을 적용하여 상기 보정 과정에 반영할 수 있다.
본 예는 다른 컬러 공간에서 현재 블록의 예측값을 획득하여 그 이후에 필터링을 적용하는 경우에 대한 설명으로 볼 수 있으나, 예측값을 획득하기 전에 해당 컬러 공간에서 이미 필터링을 적용한 것을 현재 블록의 예측값으로 획득할 수도 있다. 이 경우는 상기의 예와 순서의 차이만 있을 뿐 필터링을 적용하는 대상은 동일하다는 점을 유의해야한다.
이때, 상기 필터링은 하나의 영상에서 하나의 설정만을 갖던지 또는 다양한 부/복호화 요소에 따라 적응적으로 결정될 수 있다.
적응적으로 결정되는 경우에 대한 예를 들면, 예측 모드에 따라 필터링에 대한 설정이 결정될 수 있다. 상세하게는, 컬러 복사 모드 중 세부 컬러 복사 모드에 따라 적응적인 필터링 설정을 가질 수 있다. 예를 들어, 일부 컬러 복사 모드(본 예에서 현재 블록의 인접한 영역과 다른 컬러 공간에 대응되는 블록의 인접한 영역에서 하나의 상관성 정보 세트<a와 b>를 획득하는 경우)에서는 일부 필터링 설정<1>을 따를 수 있고, 일부 컬러 복사 모드(본 예에서 위의 모드와 비교하여 복수의 상관성 정보 세트를 획득하는 경우. 즉, a1과 b1, a2와 b2)에서는 일부 필터링 설정<2>을 따를 수 있다.
상기 필터링 설정에서는 필터링의 적용 유무가 결정될 수 있다. 예를 들어, 필터링 설정에 따라 필터링을 적용할 수 있거나<1> 필터링을 적용하지 않을 수 있다<2>. 또는, A 필터를 사용할 수 있거나<1> B 필터를 사용할 수 있다<2>. 또는, 현재 블록의 좌측과 상측의 모든 화소에 필터링을 적용할 수 있거나<1> 좌측과 상측의 일부 화소에 필터링을 적용할 수 있다.
상기 보정되는 화소가 일부 화소에 한정되는 경우라면 예측 모드에 사용되는 참조 화소(본 예에서는 보조 참조 화소. 앞의 예에서와 다른 부분)에 인접한 수평 또는 수직 라인 단위로 결정될 수 있다. 이때, 수평과 수직 라인은 동시에 고려될 수 있으며 겹침을 허용할 수 있다.
예를 들어, a 내지 d에 해당하는 화소와 a, e, i, m에 해당하는 화소(a가 겸침)가 보정 대상에 포함될 수 있다. 추가적으로, e 내지 h에 해당하는 화소와 b, f, j, n에 해당하는 화소(a, b, e, f가 겸침)가 보정 대상에 포함될 수 있다.
정리하면, 예측 블록의 생성에 사용되는 주 참조 화소는 다른 컬러 공간으로부터 획득되며, 예측 블록의 보정에 사용되는 보조 참조 화소는 현재 컬러 공간의 현재 블록에 인접한 블록으로부터 획득될 수 있다. 또한, 다른 컬러 공간의 대응되는 블록에 인접한 블록으로부터 획득될 수 있다. 또한, 현재 블록의 예측 블록의 일부 화소로부터 획득될 수 있다. 즉, 예측 블록 내 일부 화소가 예측 블록 내 일부 화소의 보정에 사용될 수 있다.
상기 설명 외에도 추가적인 부/복호화 요소에 따라 적응적인 설정이 가능할 수 있고, 상기 설명에서는 비방향성 모드에 대한 제한적인 경우를 중심으로 설명하였으나 상기 예에서만 한정 적용되는 것은 아니며 동일하거나 비슷한 설정이 다른 모드에서도 적용될 수 있다. 또한, 하나의 부/복호화 요소가 아닌 복수의 요소의 조합에 따라 상기 예와 같은 경우가 가능할 수 있다.
본 예는 현재 블록의 예측 블록을 컬러 공간 간의 상관성을 이용하여 획득하는 예지만, 그 상관성을 획득하기 위해 사용되는 블록은 현재 블록의 인접한 영역과 다른 컬러 공간의 대응되는 블록의 인접한 영역으로부터 획득되었기 때문에 블록 경계를 필터링을 적용하는 경우의 일 예로 이해할 수 있다.
복수의 참조 화소를 사용하여 예측 블록을 생성하는 것은 부/복호화 설정에 따라 다양한 경우의 수가 가능할 수 있다. 상세하게는, 부/복호화 설정에 따라 제 2 참조 화소를 사용하여 예측 블록을 생성 또는 보정하는 것의 지원 여부가 결정될 수 있다.
일 예로, 예측 과정에 추가적인 화소 이용 여부는 묵시적 또는 명시적으로 결정될 수 있다. 이때, 명시적인 경우에는 비디오, 시퀀스, 픽쳐, 슬라이스, 타일, 블록 등의 단위로 상기 정보가 포함될 수 있다.
일 예로, 예측 과정에 추가적인 화소 이용 여부는 모든 예측 모드에 적용할 수 있거나 또는 일부 예측 모드에 적용할 수 있다. 이때, 일부 예측 모드는 수평, 수직, 일부 대각선 모드, 비방향성 모드, 컬러 복사 모드 등 중 적어도 하나일 수 있다.
일 예로, 예측 과정에 추가적인 화소 이용 여부는 모든 블록에 적용할 수 있거나 또는 일부 블록에 적용할 수 있다. 이때, 일부 블록은 블록의 크기, 형태 등에 따라 정의될 수 있으며, 해당 블록은 M x N(예를 들어, M과 N은 8, 16, 32, 64 등의 길이를 가짐. 정사각일 경우에는 8 x 8, 16 x 16, 32 x 32, 64 x 64 등. 직사각일 경우 2:1 직사각, 4:1 직사각 등의 형태)일 수 있다.
또한, 예측 과정에 추가적인 화소 이용 여부는 일부 부/복호화 설정에 따라 적용 여부가 결정될 수 있다. 이때, 부/복호화 설정은 constrained_intra_pred_flag이 될 수 있고, 상기 플래그에 따라 추가적인 참조 화소가 예측 과정에 제한적으로 사용될 수 있다.
예를 들어, 제 2 참조 화소를 포함하는 영역이 상기 플래그에 의해 사용이 제한되는 경우(즉, 위의 플래그에 의해 참조 화소 패딩 등의 과정을 통해 채워진 영역이라고 가정)에는 제 2 참조 화소를 예측 과정에 사용하는 것을 제한할 수 있다. 또는, 상기 플래그에 관계없이 제 2 참조 화소를 예측 과정에 사용할 수 있다.
상기 예를 통해 설명한 경우 외에도 하나 또는 복수의 요소 등의 결합과 같은 다양한 적용 및 변형이 가능할 수 있다. 또한, 상기 예는 컬러 복사 모드에 관한 일부 경우로 설명되지만, 컬러 복사 모드 외에도 복수의 참조 화소를 사용하여 예측 블록을 생성 또는 보정하는 예측 모드에도 동일하거나 변경 적용될 수 있는 예일 수 있다.
상기 예를 통해 각 예측 모드에서 복수의 참조 화소를 사용하여 예측 블록을 생성 또는 보정하는 하나의 설정을 갖는 것에 대한 경우를 설명하였지만, 각 예측 모드에 복수 개의 설정이 가능할 수 있다. 즉, 필터링에 대한 설정의 후보군이 복수 개로 구성되어 있어 이에 대한 선택 정보가 발생할 수도 있다.
정리하면, 필터링 수행 여부에 대한 정보가 명시적 또는 묵시적으로 처리될 수 있으며, 필터링을 수행하는 경우 그에 대한 필터링 선택 정보에 대한 정보가 명시적 또는 묵시적으로 처리될 수 있다. 이에 대한 정보를 명시적으로 처리하는 경우에는 비디오, 시퀀스, 픽쳐, 슬라이스, 타일, 블록 등의 단위에 포함될 수 있다.
상기 생성된 예측 블록을 보정할 수 있으며, 이하 예측 블록의 보정 과정에 대해서 살펴 보기로 한다.
상기 보정 과정은, 소정의 참조 화소와 가중치를 기반으로 수행될 수 있다. 이떄, 참조 화소와 가중치는, 보정 대상인 현재 블록 내 화소(이하, 현재 화소라 함)의 위치에 종속적으로 결정될 수 있다. 상기 참조 화소와 가중치는, 현재 블록의 화면내 예측 모드에 종속적으로 결정될 수도 있다.
현재 블록의 화면내 예측 모드가 비방향성 모드인 경우, 현재 화소의 참조 화소(refL, refT)는, 현재 블록에 인접한 제1 화소 라인에 속하며, 현재 화소와 동일한 수평/수직 라인에 위치할 수 있다. 가중치는, x축 방향의 제1 가중치(wL), y축 방향의 제2 가중치(wT) 또는 대각 방향의 제3 가중치(wTL) 중 적어도 하나를 포함할 수 있다. 제1 가중치는 좌측 참조 화소에 적용되는 가중치를, 제2 가중치는 상단 참조 화소에 적용되는 가중치를, 제3 가중치는 좌상단 참조 화소에 적용되는 가중치를 각각 의미할 수 있다. 여기서, 제1 및 제2 가중치는, 현재 화소의 위치 정보와 소정의 스케일링 팩터(nScale)에 기초하여 결정될 수 있다. 스케일링 팩터는 현재 블록의 너비(W)와 높이(H)에 기초하여 결정될 수 있다. 예를 들어, 현재 화소(predSample[x][y])의 제1 가중치(wL[x])는 (32 >> ((x << 1) >> nScale))으로 결정되고, 제2 가중치(wT[x])는 (32 >> ((y << 1) >> nScale))으로 결정될 수 있다. 제3 가중치(wTL[x][y])는 ((wL[x] >> 4) + (wT[y] >> 4))으로 결정될 수 있다. 다만, 화면내 예측 모드가 Planar 모드인 경우, 제3 가중치는 0으로 결정될 수 있다. 상기 스케일링 팩터는, ((Log2(nTbW) + Log2(nTbH) - 2) >> 2)으로 설정될 수 있다.
현재 블록의 화면내 예측 모드가 수직/수평 모드인 경우, 현재 화소의 참조 화소(refL, refT)는, 현재 블록에 인접한 제1 화소 라인에 속하며, 현재 화소와 동일한 수평/수직 라인에 위치할 수 있다. 수직 모드인 경우, 현재 화소(predSample[x][y])의 제1 가중치(wL[x])는 (32 >> ((x << 1) >> nScale))으로 결정되고, 제2 가중치(wT[y])는 0으로 결정되며, 제3 가중치(wTL[x][y])는 제1 가중치와 동일하게 결정될 수 있다. 한편, 수평 모드인 경우, 현재 화소(predSample[x][y])의 제1 가중치(wL[x])는 0으로 결정되고, 제2 가중치(wT[y])는 (32 >> ((y << 1) >> nScale))으로 결정되며, 제3 가중치(wTL[x][y])는 제2 가중치와 동일하게 결정될 수 있다.
현재 블록의 화면내 예측 모드가 대각 모드인 경우, 현재 화소의 참조 화소(refL, refT)는, 현재 블록에 인접한 제1 화소 라인에 속하며, 현재 화소와 동일한 대각 라인에 위치할 수 있다. 여기서, 대각 라인은 현재 블록의 화면내 예측 모드와 동일한 각도를 가진다. 상기 대각 라인은 좌하단에서 우상단 방향의 대각 라인을 의미할 수도 있고, 좌상단에서 우하단 방향의 대각 라인을 의미할 수도 있다. 이때, 현재 화소(predSample[x][y])의 제1 가중치(wL[x])는 (32 >> ((x << 1) >> nScale))으로 결정되고, 제2 가중치(wT[y])는 (32 >> ((y << 1) >> nScale))으로 결정되며, 제3 가중치(wTL[x][y])는 0으로 결정될 수 있다.
현재 블록의 화면내 예측 모드가 10번 모드와 같거나 작은 경우, 현재 화소의 참조 화소(refL, refT)는, 현재 블록에 인접한 제1 화소 라인에 속하며, 현재 화소와 동일한 대각 라인에 위치할 수 있다. 여기서, 대각 라인은 현재 블록의 화면내 예측 모드와 동일한 각도를 가진다. 이때, 참조 화소는 현재 블록의 좌측 또는 상단 참조 화소 중 어느 하나만이 이용되도록 제한될 수 있다. 현재 화소(predSample[x][y])의 제1 가중치(wL[x])는 0으로 결정되고, 제2 가중치(wT[y])는 (32 >> ((y << 1) >> nScale))으로 결정되며, 제3 가중치(wTL[x][y])는 0으로 결정될 수 있다.
현재 블록의 화면내 예측 모드가 58번 모드와 같거나 큰 경우, 현재 화소의 참조 화소(refL, refT)는, 현재 블록에 인접한 제1 화소 라인에 속하며, 현재 화소와 동일한 대각 라인에 위치할 수 있다. 여기서, 대각 라인은 현재 블록의 화면내 예측 모드와 동일한 각도를 가진다. 이때, 참조 화소는 현재 블록의 좌측 또는 상단 참조 화소 중 어느 하나만이 이용되도록 제한될 수 있다. 현재 화소(predSample[x][y])의 제1 가중치(wL[x])는 (32 >> ((x << 1) >> nScale))으로 결정되고, 제2 가중치(wT[y])는 0으로 결정되며, 제3 가중치(wTL[x][y])는 0으로 결정될 수 있다.
상기 결정된 참조 화소(refL[x][y], refT[x][y]) 및 가중치(wL[x], wT[y], wTL[x][y])에 기반하여, 현재 화소(predSamples[x][y])는 다음 수학식 1과 같이 보정될 수 있다.
[수학식 1]
predSamples[ x ][ y ] = clip1Cmp( ( refL[ x ][ y ] * wL[ x ] + refT[ x ][ y ] * wT[ y ] - p[ -1 ][ -1 ] * wTL[ x ][ y ] + ( 64 - wL[ x ] - wT[ y ] + wTL[ x ][ y ] ) * predSamples[ x ][ y ] + 32 ) >> 6 )
다만, 전술한 보정 과정은, 현재 블록이 서브 블록 단위의 화면내 예측을 수행하지 않는 경우에 한하여 수행될 수 있다. 상기 보정 과정은, 현재 블록의 참조 화소가 제1 화소 라인인 경우에 한하여 수행될 수 있다. 상기 보정 과정은, 현재 블록의 화면내 예측 모드가 특정 모드에 해당하는 경우에 한하여 수행될 수 있다. 여기서, 특정 모드는, 비방향성 모드, 수직 모드, 수평 모드, 소정의 제1 문턱모드보다 작은 모드, 소정의 제2 문턱모드보다 큰 모드 중 적어도 하나를 포함할 수 있다. 상기 제1 문턱모드는, 8, 9, 10, 11 또는 12일 수 있고, 상기 제2 문턱모드는 56, 57, 58, 59 또는 60일 수 있다.
예측 모드 결정부에서는 복수의 예측 모드 후보군 중 최적의 모드를 선정하기 위한 과정이 수행된다. 일반적으로 블록의 왜곡{예를 들어, 현재 블록과 복원 블록의 Distortion. SAD(Sum of Absolute Difference), SSD(Sum of Square Difference 등}과 해당 모드에 따른 발생 비트량이 고려되는 율-왜곡(Rate-Distortion) 기법을 이용하여 부호화 비용 측면에서 최적인 모드를 결정할 수 있다. 상기 과정을 통해 결정되는 예측 모드에 기반하여 생성되는 예측 블록을 감산부와 가산부로 송신할 수 있다.
예측 모드 부호화부에서는 예측 모드 결정부를 통해 선정된 예측 모드를 부호화할 수 있다. 예측 모드 후보군에서 상기 예측 모드에 대응하는 인덱스 정보를 부호화할 수 있거나 또는 상기 예측 모드를 예측하여 그에 관한 정보를 부호화할 수 있다. 즉, 전자의 경우는 예측 모드를 예측 없이 그대로 부호화하는 방법을, 후자의 경우는 예측 모드의 예측을 수행하여 모드 예측 정보와 그에 기반하여 획득되는 정보를 부호화하는 방법을 의미한다. 또한, 전자의 경우는 색차 성분, 후자의 경우 휘도 성분에 적용될 수 있는 예이며, 이에 한정되지 않고 그 외의 경우 또한 가능할 수 있다.
예측 모드를 예측하여 부호화하는 경우에 예측 모드의 예측값(또는 예측 정보)을 MPM(Most Probable Mode)으로 지칭할 수 있다. 이때, 기 설정된 예측 모드(예를 들어, DC, Planar, 수직, 수평, 대각선 모드 등) 또는 공간적으로 인접한 블록(예를 들어, 좌, 상, 좌상, 우상, 좌하 블록 등)의 예측 모드 등을 MPM으로 구성할 수 있다. 본 예에서 대각선 모드는 Diagonal up right, Diagonal down right, Diagonal down left를 의미하고, 도 9의 2번, 34번, 66번 모드에 대응되는 모드일 수 있다.
또한, MPM 후보군에 기 포함된 모드로부터 유도되는 모드를 MPM 후보군으로 구성할 수 있다. 예를 들어, MPM 후보군에 포함된 모드 중 방향성 모드의 경우, 모드 간격이 a의 차이를 갖는 모드(예를 들어, a는 1, -1, 2, -2 등과 같은 0이 아닌 정수. 도 9에서 10번 모드가 기 포함된 모드인 경우 9번, 11번, 8번, 12번 모드 등이 유도되는 모드에 해당)를 새롭게(또는 추가적으로) MPM 후보군에 포함할 수 있다.
상기 예는 MPM 후보군이 복수 개의 모드로 구성되는 경우에 해당할 수 있으며, MPM 후보군(또는 MPM 후보군 개수)은 부/복호화 설정(예를 들어, 예측 모드 후보군, 영상 타입, 블록 크기, 블록 형태 등)에 따라 정해지며 적어도 하나의 모드를 포함하여 구성될 수 있다.
MPM 후보군 구성을 위한 예측 모드의 우선 순위가 존재할 수 있다. 상기 우선 순위에 따라 MPM 후보군에 포함되는 예측 모드 순서가 정해질 수 있으며, 상기 우선 순위에 따라 MPM 후보군의 개수만큼 채워지면 MPM 후보군 구성을 완료할 수 있다. 이때, 공간적으로 인접한 블록의 예측 모드, 기 설정된 예측 모드, MPM 후보군에 먼저 포함된 예측 모드로부터 유도되는 모드 순서로 우선 순위가 정해질 수 있으나, 그 외의 변형 또한 가능하다.
MPM을 사용하여 현재 블록의 예측 모드 부호화를 수행하는 경우 예측 모드가 MPM과 일치하는지 여부에 대한 정보(예를 들어, most_probable_mode_flag)를 생성할 수 있다.
MPM과 일치하는 경우(예를 들어, most_probable_mode_flag = 1)에는 MPM의 구성에 따라 MPM 인덱스 정보(예를 들어, mpm_idx)를 추가로 생성할 수 있다. 예를 들어, MPM이 하나의 예측 모드로 구성되는 경우에는 추가적인 MPM 인덱스 정보는 생성하지 않으며, 복수의 예측 모드로 구성되는 경우에는 MPM 후보군에서 현재 블록의 예측 모드에 대응하는 인덱스 정보를 생성할 수 있다.
MPM과 일치하지 않는 경우(예를 들어, most_probable_mode_flag = 0)에는 예측 모드 후보군에서 MPM 후보군을 제외한 나머지 예측 모드 후보군(또는 non-MPM 후보군)에서 현재 블록의 예측 모드에 대응하는 non-MPM 인덱스 정보(예를 들어, non_mpm_idx)를 생성할 수 있으며, 이는 non-MPM이 하나의 그룹으로 구성되는 경우에 해당하는 예일 수 있다.
non-MPM 후보군이 복수의 그룹으로 구성되는 경우에 현재 블록의 예측 모드가 어떤 그룹에 속하는지에 대한 정보를 생성할 수 있다. 예를 들어, non-MPM은 A와 B 그룹(A는 m개, B는 n개, non-MPM은 m+n개의 예측 모드로 구성되며 m보다 n이 크다고 가정. A의 모드는 방향성 모드로 균등한 간격을 갖고 B의 모드는 방향성 모드로 균등한 간격을 갖지 않는다고 가정)으로 구성되며 현재 블록의 예측 모드가 A 그룹의 예측 모드와 일치하는 경우(예를 들어, non_mpm_A_flag = 1)에는 A 그룹 후보군에서 현재 블록의 예측 모드에 대응하는 인덱스 정보를 생성할 수 있으며, 일치하지 않는 경우(예를 들어, non_mpm_A_flag = 0)에는 나머지 예측 모드 후보군(또는 B 그룹 후보군)에서 현재 블록의 예측 모드에 대응하는 인덱스 정보를 생성할 수 있다. 상기 예와 같이 non-MPM은 적어도 하나의 예측 모드 후보군(또는 그룹)으로 구성이 될 수 있으며, 예측 모드 후보군에 따라 non-MPM 구성이 정해질 수 있다. 예를 들어, 예측 모드 후보군이 35개 이하일 경우에는 1개, 그 이외의 경우에는 2개 이상일 수 있다.
상기 예와 같이 non-MPM이 복수의 그룹으로 구성되는 경우는 예측 모드의 개수가 많고 예측 모드가 MPM으로 예측되지 않을 경우에 모드 비트량을 줄이고자 하는 목적으로 지원될 수 있다.
MPM을 사용하여 현재 블록의 예측 모드 부호화(또는 예측 모드 복호화)를 수행하는 경우 각 예측 모드 후보군(예를 들어, MPM 후보군, non-MPM 후보군 등)에 적용되는 이진화 테이블은 개별적으로 생성될 수 있으며, 각 후보군에 따라 적용되는 이진화 방법 또한 개별적으로 적용될 수 있다.
예측 모드 부호화부를 통해 생성되는 예측 관련 정보는 부호화부로 전송되어 비트스트림에 수록될 수 있다.
도 14는 본 발명의 일 실시예에 따른 트리 기반의 블록 분할의 예이다.
도 14의 i는 쿼드 트리 분할, ii는 바이너리 트리 분할 중 가로 분할, iii는 바이너리 트리 분할 중 세로 분할을 나타낸다. 그림에서 A 내지 C는 최초 블록(분할 전 블록. 예를 들어, Coding Tree Unit이라 가정)을 의미하고, 위의 문자 다음의 숫자는 분할이 수행될 때 각 파티션의 번호를 의미한다. 쿼드 트리의 경우 좌상, 우상, 좌하, 우하 블록에 각각 0 내지 3의 숫자가 붙으며, 바이너리 트리의 경우 좌/상, 우/하 블록에 각각 0과 1의 숫자가 붙는 것을 의미한다.
도 14를 참조하면, 분할 과정을 통해 획득된 문자와 번호를 통해 해당 블록을 획득하기 위해 수행된 분할 상태 또는 정보를 확인할 수 있다.
예를 들어, 도 14의 i에서 블록 A00은 초기 블록 A를 쿼드 트리 분할을 수행하고, 그 결과 획득된 4개의 블록 중 좌상 블록(A에 0이 더해짐)인 A0를 쿼드 트리 분할을 수행하여 획득된 4개 블록 중 좌상 블록(A0에 0이 더해짐)일 수 있다.
또는, 도 14의 ii에 블록 B10은 초기 블록 B를 바이너리 트리 분할 중 가로 분할을 수행하고, 그 결과 획득된 2개의 블록 중 하 블록(B에 1이 더해짐)인 B1을 바이너리 트리 분할 중 가로 분할을 수행하여 획득된 2개의 블록 중 상 블록(B1에 0이 더해짐)일 수 있다.
위와 같은 분할을 통해 각 블록의 분할 상태, 정보(예를 들어, 지원되는 분할 설정<트리 방식의 종류 등>, 최소 크기와 최대 크기 등의 블록의 지원 범위<상세하게는, 분할 방법에 따른 지원 범위>, 분할 허용 깊이<상세하게는, 분할 방법에 따른 지원 범위>, 분할 플래그<상세하게는, 분할 방법에 따른 분할 플래그>, 영상 타입<I/P/B>, 부호화 모드<Intra/Inter> 등 블록의 분할 상태, 정보를 확인하기 위해 필요한 부/복호화 설정 및 정보 등)를 알 수 있으며, 현재 블록(자식 블록)을 획득하기 위한 분할 전 단계에는 어떤 블록(부모 블록)에 속해 있었는지를 확인할 수 있다. 예를 들어, 도 14의 i에서 블록 A31의 경우 이웃하는 블록은 A30, A12, A13가 존재할 수 있는데, A30은 A31과 바로 전 단계의 분할 단계에 동일한 블록에 속했다는 것을 확인(A3)할 수 있다. A12와 A13의 경우 A31과는 바로 전 단계(A3)의 분할 단계에서는 다른 블록(A1)에 속했으며, 그 이전 단계에서야 동일한 블록(A)에 속했다는 것을 확인할 수 있다.
상기 예는 하나의 분할 동작(쿼드 트리에 의한 4분할 또는 바이너리 트리에 의한 가로/세로 분할)에 대한 경우이므로, 복수의 트리 기반의 분할을 수행하게 되는 경우에서의 설명을 위해 후술하는 예에서 설명을 이어간다.
도 15는 본 발명의 일 실시예에 따른 복수의 트리 기반의 블록 분할의 예이다.
도 15를 참조하면, 분할 과정을 통해 획득된 문자와 번호를 통해 해당 블록을 획득하기 위해 수행된 분할 상태 또는 정보를 확인할 수 있다. 본 예에서는 각 문자는 초기 블록을 의미하는 것이 아니라 분할에 대한 정보를 숫자와 함께 나타낸다.
예를 들어, 블록 A1A1B0의 경우 초기 블록에서 쿼드 트리 분할이 수행되었을 때 우상 블록(A1)이 획득되었고, 블록 A1에서 쿼드 트리 분할이 수행되었을 때 우상 블록(A1에 A1)이 획득되었고, 블록 A1A1에서 바이너리 트리 분할 중 가로 분할이 수행되었을 때 상 블록(A1A1에 B0)을 의미한다.
또는, 블록 A3B1C1의 경우 초기 블록에서 쿼드 트리 분할이 수행되었을 때 우하 블록(A3)이 획득되었고, 블록 A3에서 바이너리 트리 분할 중 가로 분할이 수행되었을 때 하 블록(A3에 B1)이 획득되었고, 블록 A3B1에서 바이너리 트리 분할 중 세로 분할이 수행되었을 때 우 블록(A3B1에 C1)을 의미한다.
본 예에서도 상기 분할 정보를 통해 각 블록의 분할 단계에 따라 이웃 블록과는 어떤 분할 단계에 동일한 블록에 속했는지 등 현재 블록과 이웃 블록 간의 관계 정보를 확인할 수 있다.
도 14와 15는 각 블록이 분할 정보를 확인하기 위한 일부의 예로, 분할 정보를 확인하기 위한 다양한 정보 및 정보들의 조합(예를 들어, 분할 플래그, 깊이 정보, 깊이 정보 최대값, 블록의 범위 등)으로 각 블록의 분할 정보를 확인할 수 있고, 그로 인해 블록 간의 관계를 확인할 수 있다.
도 16은 블록 분할에 대한 다양한 경우를 나타내는 예시도이다.
일반적으로 영상 내에는 다양한 텍스쳐 정보가 존재하기 때문에 하나의 부/복호화 방법을 사용하여 부/복호화하기가 어렵다. 예를 들어, 일부 영역에는 특정 방향의 에지 성분이 강하게 존재하는 영역이 존재할 수 있고, 일부 영역에는 에지 성분이 존재하지 않는 복잡한 영역이 존재할 수도 있다. 이를 효율적으로 부호화하기 위해서 블록 분할이 중요한 역할을 수행한다.
블록 분할은 영상의 특성 등에 따른 영역 구획을 효율적으로 하기 위한 목적으로 수행될 수 있다. 그러나 한 종류의 분할 방식(예를 들어, 쿼드 트리 분할)만 사용할 경우 영상의 특성을 제대로 반영하여 분할을 수행하기 어려울 수 있다.
도 16을 참조하면, 다양한 텍스쳐가 담긴 영상을 쿼드 트리 분할과 바이너리 트리 분할에 따라 분할한 것을 확인할 수 있다. a 내지 e는 쿼드 트리 분할만 지원되는 경우일 수 있고, f 내지 j는 바이너리 트리 분할만 지원되는 경우일 수 있다.
본 예에서 쿼드 트리 분할에 따른 분할 파티션을 UL, UR, DL, DR이라고 지칭하며, 이를 기준으로 바이너리 트리 분할까지 설명한다.
도 16의 a는 쿼드 트리 분할이 최적의 성능을 발휘하는 텍스쳐 형태일 수 있으며, 쿼드 트리의 한 번의 분할(Div_HV)을 통해 4 분할을 하여 각 블록 단위로 부/복호화를 수행할 수 있다. 한편, 도 16의 f와 같이 바이너리 트리 분할이 적용될 경우 쿼드 트리에 비해 3번의 분할(2회의 Div_V, 1회의 Div_H)이 필요할 수 있다.
도 16의 b는 텍스쳐가 블록의 상과 하 영역에 구분되는 경우로, 도 16의 b에서 쿼트 트리 분할이 적용될 경우 한 번의 분할(Div_HV)이 필요하며, 도 16의 g에서 바이너리 트리 분할 역시 한 번의 분할(Div_H)이 수행될 수 있다. 쿼드 트리 분할 플래그가 1비트이고 바이너리 트리 분할이 2 비트 이상 든다고 가정할 경우, 플래그 비트 측면에서는 쿼드 트리가 효율적이라 생각할 수 있으나, 부/복호화 정보{예를 들어, 텍스쳐 정보를 표현하기 위한 정보(텍스쳐를 표현하기 위한 정보<잔차 신호, 부호화 계수, 부호화 계수의 유무를 나타내는 정보 등>), 예측 정보<예를 들어, 화면내 예측 관련 정보, 화면간 예측 관련 정보>, 변환 정보<예를 들어, 변환의 종류 정보, 변환의 분할 정보 등> 등}가 각 블록 단위로 발생하는데 본 경우에서는 텍스쳐 정보가 비슷한 영역이 분할되어 해당 정보가 중복적으로 발생하는 예일 수 있기 때문에 바이너리 트리 분할에 비해 효율적이지 못할 수 있다.
도 16의 다른 경우도 텍스쳐의 종류에 따라 어떤 트리가 더 효율적인지 결정될 수가 있다. 상기 예를 통해 영상 특성에 따른 효율적인 영역 구획을 위해서는 가변적인 블록 크기 지원과 다양한 분할 방식이 지원되는 것이 중요한 것을 확인할 수 있다.
쿼드 트리 분할과 바이너리 트리 분할에 대한 상세한 분석을 하자.
도 16에서 b를 참조하면, 오른쪽 아래 블록(현재 블록)과 인접한 블록(본 예에서 좌, 상 블록)을 살펴보자. 좌 블록의 경우 현재 블록과 비슷한 특성을 갖는 블록이고, 상 블록의 경우 현재 블록과 다른 특성을 갖는 블록인 경우인 것을 확인할 수 있다. 일부 블록(본 예에서 좌 블록)과는 비슷한 특성을 갖고 있지만 쿼드 트리 분할의 특성 상 분할이 된 경우일 수 있다.
이때, 현재 블록은 좌 블록과 비슷한 특성으로 인해 비슷한 부/복호화 정보가 발생할 수 있다. 이를 효율적으로 줄이기 위한 화면내 예측 모드(예를 들어, most probable mode. 즉, 현재 블록의 예측 모드의 비트량을 줄이기 위한 목적으로 이웃한 블록으로부터 현재 블록의 모드를 예측한 정보), 움직임 정보 예측 모드(예를 들어, 스킵 모드, 병합 모드, 경쟁 모드와 같이 모드 비트를 줄이기 위한 정보) 등이 발생할 때 좌 블록의 정보가 참조하기에 효율적이다. 즉, 현재 블록의 부호화 정보(예를 들어, 화면내 예측 정보, 화면간 예측 정보, 필터 정보, 계수 정보 등)를 좌 또는 상 블록 중 하나에서 참조할 경우 비교적 정확한 정보(본 예에서 좌 블록)를 참조할 수 있다.
도 16에서 e를 참조하면, 가장 오른쪽 아래의 조그만 블록(현재 블록. 두 번 분할된 블록)을 가정하자. 현재 블록도 위와 비슷하게 좌 또는 상 블록 중 상 블록에서 비슷한 특성을 갖고 있어서 해당 블록(본 예에서 상 블록)으로부터 부호화 정보를 참조하면 부호화 성능을 향상시킬 수 있다.
이에 반해 도 16에서 j를 참조하면, 가장 오른쪽 블록(현재 블록. 두 번 분할된 블록)과 인접한 좌 블록을 살펴보자. 본 예에서는 상 블록이 존재하지 않으므로 좌 블록만 살펴볼 경우 현재 블록은 좌 블록과 다른 특성을 갖는 블록임을 확인할 수 있다. 쿼드 트리 분할의 경우 이웃 블록 중 일부와 비슷할 수도 있는 반면, 바이너리 트리 분할의 경우 이웃 블록과 다른 특성을 갖는 확률이 높음을 확인할 수 있다.
상세하게는, 어떤 블록(x)과 그 이웃 블록(y)의 각각 분할 전 블록이 동일한 블록일 경우 쿼드 트리 분할은 어떤 블록(x)은 분할 전 블록이 동일한 이웃 블록(y)과 비슷한 특성을 가질 수도 있고 다른 특성을 가질 수도 있는 반면, 바이너리 트리는 어떤 블록(x)과 분할 전 블록이 동일한 이웃 블록(y)과 다른 특성을 갖는 것이 대부분일 수 있다. 즉, 비슷한 특성인 경우라고 하면 굳이 분할이 되지 않고 분할 전으로 블록이 최종 결정이 되었을텐데, 다른 특성이기 때문에 분할되었을 가능성이 클 수 있다.
위의 예에 추가적으로 도 16의 i에서 오른쪽 아래 블록(x)과 왼쪽 아래 블록(y)이 그런 관계일 수 있다. 즉, 윗 블록은 영상 특성이 비슷하기 때문에 분할이 되지 않은 채로 블록이 구획이 되었고, 아래 블록은 영상 특성이 다르기 때문에 분할이 되어 왼쪽 아래와 오른쪽 아래 블록으로 분할되어 구획된 예일 수 있다.
정리하면, 쿼드 트리 분할의 경우 현재 블록에 인접한 이웃 블록 중에 부모 블록이 현재 블록과 동일한 이웃 블록이 존재하는 경우 가로/세로로 1/2씩 무조건 분할되는 쿼드 트리 특성으로 인해 현재 블록과 비슷한 특성일 수도 있고 다른 특성일 수도 있다. 바이너리 트리 분할의 경우 현재 블록에 인접한 이웃 블록 중에 부모 블록이 현재 블록과 동일한 이웃 블록이 존재하는 경우 영상 특성에 따라 가로 또는 세로로 분할할 수 있기 때문에 굳이 분할되었다는 것은 다른 특성이기 때문에 분할되었다는 것을 의미할 수 있다.
(쿼드 트리 분할)
현재 블록과 분할 전 블록이 동일한 이웃 블록(본 예에서 좌, 상 이라고 가정. 이에 한정되지 않음)은 현재 블록과 비슷하거나 다른 특성일 수 있다.
또한, 현재 블록과 분할 전 블록이 동일하지 않은 이웃 블록은 현재 블록과 비슷하거나 다른 특성일 수 있다.
(바이너리 트리 분할)
현재 블록과 분할 전 블록이 동일한 이웃 블록(본 예에서 좌 또는 상. 바이너리이기 때문에 최대 후보수가 하나임)은 다른 특성일 수 있다.
또한, 현재 블록과 분할 전 블록이 동일하지 않은 이웃 블록은 현재 블록과 비슷하거나 다른 특성일 수 있다.
위의 가정이 본 발명의 주요 가정임을 전제하고 후술한다. 위의 내용에 따르면 이웃 블록의 특성이 현재 블록과 비슷하거나 다른 특성일 수 있는 경우(1)와 다른 특성일 수 있는 경우(2)로 구분될 수 있다.
다시 도 15를 참조한다.
일 예(현재 블록이 A1A2)로, 인접한 블록 중 A0 블록(좌 블록)은 A1A2 블록의 분할 전 블록(A1)과 A0 블록의 분할 전 블록(초기 블록)이 다르므로 일반적인 경우로 분류(즉, 현재 블록과 비슷한 특성일지 다른 특성일지 모르는 경우)할 수 있다.
인접한 A1A0 블록(상 블록)은 A1A2 블록의 분할 전 블록(A1)과 A1A0 블록의 분할 전 블록(A1)이 동일하므로 분할 방식을 확인한다. 이때, 쿼드 트리 분할(A)이므로 일반적인 경우로 분류한다.
일 예(현재 블록이 A2B0B1)로, 인접한 블록 중 A2B0B0 블록(상 블록)은 A2B0B1 블록의 분할 전 블록(A2B0)과 A2B0B1 블록의 분할 전 블록(A2B0)이 동일하므로 분할 방식을 확인한다. 이때, 바이너리 트리 분할(B)이므로 예외적인 경우로 분류한다.
일 예(현재 블록이 A3B1C0)로, 인접한 블록 중 A3B0 블록(본 예에서 우상 블록)은 A3B1C0 블록의 분할 전 블록(A3B1)과 A3B0 블록의 분할 전 블록(A3)이 다르므로 일반적인 경우로 분류할 수 있다.
위의 예와 같이 이웃 블록은 일반적인 경우와 예외적인 경우로 분류할 수 있다. 일반적인 경우는 해당 이웃 블록의 부호화 정보는 현재 블록의 부호화 정보로 사용하는 것이 좋을지 안 좋을지 모르는 상태이고, 예외적인 경우는 해당 이웃 블록의 부호화 정보는 현재 블록의 부호화 정보로 사용하는 것이 좋지 않을 것이라고 강하게 판단되는 상태이다.
위의 분류를 기준으로 현재 블록의 예측 정보를 이웃 블록으로부터 획득하는 방법에 적용할 수 있다.
위의 과정을 정리하면,
현재 블록과 인접한 블록의 분할 전 블록이 동일한지 확인한다. (A)
A가 동일한 결과로 나온다면, 현재 블록(동일한 경우라면 현재 블록뿐만 아니라 인접한 블록도 동일한 분할 방식을 사용하여 구획된 블록이므로 현재 블록만 확인)의 분할 방식을 확인한다. (B)
A가 동일하지 않는 결과로 나온다면, 종료. (End)
B가 쿼드 트리 분할로 나온다면 인접한 블록에 일반 상태로 마크 후 종료. (End)
B가 바이너리 트리 분할로 나온다면 인접한 블록에 예외 상태로 마크 후 종료. (End)
상기 예는 본 발명의 화면내 예측 모드 예측 후보군 설정(most probable mode 관련 등)에 적용되어 구성될 수 있다. 일반적인 예측 후보군 설정(예를 들어, 후보군 구성 우선 순위 등)과 예외적인 예측 후보군 설정이 지원될 수 있으며, 위의 인접한 블록의 상태에 따라 해당 블록에서 유도되는 후보군은 우선 순위를 뒤로 미루거나 제외할 수 있다.
이때, 상기 설정이 적용되는 인접한 블록은 공간적인 경우(동일 공간)에 한할 수 있거나 컬러 복사 모드와 같이 동일 영상의 다른 컬러 공간으로부터 유도되는 경우에도 적용 가능할 수 있다. 즉, 컬러 복사 모드를 통해 유도되는 블록의 분할 상태 등을 고려하여 위의 같은 설정을 둘 수 있다.
상기 예뿐만 아니라 후술하는 예는 블록 간의 관계(현재 블록과 다른 블록의 상대적인 관계를 상기 예에서는 블록 분할 정보 등으로 파악)에 따라 부/복호화 설정(예를 들어, 예측 후보군 설정, 참조 화소 설정 등)이 적응적으로 결정되는 일 예일 수 있다.
본 예(휘도 성분)는 부호화/복호화 장치에 기-정의된 화면내 예측 모드가 35개인 경우 인접한 블록(본 예에서 좌, 상)으로부터 총 3개의 후보가 MPM 후보군으로 구성되는 가정 하에 설명한다.
좌 블록(L0)과 상 블록(T0)에서 각각 1개의 후보를 추가하여 총 2개의 후보를 구성할 수 있다. 각 블록에서 후보군을 구성하지 못하는 경우에는 DC, Planar, 수직, 수평, 대각선 모드 등의 후보로 대체하여 채울 수 있다. 위의 과정을 통해 2개의 후보를 채운 경우에 남은 1개의 후보는 다양한 경우의 수를 고려하여 채울 수 있다.
예를 들어, 각 블록에서 채운 후보가 동일한 경우에는 후보군에 포함된 모드와 중복되지 않게 위의 모드의 인접한 모드(예를 들어, 동일한 모드가 k_mode일 경우 k_mode-2, k_mode-2, k_mode+1, k_mode+2 등)으로 대체할 수 있다. 또는, 각 블록에서 채운 후보가 동일하거나 동일하지 않는 경우에는 Planar, DC, 수직, 수평, 대각선 모드 등을 추가하여 후보군을 구성할 수 있다.
위의 과정을 통해 화면내 예측 모드 후보군(일반적인 경우)이 구성될 수 있다. 이렇게 만들어진 후보군은 일반적인 경우에 해당하는 예이며, 인접한 블록에 따라 적응적인 화면내 예측 모드 후보군(예외적인 경우)이 구성될 수 있다.
예를 들어, 인접한 블록이 예외 상태로 마크된 경우라면, 해당 블록으로부터 유도되는 후보군은 제외할 수 있다. 좌 블록이 예외 상태로 마크된 경우라면 상 블록과 기 설정된 예측 모드(예를 들어, DC, Planar, 수직, 수평, 대각선, 상 블록으로부터 유도되는 모드 등)로 후보군이 구성될 수 있다. 전술한 예는 MPM 후보군이 3개 이상의 MPM 후보로 구성되는 경우에도 동일/유사하게 적용될 수 있다.
본 예(색차 성분)은 화면내 예측 모드{본 예에서 DC, Planar, 수직, 수평, 컬러 모드}가 5개이며, 적응적으로 우선 순위가 결정되어 정렬된 예측 모드를 후보군으로 구성하여 부/복호화하는 경우(즉, MPM을 사용하지 않고 바로 부/복호화)를 가정하여 설명한다.
우선, 컬러 모드에 가장 높은 우선 순위(본 예에서 0번 인덱스. '0' 1비트 할당)를 부여하며, 다른 모드(본 예에서 Planar, 수직, 수평, DC)에는 낮은 우선 순위(본 예에서 각각 1 내지 4번 인덱스. '100', '101', '110', '111' 씩 3비트 할당)를 부여한다.
컬러 모드가 후보군의 다른 예측 모드(DC, Planar, 수직, 수평) 중 하나와 일치하면 일치하는 예측 모드에 부여된 우선 순위(본 예에서 1번 내지 4번 인덱스)에는 기 설정된 예측 모드(예를 들어, 대각선 모드 등)를 할당할 수 있고, 일치하지 않으면 바로 후보군 구성이 마무리된다.
위의 과정을 통해 화면내 예측 모드에 대한 후보군이 구성될 수 있다. 이렇게 만들어진 예는 일반적인 경우에 해당하는 예이며, 컬러 모드를 획득한 블록에 따라 적응적인 후보군이 구성될 수 있다.
본 예에서 컬러 모드를 획득한 다른 컬러 공간 중 현재 블록과 대응되는 블록이 하나의 블록(즉, 분할되지 않은 상태)으로 구성되어 있으면 일반적인 경우라고 할 수 있고, 복수의 블록(즉, 2개 이상으로 분할된 상태)으로 구성되어 있으면 예외적인 경우라고 가정한다. 전술한 것과 같이 현재 블록과 인접한 블록의 부모 블록이 동일한지 여부, 분할 방식 등에 따라 분류하는 예와 다르지만, 다른 컬러 공간의 대응되는 블록이 복수 개로 구성되어 있으면, 현재 블록의 특성과 다른 특성일 가능성이 더 높다는 가정 하에 설정되는 예일 수 있다. 즉, 블록 간의 관계에 따라 부/복호화 설정이 적응적으로 결정되는 일 예로 이해할 수 있다.
상기 가정에 따라 예를 들면, 대응되는 블록이 예외 상태로 마크된 경우라면, 해당 블록으로부터 유도되는 예측 모드는 우선 순위를 뒤로 미룰 수 있다. 이 경우 높은 우선 순위에는 다른 예측 모드(Planar, DC, 수직, 수평) 중 하나를 할당하고, 상기 우선 순위에 포함되지 않은 다른 예측 모드와 컬러 모드에는 낮은 우선 순위를 할당할 수 있다.
상기 예는 설명의 편의를 위해 일부 가정 하에 설명하지만, 이에 한정되지 않으며 본 발명의 전술한 다양한 실시예에 동일하거나 비슷한 적용이 가능할 수 있다.
정리하면, 인접한 블록 중 예외 상태로 마크된 블록이 존재할 경우 후보군 A 를 사용할 수 있고, 예외 상태로 마크된 블록이 존재할 경우 후보군 B를 사용할 수 있다. 위의 구분에서는 2 가지의 경우로 구분되나 예외 상태의 존재 여부 및 블록 위치 등에 따라 블록 단위의 화면내 예측 후보군 구성이 적응적일 수 있다는 것으로 이해할 수 있다.
또한, 전술한 예는 분할 방식 중 트리 기반의 분할을 가정하여 설명하였으나, 이에 한정되지 않는다. 상세하게는, 전술한 예는 적어도 하나의 트리 기반의 분할 방식을 사용하여 획득된 블록이 부호화 블록으로 설정되고, 해당 블록으로 예측 블록, 변환 블록 등으로 분할되지 않고 바로 예측, 변환 등이 수행되는 가정 하에 설명된 예일 수 있다.
분할 설정에 대한 다른 예로, 부호화 블록은 트리 기반의 분할으로 획득되고, 획득된 부호화 블록을 기반으로 적어도 하나의 예측 블록이 획득되는 경우에도 적용 가능한 예일 수 있다.
예를 들어, 부호화 블록(2N x 2N)은 트리 기반의 분할(본 예에서 쿼드 트리)로 획득이 가능하며, 예측 블록은 타입 기반의 분할(본 예에서 지원 가능한 후보 형태는 2N x 2N, 2N x N, N x 2N, N x N이라 가정)로 획득된다고 가정한다. 이때, 하나의 부호화 블록(본 예에서 이 블록을 부모 블록이라 가정) 내에 복수의 예측 블록(본 예에서 이 블록들을 자식 블록이라 가정)으로 분할된 경우 예측 블록 간에도 전술한 예외 상태 등의 설정이 가능할 수 있다.
도 16의 g가 부호화 블록(굵은 실선) 내 두 개의 예측 블록(얇은 실선으로 구분)이 존재할 경우, 아래 블록은 윗 블록과 다른 특성을 갖는다고 보고 윗 블록의 부호화 정보는 참조 하지 않거나 우선 순위를 뒤로 늦출 수 있다.
도 17은 본 발명의 일 실시예에 따른 블록 분할 예를 나타낸다. 상세하게는, 기본 부호화 블록(최대 부호화 블록. 8N x 8N)은 쿼드 트리 기반의 분할을 통해 부호화 블록(빗금친 블록. 2N x 2N)을 획득하는 예를 나타내며, 획득된 부호화 블록은 타입 기반의 분할을 통해 적어도 하나의 예측 블록(2N x 2N, 2N x N, N x 2N, N x N)으로 분할되는 예를 나타낸다.
이때, 직사각 형태의 블록이 획득되는 경우(2N x N, N x 2N)에 대한 화면내 예측 모드 후보군 설정에 대해 후술한다.
도 18은 예측 정보가 발생하는 블록(본 예에서 예측 블록. 2N x N)의 화면내 예측 모드 후보군 설정에 대한 다양한 예를 나타낸다.
본 예(휘도 성분)는 화면내 예측 모드가 67개인 경우 인접한 블록(본 예에서 좌, 상, 좌상, 우상, 좌하)으로부터 총 6개의 후보가 MPM 후보군에 구성되는 가정 하에 설명한다.
도 13을 참조하면, L3 - T3 - B0 - R0 - TL의 순서로 4개의 후보를 구성할 수 있고, 기 설정된 모드(예를 들어, Planar, DC)로 2개의 후보를 구성할 수 있다. 위의 구성에도 최대 개수(본 예에서 6개)를 채우지 못한 경우에는 이미 후보군에 포함된 예측 모드로부터 유도되는 예측 모드(예를 들어, k_mode일 경우 k_mode-2, k_mode-2, k_mode+1, k_mode+2 등), 기 설정된 모드(예를 들어, 수직, 수평, 대각선 등) 등을 포함하여 구성할 수 있다.
본 예에서 후보군 우선 순위는 공간적으로 인접한 블록의 경우 현재 블록의 좌 - 상 - 좌하 - 우상 - 좌상 블록의 순서(상세하게는, 좌 블록의 아래쪽, 상 블록의 오른쪽 서브 블록)라고 가정하고, 기 설정된 모드의 경우 Planar - DC - 수직 - 수평 - 대각선 모드의 순서라고 가정한다.
도 18의 a를 참조하면, 상기 예의 후보군 설정과 동일하게 현재 블록(2N x N. PU0)은 l1 - t3 - l2 - tr - tl의 순서로 후보군을 구성할 수 있다(다른 내용은 중복적이므로 생략). 본 예에서는 현재 블록의 인접한 블록은 이미 부/복호화가 완료된 블록(부호화 블록. 즉, 다른 부호화 블록 내 예측 블록)일 수 있다.
위와 다르게 현재 블록의 위치가 PU1에 해당하는 경우에는 적어도 하나의 화면내 예측 모드 후보군 설정이 가능할 수 있다. 일반적으로 현재 블록에 인접한 블록일수록 현재 블록의 특성과 비슷할 가능성이 높기 때문에 후보군 구성을 해당 블록으로부터 하는 것이 유리할 수 있다(1). 한편, 부/복호화의 병렬 처리 등을 목적으로 후보군 구성을 하는 것이 필요할 수 있다(2).
현재 블록이 PU1인 경우 (1)과 같은 후보군 구성 설정에서 도 18의 b와 같이 l3 - c7 - bl - k - l1의 순서로 후보군(k는 c7 또는 tr 등에서 유도 가능)을 구성할 수 있고, (2)와 같은 후보군 구성 설정에서 도 18의 c와 같이 l3 - bl - k - l1의 순서로 후보군(k는 tr 등에서 유도 가능)을 구성할 수 있다. 상기 두 예의 차이는 상 블록의 화면내 예측 모드의 후보군 포함 여부이다. 즉, 전자의 경우 화면내 예측 모드 부/복호화의 효율성을 높이기 위한 목적으로 상 블록의 화면내 예측 모드를 후보군에 포함시킨 것이고, 후자의 경우 병렬 처리 등을 위한 목적으로 아직 부/복호화가 완료되지 않았을지 모르는 상태라 참조할 수 없는 상 블록의 화면내 예측 모드를 후보군에 제외시킨 것이다.
도 19는 예측 정보가 발생하는 블록(본 예에서 예측 블록. N x 2N)의 화면내 예측 모드 후보군 설정에 대한 다양한 예를 나타낸다.
본 예(휘도 성분)는 화면내 예측 모드가 67개인 경우 인접한 블록(본 예에서 좌, 상, 좌상, 우상, 좌하)으로부터 총 6개의 후보가 MPM 후보군에 구성되는 가정 하에 설명한다.
도 13을 참조하면, L3 - L2 - L1 - L0의 순서(상 블록)로 1개, T3 - T2 - T1 - T0의 순서(상 블록)로 1개, B0 - R0 - TL의 순서(좌상, 우상, 좌하 블록)로 2개의 후보를 구성할 수 있고, 기 설정된 모드(예를 들어, Planar, DC)로 2개의 후보를 구성할 수 있다. 위의 구성에도 최대 개수를 채우지 못한 경우에는 이미 후보군에 포함된 예측 모드로부터 유도되는 예측 모드, 기 설정된 모드 등을 포함하여 구성할 수 있다. 이때, 후보군 구성의 우선 순위는 좌 - 상 - Planar - DC - 좌하 - 우상 - 좌상 블록의 순서일 수 있다.
도 19의 a를 참조하면, 상기 예의 후보군 설정과 동일하게 현재 블록(N x 2N. PU0)은 l3 - l2 - l1 - l0의 순서로 1개, t1 - t0의 순서로 1개, bl - t2 - tl의 순서로 2개의 후보를 구성할 수 있다. 본 예에서는 현재 블록의 인접한 블록은 이미 부/복호화가 완료된 블록(부호화 블록. 즉, 다른 부호화 블록 내 예측 블록)일 수 있다.
위와 다르게 현재 블록의 위치가 PU1에 해당하는 경우에는 적어도 하나의 화면내 예측 모드 후보군 설정이 가능할 수 있다. 전술한 예에서의 (1)번, (2)번 구성이 가능할 수 있다.
현재 블록이 PU1인 경우 (1)과 같은 후보군 구성 설정에서 도 19의 b와 같이 c13 - c9 - c5 - c1의 순서로 후보 1개, t3 - t2의 순서로 1개, k - tr - t1의 순서로 후보 2개의 후보군(k는 bl 또는 c13 등에서 유도 가능)을 구성할 수 있고, (2)와 같은 후보군 구성 설정에서 도 19의 c와 같이 t3 - t2의 순서로 후보 1개, k - tr - t1의 순서로 후보 2개의 후보군(k는 bl 등에서 유도 가능)을 구성할 수 있다. 상기 두 예의 차이는 상 블록의 화면내 예측 모드의 후보군 포함 여부이다. 즉, 전자의 경우 화면내 예측 모드 부/복호화의 효율성을 높이기 위한 목적으로 좌 블록의 화면내 예측 모드를 후보군에 포함시킨 것이고, 후자의 경우 병렬 처리 등을 위한 목적으로 아직 부/복호화가 완료되지 않았을지 모르는 상태라 참조할 수 없는 좌 블록의 화면내 예측 모드를 후보군에 제외시킨 것이다.
이와 같이 후보군 구성에 대한 설정에 따라 후보군 구성이 결정될 수 있다. 본 예에서는 후보군 구성 설정(본 예에서는 병렬 처리를 위한 후보군 구성 설정)이 묵시적으로 결정될 수 있거나 명시적으로 관련 정보가 비디오, 시퀀스, 픽쳐, 슬라이스, 타일 등의 단위에 수록될 수 있다.
위의 내용을 정리하면 다음과 같다. 묵시적으로 결정되거나 명시적으로 관련 정보가 생성되는 경우를 가정한다.
부/복호화 초기 단계에서 화면내 예측 모드 후보군 구성 설정 확인. (A)
A에 대한 확인 결과가 동일한 부호화 블록 내 이전 예측 블록을 참조 가능한 설정이라면, 해당 블록의 화면내 예측 모드를 후보군에 포함하여 구성. (End)
A에 대한 확인 결과가 동일한 부호화 블록 내 이전 예측 블록을 참조 금지한 설정이라면, 해당 블록의 화면내 예측 모드를 후보군에 제외하여 구성. (End)
상기 예는 설명의 편의를 위해 일부 가정 하에 설명하지만, 이에 한정되지 않으며 본 발명의 전술한 다양한 실시예에 동일하거나 비슷한 적용이 가능할 수 있다.
도 20은 본 발명의 일 실시예에 따른 블록 분할 예를 나타낸다. 상세하게는, 기본 부호화 블록(최대 부호화 블록)은 바이너리 트리 기반의 분할(또는 복수의 트리 기반의 분할)을 통해 부호화 블록(빗금친 블록. A x B)을 획득하는 예를 나타내며, 획득된 부호화 블록은 그대로 예측 블록으로 설정되는 예를 나타낸다.
이때, 직사각 형태의 블록이 획득되는 경우(A x B. A ≠B)에 대한 움직임 정보 예측 후보군 설정에 대해 후술한다.
도 21은 예측 정보가 발생하는 블록(본 예에서 부호화 블록. 2N x N)의 화면내 예측 모드 후보군 설정에 대한 다양한 예를 나타낸다.
본 예(휘도 성분)는 화면내 예측 모드가 67개인 경우 인접한 블록(본 예에서 좌, 상, 좌상, 우상, 좌하)으로부터 총 6개의 후보가 MPM 후보군에 구성되며, non-MPM 후보군이 복수의 그룹(본 예에서 A와 B. A가 non-MPM 후보 내에서 현재 블록의 예측 모드를 예측할 확률이 더 높은 모드가 속한다고 가정)으로 구성될 때 A 그룹에 총 16개의 후보가 구성되며, B 그룹에 총 45개의 후보가 구성되는 가정 하에 설명한다.
이때, A 그룹에는 MPM 후보군에 포함되지 않은 모드 중 일정 규칙(예를 들어, 방향성 모드 중 간격이 균등한 모드들로 구성.)에 따라 분류된 후보를 포함하거나 또는 MPM 후보군 우선 순위에 따라 최종 MPM 후보군에 포함되지 못한 후보 등을 포함할 수 있다. B 그룹에는 MPM 후보군과 non-MPM 후보군 중 A 그룹에 포함되지 못한 후보로 구성될 수 있다.
도 21의 a를 참조하면, 현재 블록(CU0 또는 PU0. 2N x N 크기이며, 가로/세로 2:1이라 가정)은 l1 - t3 - planar - DC - l2 - tr - tl - l1* - t3* - l2* - tr* - tl* - 수직 - 수평 - 대각선 모드의 순서로 6개의 후보를 후보군을 구성할 수 있다. 상기 예에서 *는 각 블록의 예측 모드로부터 유도되는 모드(예를 들어, +1, -1 등 가산한 모드)를 의미한다.
한편, 도 21의 b를 참조하면, 현재 블록(CU1 또는 PU1. 2N x N 크기)은 l3 - c7 - planar - DC - bl - k - l1 - l3* - c7* - bl* - k* - l1* - 수직 - 수평 - 대각선 모드의 순서로 6개의 후보를 후보군으로 구성할 수 있다.
본 예는 도 18의 (2)와 같은 설정이 적용되는 경우 도 21의 b는 l3 - planar - DC - bl - k - l1 - c7 - l3* - bl* - k* - l1* - 수직 - 수평 - 대각선 - c7* 와 같이 상 블록의 예측 모드는 후보군에 제외되거나 우선 순위가 뒤로 밀려서 A 그룹에 포함되는 경우가 가능할 수 있다.
그러나 도 18의 경우와 다른 점은 직사각 형태의 블록이라 하더라도 부호화 단위로 구획되었으며, 추가 분할 없이 바로 예측 단위로 설정된 경우에 해당하기 때문이다. 그렇기 때문에 도 18과 같은 후보군 구성 설정은 본 예에서는 적용되지 않는 경우{(2)와 같은 설정}일 수 있다.
단, 도 21에서 k와 같은 경우는 부/복호화가 완료되지 않은 위치이다 보니 부/복호화가 완료된 인접한 블록으로부터 유도 가능할 수 있다.
도 22는 예측 정보가 발생하는 블록(본 예에서 부호화 블록. N x 2N)의 화면내 예측 모드 후보군 설정에 대한 다양한 예를 나타낸다.
본 예(색차 성분)는 화면내 예측 모드(본 예에서 DC, Planar, 수직, 수평, 컬러 복사 모드)가 5개인 경우 적응적으로 우선 순위가 결정되어 정렬된 예측 모드를 후보군으로 구성하여 부/복호화하는 경우를 가정하여 설명한다.
이때, 우선 순위는 인접한 블록(본 예에서 좌, 상, 좌상, 우상, 좌하)으로부터 결정되는 가정 하에 설명한다.
도 13을 참조하면, 좌(L3), 상(T3), 좌상(TL), 우상(R0), 좌하(B0) 블록에서 제 1 순위 후보를 결정할 수 있다. 이때, 상기 블록의 예측 모드 중 최빈값을 갖는 모드가 1 순위 후보로 결정될 수 있다. 만약 복수의 모드가 최빈값을 갖는 경우에는 기 설정된 우선 순위(예를 들어, 컬러 복사 모드 - Planar - 수직 - 수평 - DC)를 부여한다.
본 예는 현재 블록의 예측 모드라 예상되는 모드를 이웃 블록으로부터 획득하여 그에 따라 우선 순위(즉, 할당되는 비트량이 결정. 예를 들어, 1 순위에는 '0', 2 내지 4 순위에는 '100', '101', '110', '111')가 결정된다는 점에서 예측 모드의 예측을 수행한다는 점에서 MPM 후보 설정(본 예에서 첫째 비트는 0 또는 1로 결정. 1이면 추가 2비트가 요구됨. 부/복호화 설정에 따라 첫째 비트는 바이패스 또는 레귤러 코딩을 수행하고, 나머지 비트는 바이패스 코딩을 수행할 수 있음)과 비슷하다고 볼 수도 있다.
도 22의 a를 참조하면, 현재 블록(CU0 또는 PU0. N x 2N 크기이며, 가로/세로 1:2이라 가정)은 l3, t1, tl, t2, bl 블록에서 1 순위 후보를 결정할 수 있다.
한편, 도 22의 b를 참조하면, 현재 블록(CU1 또는 PU1. N x 2N 크기)은 c13, t3, t1, tr, k 블록에서 1 순위 후보를 결정할 수 있다.
본 예에서 도 19의 (2)와 같은 설정이 적용되는 경우 현재 블록(CU1)은 t3, t1, tr, k 블록에서 1 순위 후보를 결정할 수 있다. 또한, 컬러 복사 모드를 획득한 다른 컬러 공간 중 현재 블록과 대응되는 블록이 하나의 블록으로 구성되어 있지 않으면 상기 기 설정된 우선 순위에서 컬러 복사 모드의 우선 순위를 뒤로 미루어 Planar - 수직 - 수평 - DC - 컬러 복사 모드 등으로 변경할 수 있다. 전술한 것과 같이 현재 블록과 인접한 블록의 부모 블록이 동일한지 여부, 분할 방식 등에 따라 분류하는 예와 다르지만, 다른 컬러 공간의 대응되는 블록이 복수 개로 구성되어 있으면, 현재 블록의 특성과 다른 특성일 가능성이 더 높다는 가정 하에 설정되는 예일 수 있다. 즉, 블록 간의 관계에 따라 부/복호화 설정이 적응적으로 결정되는 일 예로 이해할 수 있다.
그러나 도 19의 경우와 다른 점은 직사각 형태의 블록이라 하더라도 부호화 단위로 구획되었으며, 추가 분할 없이 바로 예측 단위로 설정된 경우에 해당하기 때문이다. 그렇기 때문에 도 19과 같은 후보군 구성 설정은 본 예에서는 적용되지 않는 경우일 수 있다.
단, 도 22에서 k와 같은 경우는 부/복호화가 완료되지 않은 위치이다 보니 부/복호화가 완료된 인접한 블록으로부터 유도 가능할 수 있다.
상기 예는 설명의 편의를 위해 일부 가정 하에 설명하지만, 이에 한정되지 않으며 본 발명의 전술한 다양한 실시예에 동일하거나 비슷한 적용이 가능할 수 있다.
도 21과 도 22의 실시예에서는 바이너리 트리 분할로 구획가능한 M x N (M ≠N) 블록이 연속해서 발생하는 경우를 가정하였다.
위의 발생이 가능한 경우 중 도 14 내지 도 16에서 설명한 것과 같은 경우(현재 블록과 이웃 블록 간의 관계 등 확인하여 후보군 설정하는 예)가 발생할 수 있다. 즉, 도 21과 도 22에서 CU0와 CU1의 분할 전 이웃 블록이 서로 동일하며, 바이너리 트리 분할의 가로 분할 또는 세로 분할을 통해 CU0와 CU1이 획득될 수 있다.
또한, 도 18과 도 19의 실시예에서는 부호화 블록 구획 후에 부호화 블록 내 복수의 직사각 형태의 예측 블록이 발생하는 경우를 가정하였다.
위의 경우에서도 도 14 내지 도 16에서 설명한 것과 같은 경우가 발생할 수 있다. 그러면 도 18과 도 19에서의 예와 충돌하는 경우가 발생할 수 있다. 예를 들어, 도 18에서 PU1의 경우 PU0의 정보를 사용할지 말지 여부가 결정될 수 있는데, 도 14 내지 도 16에서는 PU1의 특성과 PU0의 특성이 다르기 때문에 PU0의 정보를 사용하지 말자는 경우이기 때문이다.
위의 사항에 대해 부/복호화 초기 단계의 설정에 따라 충돌없이 후보군을 구성할 수 있다. 그 밖의 다양한 부/복호화 설정에 따라 움직임 정보 예측 후보군의 설정이 가능할 수 있다.
전술한 예를 통해 예측 모드 후보군 설정에 관한 경우를 살펴보았다. 또한, 예외 상태로 마크되는 이웃 블록으로부터 현재 블록의 예측에 사용되는 참조 화소의 사용을 제한하는 설정이 가능할 수 있다.
예를 들어, 본 발명의 일 실시예에 따른 제 1 참조 화소와 제 2 참조 화소로 구분하여 예측 블록을 생성할 때, 제 2 참조 화소가 상기 예외 상태로 마크되는 블록에 포함되는 경우 제 2 참조 화소를 사용하여 예측 블록을 생성하는 것을 제한할 수 있다. 즉, 제 1 참조 화소만을 사용하여 예측 블록을 생성할 수 있다.
정리하면, 상기 예는 제 2 참조 화소의 사용에 관한 부/복호화 설정 중 하나의 요소로 고려될 수 있다.
본 발명의 화면내 예측 모드 후보군 설정에 관한 다양한 경우를 살펴본다.
본 예에서는 화면내 예측 모드가 67개인 경우를 가정하며, 방향성 모드 65개와 Planar, DC의 비방향성 모드 2개로 구성되지만, 이에 한정되지 않고 다른 화면내 예측 모드 설정이 가능할 수 있다. 본 예에서 6개의 후보가 MPM 후보군에 포함된다고 가정한다. 다만, 이에 한정되지 아니하며 4개, 5개, 또는 7개의 후보가 MPM 후보군을 구성할 수도 있다. 또한, 후보군에는 중복되는 모드는 존재하지 않는 설정을 갖는다. 또한, 우선 순위는 MPM 후보군에 포함 여부를 결정하는 순서를 의미하지만, MPM 후보군에 속하는 각 후보에 대한 이진화, 엔트로피 부/복호화 설정 등을 결정하는 요소로 고려될 수 있다. 후술하는 예는 휘도 성분을 중심으로 설명하지만, 색차 성분에도 동일하거나 비슷하거나 변경되는 적용이 가능할 수 있다.
본 발명의 화면내 예측 모드 후보군(예를 들어, MPM 후보군 등)에 포함되는 모드는 공간적으로 인접한 블록의 예측 모드, 기 설정된 예측 모드, 그리고 후보군에 기 포함된 예측 모드로부터 유도되는 예측 모드 등으로 구성할 수 있다. 이때, 후보군 구성을 위한 규칙(예를 들어, 우선 순위 등)은 부/복호화 설정에 따라 정해질 수 있다.
후술하는 예는 고정적인 후보군 구성에 대한 경우를 설명한다.
일 예(1)로, 화면내 예측 모드 후보군(본 예에서 MPM 후보군) 구성을 위한 고정적인 하나의 우선 순위가 지원될 수 있다. 예를 들어, 공간적으로 인접한 블록의 예측 모드를 후보군에 추가할 경우 좌(도 13에서 L3) - 상(도 13에서 T3) - 좌하(도 13에서 B0) - 우상(도 13에서 R0) - 좌상(도 13에서 TL) 블록의 순서, 기 설정된 예측 모드를 후보군에 추가할 경우 Planar - DC - 수직 - 수평 - 대각선 모드의 순서와 같은 기 설정된 하나의 우선 순위가 지원될 수 있다. 또한, 좌 - 상 - Planar - DC - 좌하 - 우상 - 좌상 블록의 순서와 같은 상기 예의 혼합 구성이 가능할 수 있다. 앞의 우선 순위에 후보들까지 진행되어도 후보군의 개수를 다 채우지 못할 경우 기 포함된 예측 모드의 유도된 모드(예를 들어, 좌 블록 모드의 +1, -1, 상 블록 모드의 +1, -1 등)와 수직, 수평, 대각선 모드 등이 그 다음 우선 순위를 가질 수 있다.
상기 예에서 공간적으로 인접한 블록의 예측 모드를 후보군에 추가할 경우 좌 - 상 - 좌하 - 우상 - 좌상 블록의 우선 순위를 가지며 순서대로 좌 블록(도 12의 L3)의 예측 모드를 후보군에 포함하되 해당 모드가 존재하지 않는 경우에는 그 다음 우선 순위인 상 블록(도 13의 T3)의 예측 모드를 후보군에 포함한다. 이와 같이 순서대로 후보군에 포함을 시키되 해당 블록의 예측 모드가 이용 불가능하거나 기 포함된 모드와 중복적인 경우에는 그 다음 블록으로 순서가 넘어간다.
다른 예로, 공간적으로 인접한 블록의 예측 모드를 후보군에 추가할 경우 좌 - 상 - 좌하 - 우상 - 좌상 블록의 순서로 후보군을 구성할 수 있다. 이때, 좌 블록의 예측 모드는 L3에 위치하는 블록의 예측 모드를 먼저 고려하되 이용 불가능하거나 중복되는 모드가 존재하는 경우 좌 블록의 그 다음 서브 블록인 L2, L1, L0의 순서로 좌 블록의 예측 모드 후보를 채울 수 있다. 이와 같이 상(T3 - T2 - T1 - T0), 좌하(B0 - B1 - B2 - B3), 우상(R0 - R1 - R2 - R3), 좌상(TL) 블록에도 동일하거나 비슷한 설정이 적용된다. 예를 들어, 좌 블록의 예측 모드는 L3 - L2 - L1 - L0의 순서로 진행을 하더라도 후보군에 추가를 못 시키는 상황이면 그 다음 순위의 블록으로 진행될 수 있다.
후술하는 예는 적응적인 후보군 구성에 대한 경우를 설명한다. 적응적인 후보군 구성은 현재 블록의 상태(예를 들어, 블록의 크기와 형태 등) 또는 이웃 블록의 상태(예를 들어, 블록의 크기와 형태, 예측 모드 등) 또는 현재 블록과 이웃 블록의 관계 등에 따라 정해질 수 있다.
일 예(3)로, 화면내 예측 모드 후보군(본 예에서 MPM 후보군) 구성을 위한 적응적인 우선 순위가 지원될 수 있다. 빈도수에 따라 우선 순위를 설정할 수 있다. 즉, 많이 발생하는 예측 모드의 경우 높은 우선 순위를 가지며, 적게 발생하는 예측 모드의 경우 낮은 우선 순위를 가질 수 있다.
예를 들어, 공간적으로 인접한 블록의 예측 모드의 빈도수에 따라 우선 순위를 설정할 수 있다.
만약 빈도수가 동일한 경우를 위한 기 설정된 우선 순위가 지원될 수 있다. 예를 들어, 좌, 상, 좌하, 우상, 좌상 블록의 예측 모드(각 블록 당 하나의 예측 모드를 획득한다고 가정) 중 2번씩 발생한 모드가 6번 모드와 31번 모드이고 1번 발생한 모드가 14번 모드라고 가정할 경우, 본 예(좌 - 상 - 좌하 - 우상 - 좌상 블록의 순서에서 앞선 순위의 블록에서 발생한 모드가 6번 모드라 가정)에서는 6번 모드와 31번 모드를 첫번째와 두번째 후보로 포함한다.
Planar와 DC를 세번째와 네번째 후보로 포함하며, 1번의 빈도수를 갖는 예측 모드인 14번 모드는 다섯번째 후보로 포함한다. 그리고 첫번째와 두번째 후보에서 유도되는 5번과 7번 모드, 30번과 32번 모드를 그 다음 우선 순위로 둘 수 있다. 또한, 다섯번째 후보에서 유도되는 모드인 13번과 15번 모드를 그 다음 우선 순위에 두며, 그 다음 수직, 수평, 대각선 모드 등이 그 다음 우선 순위를 가질 수 있다.
즉, 빈도수가 2 이상인 예측 모드는 Planar와 DC 모드 앞의 우선 순위를 할당하고, 빈도수가 1인 예측 모드는 Planar와 DC 모드 뒤의 우선 순위를 할당하며, 위의 예와 같은 유도 모드, 기 설정된 모드 등이 그 뒤를 따를 수 있다.
정리하면, 기 설정된 우선 순위(예를 들어, 좌 - 상 - Planar - DC - 좌하 - 우상 - 좌상 블록 순서)는 일반적인 영상의 통계적인 특성을 고려하여 설정된 우선 순위일 수 있고, 적응적인 우선 순위(본 예에서 빈도수에 따라 후보군에 포함시키는 경우)는 영상의 부분적인 특성을 고려하여 기 설정된 우선 순위의 부분적인 수정(본 예에서 Planar와 DC는 고정시키고 앞에는 2개 이상 빈도수가 발생한 모드를 배치, 뒤에는 1개 빈도수가 발생한 모드를 배치)을 가하는 예일 수 있다.
또한, 빈도수에 따라 후보군 구성에 대한 우선 순위가 결정될 뿐만 아니라 빈도수에 기반하여 MPM 후보군에 속하는 각 후보에 대한 이진화, 엔트로피 부/복호화 설정이 정해질 수 있다. 일 예로, m개의 빈도수를 갖는 MPM 후보에 대한 이진화가 빈도수에 기반하여 결정될 수 있다. 또는, 해당 후보에 대한 문맥 정보가 빈도수에 따라 적응적으로 결정될 수 있다. 즉, 본 예에서 상기 모드의 선택 확률을 높게 설정한 문맥 정보를 사용할 수 있다. 즉, m이 1개 내지 4개(본 예에서 총 6개의 후보 중 2개는 비방향성 모드가 포함되어 있기 때문에 빈도수의 최대값은 4개)일 때의 문맥 정보가 달리 설정될 수 있다.
만약 어떤 빈 인덱스(Bin index. 이진화에 따라 1 비트 이상을 구성될 때 각 비트의 순서. 예를 들어, 어떤 MPM 후보는 '010'으로 구성되어 있을 경우 첫번째 내지 세번째 빈은 0, 1, 0일 수 있음)의 0과 1 중 0은 상기 후보가 MPM으로 선택되는 것(하나의 빈으로 최종 MPM인지 여부가 결정되는 상황 또는 최종 MPM을 알기 위해 추가적인 빈을 확인해야 하는 상황. 즉, 위에 '010'에서 첫번째 빈이 0이면 두번째와 세번째를 더 확인해야 해당 모드가 최종 MPM인지 확인할 수 있음. 하나의 빈이면 해당 빈의 0과 1에 따라 최종 MPM인지 바로 확인이 가능)을 의미하는 빈(Bin)이고, 1은 상기 후보가 MPM으로 선택되지 않는 것을 의미하는 빈이면, 0의 발생 확률이 높은 문맥 정보(즉, 이진 산술화를 할 때 0의 발생 확률을 90%, 1의 발생 확률을 10%로 둘 수 있음. 기본 경우가 0과 1의 발생 확률을 60%, 40%라고 가정)가 적용되어 문맥 적응형 이진 산술 부호화(CABAC)이 적용될 수 있다.
일 예(4)로, 화면내 예측 모드 후보군(본 예에서 MPM 후보군) 구성을 위한 적응적인 우선 순위가 지원될 수 있다. 예를 들어, 공간적으로 인접한 블록의 예측 모드의 방향성에 따라 우선 순위를 설정할 수 있다.
이때, 방향성에 대한 카데고리는 오른쪽 위를 향하는 모드 그룹(도 9에서 2번 내지 17번 모드), 수평 모드 그룹(도 9에서 18번 모드), 오른쪽 아래를 향하는 모드 그룹(도 9에서 19번 내지 49번 모드), 수직 모드 그룹(도 9에서 50번 모드), 왼쪽 아래를 향하는 모드 그룹(도 9에서 51번 내지 66번 모드), 비방향성 모드 그룹(Planar, DC 모드)으로 분류할 수 있다. 또는, 수평 방향성 모드 그룹(도 9에서 2번 내지 34번 모드), 수직 방향성 모드 그룹(도 9에서 35번 내지 66번 모드), 비방향성 모드 그룹(Planar, DC 모드)으로 나눌 수 있으며, 다양한 구성의 예가 가능할 수 있다.
예를 들어, 기본 후보군 우선 순위가 좌 - 상 - Planar - DC - 좌하 - 우상 - 좌상 블록의 순서일 경우, 위의 순서대로 후보군을 구성할 수 있다. 단, 후보군이 구성된 후에 각 후보에 대한 이진화, 엔트로피 부/복호화 설정을 위한 우선 순위가 상기 카데고리에 기반하여 결정될 수 있다. 일 예로, MPM 후보군 중 후보가 많이 포함되는 카데고리에는 적은 비트가 할당되는 이진화가 수행될 수 있다. 또는, 카데고리에 따른 문맥 정보가 따로 적응적으로 결정될 수 있다. 즉, 각 카데고리에 포함되는 모드 개수(예로, 1번 카데고리 m개, 2번 카데고리 n개일 때는 m과 n의 조합에 따라 문맥 정보가 결정)에 따라 문맥 정보가 결정될 수 있다.
일 예(5)로, 현재 블록의 크기, 형태에 따라 적응적인 우선 순위가 지원될 수 있다. 예를 들어, 블록의 크기에 따라 우선 순위가 결정될 수 있고, 블록의 형태에 따라 우선 순위가 결정될 수 있다.
블록 크기가 32 x 32 이상인 경우에는 좌 - 상 - Planar - DC - 좌하 - 우상 - 좌상 블록의 순서로 후보군에 포함될 수 있고, 32 x 32 미만인 경우에는 좌 - 상 - 좌하 - 우상 - 좌상 - Planar - DC 모드의 순서로 후보군에 포함될 수 있다.
또는, 블록의 형태가 정사각인 경우에는 좌 - 상 - Planar - DC - 좌하 - 우상 - 좌상 블록의 순서로 후보군에 포함될 수 있고, 블록의 형태가 직사각(가로가 긴 형태)인 경우에는 상 - 우상 - 좌상 - Planar - DC - 좌 - 좌하 블록의 순서로 후보군에 포함될 수 있고, 블록의 형태가 직사각(세로가 긴 형태)인 경우에는 좌 - 좌하 - 좌상 - Planar - DC - 상 - 우상 블록의 순서로 후보군에 포함될 수 있다. 본 예는 블록의 길이가 긴 쪽에 인접한 블록에 앞선 순위가 주어지는 경우로 이해될 수 있다.
일 예(6)로, 현재 블록과 이웃 블록의 관계에 따라 적응적인 우선 순위가 지원될 수 있다.
도 23의 a를 참조하면, 이웃 블록(본 예에서 좌 블록의 서브 블록)의 예측 모드에 따른 예측 블록 생성에 대한 예를 나타낸다.
좌 블록(본 예에서 좌 블록의 위쪽 서브 블록)의 예측 모드가 도 9(설명의 편의를 위해 사용. 방향성에 대한 내용만 참조하면 됨)에서 51번 내지 66번에 존재하는 방향성을 가진 모드(수직 모드에서 오른쪽으로 기울어진 모드)인 경우에 좌 블록의 예측 블록 생성에 참조되는 화소는 그림에서 빗금친 부분(TL, T의 일부)이 해당된다. 좌 블록의 오른쪽 영역의 경우 실제로는 현재 블록의 왼쪽 영역과 상관성이 높은 영역일 수 있으나 아직 현재 블록의 부/복호화가 진행되기 전이라 이미 부/복호화가 완료된 T의 아래쪽 영역의 참조 화소를 통해 예측 블록을 생성할 수 있다.
위와 같이 T 블록 일부의 아래쪽 영역으로부터 예측을 수행했음에도 최종 예측 모드가 51번 내지 66번에 존재하는 모드로 결정되었다는 것은 현재 블록의 일부 영역(2400)도 위의 예측 모드와 같거나 비슷한 방향성(또는 에지 등)이 존재한다는 것을 의미할 수 있다.
즉, 현재 블록의 예측 모드로 좌 블록의 예측 모드가 선택될 확률이 조금 높다는 것을 의미할 수 있다. 또는, 도 51번 내지 66번 모드가 선택될 확률이 조금 높다는 것을 의미할 수 있다.
도 23의 b는 위의 예에서 관련 설명을 유도하면 상 블록의 예측 모드가 도 9에서 2번 내지 17번 모드(수평 모드에서 아래쪽으로 기울어진 모드)에 존재할 경우 현재 블록의 일부 영역도 해당 예측 모드와 같은 방향성이 존재한다는 것을 의미할 수 있다.
즉, 현재 블록의 예측 모드로 상 블록의 예측 모드가 선택될 확률이 조금 높다는 것을 의미할 수 있다. 또는, 2번 내지 17번 모드가 선택될 확률이 조금 높다는 것을 의미할 수 있다.
위와 같이 이웃 블록의 예측 모드를 통해 현재 블록의 예측 모드 발생 가능성을 파악하는 경우 적응적으로 우선 순위를 결정할 수 있다.
예를 들어, 기본 후보군 구성 우선 순위가 좌 - 상 - Planar - DC - 좌하 - 우상 - 좌상 블록의 순서일 경우, 도 23의 a와 같은 경우에는 우선 순위에 변동이 없고, 도 23의 b와 같은 경우에는 상 - 좌 - Planar - DC - 좌하 - 우상 - 좌상 블록의 순서로 변동이 발생할 수 있다.
또는, 도 23의 a와 같은 경우에는 좌 - (좌 + 1) - (좌 - 1) - 상 - Planar - DC - 좌하 - 우상 - 좌하 블록의 순서일 수 있고, 도 23의 b와 같은 경우에는 상 - (상 - 1) - (상 + 1) - 좌 - Planar - DC - 좌하 - 우상 - 좌하 블록의 순서로 변동이 발생할 수 있다.
도 24의 a를 참조하면, 이웃 블록(본 예에서 좌 블록)의 예측 모드에 따른 예측 블록 생성에 대한 예를 나타낸다.
좌 블록의 예측 모드가 도 9에서 51번 내지 66번에 존재하는 방향성을 가진 모드인 경우에 좌 블록의 예측 블록 생성에 참조되는 화소는 그림에서 빗금친 부분(TL, T)이 해당된다. 좌 블록의 오른쪽 영역의 경우 실제로는 현재 블록의 왼쪽 영역과 상관성이 높은 영역일 수 있으나 아직 현재 블록의 부/복호화가 진행되기 전이라 이미 부/복호화가 완료된 T의 아래쪽 영역의 참조 화소를 통해 예측 블록을 생성할 수 있다.
위와 같이 T 블록의 아래쪽 영역으로부터 예측을 수행했음에도 최종 예측 모드가 51번 내지 66번에 존재하는 모드로 결정되었다는 것은 현재 블록의 일부 영역도 위의 예측 모드와 같거나 비슷한 방향성(또는 에지 등)이 존재한다는 것을 의미할 수 있다.
즉, 현재 블록의 예측 모드로 좌 블록의 예측 모드가 선택될 확률이 높다는 것을 의미할 수 있다. 또는, 51번 내지 66번 모드가 선택될 확률이 높다는 것을 의미할 수 있다.
도 24의 b는 위의 예에서 관련 설명을 유도하면 상 블록의 예측 모드가 도 9에서 2번 내지 17번 모드에 존재할 경우 현재 블록의 일부 영역도 해당 예측 모드와 같은 방향성이 존재한다는 것을 의미할 수 있다.
즉, 현재 블록의 예측 모드로 상 블록의 예측 모드가 선택될 확률이 높다는 것을 의미할 수 있다. 또는, 2번 내지 17번 모드가 선택될 확률이 높다는 것을 의미할 수 있다.
위와 같이 이웃 블록의 예측 모드를 통해 현재 블록의 예측 모드 발생 가능성을 파악하는 경우 적응적으로 우선 순위를 결정할 수 있다.
예를 들어, 기본 후보군 구성 우선 순위가 좌 - 상 - Plaanr - DC - 좌하 - 우상 - 좌상 블록의 순서일 경우, 도 24의 a와 같은 경우에는 우선 순위에 변동이 없고, 도 24의 b와 같은 경우에는 상 - 좌 - Planar - DC - 좌하 - 우상 - 좌상 블록의 순서로 변동이 발생할 수 있다. 이때, 도 24의 a와 같은 경우에 우선 순위는 기존과 동일한 반면 MPM 후보군 중 좌 블록의 예측 모드 후보에 대한 이진화, 엔트로피 부/복호화 설정을 적응적으로 결정할 수 있다. 일 예로, 좌 블록의 예측 모드 후보에 대한 이진화(더 짧은 비트를 할당)가 결정될 수 있다. 또는, 문맥 정보를 적응적으로 결정할 수 있다. 즉, 본 예에서 상기 후보가 선택될 발생 확률을 높게 설정한 문맥 정보를 사용할 수 있다.
만약 어떤 빈 인덱스의 0과 1 중 0은 상기 후보가 MPM으로 선택되는 것(하나의 빈으로 최종 MPM인지 여부가 결정되는 상황 또는 최종 MPM을 알기 위해 추가적인 빈을 확인해야 하는 상황)을 의미하는 빈(Bin)이고, 1은 상기 후보가 MPM으로 선택되지 않는 것을 의미하는 빈이면, 0의 발생 확률이 높은 문맥 정보가 적용되어 CABAC이 적용될 수 있다.
또는, 도 24의 a와 같은 경우에는 좌 - (좌 + 1) - (좌 - 1) - (좌 + 2) - (좌 - 2) - 상 - Planar - DC - 좌하 - 우상 - 좌하 블록의 순서일 수 있고, 도 24의 b와 같은 경우에는 상 - (상 - 1) - (상 + 1) - (상 - 2) - (상 + 2) - 좌 - Planar - DC - 좌하 - 우상 - 좌하 블록의 순서로 변동이 발생할 수 있다.
도 25의 a를 참조하면, 이웃 블록(본 예에서 좌, 좌하 블록)의 예측 모드에 따른 예측 블록 생성에 대한 예를 나타낸다.
좌 블록과 좌하 블록의 예측 모드가 도 9의 51번 내지 66번에 존재하는 방향성을 가진 경우를 고려한다. 좌 블록과 좌하 블록은 동일한 블록에 속하거나 그렇지 않을 수 있다. 본 예에서는 설명의 편의를 위해 좌 블록과 좌하 블록은 분할이 완료된 동일한 블록(즉, 동일한 모드)에 속한다고 가정한다.
(좌 + 좌하) 블록의 예측 블록 생성에 참조되는 화소는 그림에서 빗금친 부분(TL, T, TR)이 해당된다. 전술한 예와 같이 T와 TR 블록의 아래쪽 영역으로부터 예측을 수행했음에도 최종 예측 모드가 51번 내지 66번에 존재하는 모드로 결정되었다는 것은 현재 블록의 전체 영역도 위의 예측 모드와 같거나 비슷한 방향성이 존재한다는 것을 의미할 수 있다.
즉, 현재 블록의 예측 모드로 좌 블록 또는 좌하 블록의 예측 모드(본 예에서는 두 블록의 예측 모드가 동일한 경우)가 선택될 확률이 (아주) 높다는 것을 의미할 수 있다. 또는, 도 51번 내지 66번 모드가 선택될 확률(본 예는 두 블록의 예측 모드가 동일하지 않는 경우)이 높다는 것을 의미할 수 있다.
도 25의 b는 (상 + 우상) 블록의 예측 모드가 도 9에서 2번 내지 17번 모드에 존재할 경우 현재 블록의 전체 영역도 해당 예측 모드와 같은 방향성이 존재한다는 것을 의미할 수 있다.
즉, 현재 블록의 예측 모드로 상 블록 또는 우상 블록의 예측 모드(본 예에서는 두 블록의 예측 모드가 동일한 경우)가 선택될 확률이 (아주) 높다는 것을 의미할 수 있다. 또는, 2번 내지 17번 모드가 선택될 확률(본 예는 두 블록의 예측 모드가 동일하지 않는 경우)이 높다는 것을 의미할 수 있다.
위와 같이 이웃 블록의 예측 모드를 통해 현재 블록의 예측 모드 발생 가능성을 파악하는 경우 적응적으로 우선 순위를 결정할 수 있다.
예를 들어, 기본 후보군 구성 우선 순위가 좌 - 상 - Planar - DC - 좌하 - 우상 - 좌상 블록의 순서일 경우, 도 25의 a와 같은 경우에는 좌 - 좌하 - Planar - DC - 상 - 우상 - 좌상 블록의 순서로 변동이 발생할 수 있다. 도 25의 b와 같은 경우에는 상 - 우상 - Planar - DC - 좌 - 좌하 - 좌상 블록의 순서로 변동이 발생할 수 있다. 즉, 관련 블록의 우선 순위를 앞에 둘 수 있다.
또는, 도 25의 a와 같은 경우에는 좌 - 좌하 - (좌 + 1) - (좌 - 1) - (좌하 + 1) - (좌하 - 1) - Planar - DC - 상 - 우상 - 좌상 블록의 순서로 변동이 발생할 수 있고, 도 25의 b와 같은 경우에는 상 - 우상 - (상 - 1) - (상 + 1) - (우상 - 1) - (우상 + 1) - Planar - DC - 좌 - 좌하 - 좌상 블록의 순서로 변동이 발생할 수 있다.
또한, 도 25와 같은 경우 4번 예에서 전술한 것으로 카데고리에 기반하여 MPM 후보군에 속하는 각 후보에 대한 이진화, 엔트로피 부/복호화 설정이 정해질 수 있다. 일 예로, MPM 후보(도 24의 a와 b의 모드)에 대한 이진화(즉, 더 짧은 비트를 할당)가 결정될 수 있다. 또는, 해당 카데고리에 따른 문맥 정보를 적응적으로 결정할 수 있다. 즉, 본 예에서 상기 모드(도 25의 a와 b의 모드)가 속하는 카데고리의 발생 확률을 높게 설정한 문맥 정보를 사용할 수 있다.
만약 어떤 빈 인덱스의 0과 1 중 0은 상기 카데고리와 다른 카데고리에 속하는 모드가 MPM으로 선택되는 것을 의미하는 빈이고, 1은 상기 카데고리에 속하는 모드가 MPM으로 선택되는 것을 의미하는 빈이면, 1의 발생 확률이 높은 문맥 정보가 적용되어 CABAC이 적용될 수 있다.
상기 내용의 확인을 위해서는 소정의 방향(좌, 상, 좌상, 우상, 좌하)에 위치한 블록이 단일 블록(즉, 분할되지 않음)으로 구성되었는지 확인하는 과정이 필요하다. 그래서 단일 블록으로 구성되어 있으면, 해당 블록의 예측 모드로 상기 상황을 진행할 수 있고, 분할 블록으로 구성되어 있으면, 각 블록의 예측 모드를 전부 또는 일부를 확인하여 상기 상황을 진행할 수 있다. 하지만, 이 경우에 대한 복잡도는 많이 증가할 가능성이 존재한다.
이를 위해 상기 과정을 간단하게 구성할 수 있다. 현재 블록은 (a, b) ~ (a + M - 1, b + N - 1)의 범위를 갖는다고 가정한다. 좌 블록은 현재 블록을 중심으로 (a - 1, b) ~ (a - 1, b + N - 1)의 범위에 속하는 화소를 포함한다. 이 모든 화소가 아닌 일부 화소의 예측 모드를 확인하여 좌 블록의 예측 모드의 방향성을 판단할 수 있다.
예를 들어, (a - 1, b)의 좌 블록의 우상측(현재 블록 기준으로 왼쪽 상단) 좌표의 예측 모드, (a - 1, b + N - 1)의 좌 블록의 우하측(현재 블록 기준으로 왼쪽 하단) 좌표의 예측 모드로 좌 블록의 예측 블록의 방향성을 판단할 수 있다. 이때, 좌 블록이 단일 블록으로 구성될 수 있고 분할 블록으로 구성될 수 있는데, 단일 블록 또는 분할 블록이라 할지라도 상기 좌표를 포함하는 예측 모드는 동일할 수 있다. 하지만, 동일하지 않더라도 도 24의 a를 통해 설명한 것처럼 도 9의 51번 내지 66번의 카테고리에 속하는 예측 모드라 한다면 해당 예측 모드에 대한 예측 모드 부호화 관련하여 높은 우선 순위를 할당할 수 있다.
상기 예는 좌 블록의 경우를 가정하였지만, 다른 방향도 마찬가지로 적용 가능하다. 좌 블록 외에 좌하 블록의 예측 모드 확인을 위해 (a - 1, b + N)과 같은 좌하 블록에 속하는 좌표의 예측 모드를 확인하는 과정이 필요할 수 있다.
정리하면, 소정의 방향에 위치한 블록의 일부 좌표에 관한 예측 모드를 확인하여, 해당 방향의 예측 모드 또는 예측 모드 방향성을 확인하여 화면내 예측 모드 후보군 구성에 참조할 수 있다. 이때, 좌표의 개수는 1, 2, 3와 같은 1 이상의 정수일 수 있다.
정리하면, 현재 블록과 높은 상관성을 갖는다고 판단되는 모드가 확인되면 해당 모드에 대한 후보군 내 우선 순위를 높게 할당할 수 있다. 또는, 해당 모드에 기반하여 유도되는 예측 모드(예를 들어, +1, -1과 같은 인접한 예측 모드)가 후보군 내 우선 순위가 높게 할당될 수 있다. 즉, 다른 공간적으로 인접한 블록의 예측 모드 또는 기 설정된 예측 모드(DC, Planar, 수평, 수직, 대각선 모드 등) 중 전부 또는 일부보다 앞선 우선 순위를 가질 수 있다.
상기 예에서 설명한 것과 달리 현재 블록과 높은 상관성을 갖는다고 판단되지 않는다면, 기본 설정에 의한 후보군을 구성할 수 있다. 즉, 상기 상관성이 높은 과정을 고려한 후보군 구성 방법이 추가로 고려되어, 인접한 블록의 상태 정보(블록의 크기, 형태, 위치, 예측 모드 등)에 기반하여 복수의 예측 모드 후보군 구성 방법 또는 구성된 후보군 중 하나를 선택할 수 있다.
도 26은 현재 블록과 이웃 블록의 관계에 대한 예시도이다.
도 26의 a는 블록 분할에 따라 부호화 순서를 나타내고 있다.
쿼드 트리 분할이 수행된 경우에는 좌상(0) - 우상(1) - 좌하(2) - 우하(3) 블록의 순서로 부호화가 진행된다. 상기 서브 블록(깊이 1)에서 추가로 쿼드 트리 분할이 수행된 경우에는 각 서브 블록(깊이 2)에서도 위의 순서로 부호화가 수행되며, 깊이 정보에 우선하여 부호화가 수행된다. 깊이 1에서 분할된 좌상 블록의 경우 깊이 2에서 좌상(0-0) - 우상(0-1) - 좌하(0-2) - 우하(0-3) 블록의 순서, 깊이 1에서 분할된 우하 블록의 경우 깊이 2에서 좌상(3-0), 우상(3-1), 좌하(3-2), 우하(3-3) 블록의 순서를 갖는다. 즉, 깊이 정보로 표현되는 x - y - z 의 순서대로 부호화가 진행된다.
바이너리 트리 분할이 수행된 경우에는 가로 분할의 경우 좌(0) - 우(1) 또는 상(0) - 하(1) 블록의 순서로 부호화가 진행된다. 상기 서브 블록(깊이 1)에서 추가로 바이너리 트리 분할이 수행된 경우에는 각 서브 블록(깊이 2)에서도 위의 순서로 부호화가 수행되며, 깊이 정보에 우선하여 부호화가 수행된다.
도 26의 a에서 3 블록은 도 25의 a와 같은 경우, 16 블록은 도 23의 a와 같은 경우, 20 블록은 도 24의 a와 같은 경우에 해당한다.
예를 들어, 3 블록은 좌 블록이 좌하 블록과 분할되지 않은 하나의 블록으로 구성되어 있고 특정 방향의 예측 모드(하나의 모드)를 갖거나 또는 좌 블록과 좌하 블록이 분할되어 있어도 특정한 방향성을 갖는 예측 모드(하나 이상의 모드)를 갖는 경우이다.
16 블록은 좌 블록이 분할되어 복수의 서브 블록으로 구성되어 있고 그 중 적어도 하나의 일부 서브 블록은 특정 방향의 예측 모드(하나의 모드)를 갖는 경우이다.
20 블록은 좌 블록이 하나의 블록으로 구성되어 있고 특정 방향의 예측 모드(하나의 모드)를 갖거나 또는 좌 블록이 분할되어 복수의 서브 블록으로 구성되어 있고 모든 서브 블록이 특정 방향성의 예측 모드(하나 이상의 모드)를 갖는 경우이다.
도 26의 b를 통해 현재 블록과 이웃 블록과의 관계에 대한 일 예를 나타내고 있다. 도 26의 b와 같이 예상되는 것으로 판단하면 이를 고려하여 예측 모드 후보군 구성에 고려할 수 있다.
상기 예를 통해 현재 블록과 이웃 블록의 관계에 대한 일부 예를 살펴보았으나, 이외의 다양한 경우가 가능하여 그를 고려하여 화면내 예측 모드 후보군 구성 설정을 할 수 있다.
또한, 상기 예에서는 화면내 예측 모드 후보군 구성에 관한 다양한 경우를 살펴보았다. 각 실시예에서 설명된 하나의 설정이 적용된 후보군 구성이 가능할 수 있고, 각 실시예에서 설명된 설정이 다른 실시예에서 동일하거나 비슷한 적용이 가능할 뿐만 아니라, 복수의 설정이 적용되어 후보군 구성이 가능할 수 있다. 또한 전술한 예와 추가적인 설정이 결합되어 후보군 구성이 되는 경우가 가능할 수있다.
본 예에서는 non-MPM 후보군을 복수의 후보군(A와 B 그룹)으로 구성하여 MPM 후보군의 예측 모드가 선택되지 않고 non-MPM 후보군의 예측 모드 중 그 다음으로 현재 블록의 예측 모드로 예상되는 모드 후보군(A 그룹)을 두어 부/복호화를 수행하는 예를 가정한다.
본 예에서는 16개의 후보가 A 후보군에 포함되고, 45개의 후보가 B 후보군에 포함된다고 가정한다.
A 후보군 구성에 대한 설정은 다양한 방법을 사용할 수 있는데, MPM 후보군의 우선 순위에 따라 포함되지 못한 예측 모드를 A 후보군에 포함할 수 있다.
또는, 위의 예와 상관없이 기 설정된 분류에 따라 A 후보군을 구성할 수 있다. 예를 들어, 도 9에서 일정 간격을 갖는 예측 모드를 후보군에 구성할 수 있다. 즉, 도 8에서 2번, 6번, 10번, 14번, 18번 모드 등이 A 그룹에 포함될 수 있다. 이 경우 B 그룹에는 3번, 4번, 5번, 7번, 8번, 9번, 11번 모드 등이 B 그룹에 포함될 수 있다. 물론, MPM 후보군에 포함되는 모드는 제외되는 설정이다.
상기 예에 제한되지 않으며, 다양한 변형 및 다른 경우의 설정이 가능할 수 있다.
정리하면, 우선 MPM 후보군을 구성한 후, A 후보군을 구성한다. 그리고 남은 예측 모드를 B 후보군으로 구성할 수 있다.
MPM 후보군 모드는 Truncated Unary 이진화, A 후보군 모드는 고정 길이 이진화, B 후보군 모드는 Trunacted Binary 이진화의 방법이 사용될 수 있지만, 이외의 다양한 이진화 방법이 사용될 수 있다.
MPM 후보군 모드는 전체 또는 일부의 빈에 대해 레귤러 코딩부를 통해 부/복호화를 수행하고, non-MPM 후보 모드는 전체 빈에 대해 바이패스 코딩부를 통해 부/복호화를 수행할 수 있다. 또는, non-MPM 후보군 중 A 후보군 모드는 일부의 빈에 대해 레귤러 코딩부를 통해 부/복호화를 수행할 수 있으며, 이에 한정되지 않고 다양한 경우가 가능할 수 있다.
전술한 내용은 기본 설정에 대한 설명이며, 본 발명의 많은 실시예에 따른 변형의 예가 가능할 수 있다.
다음은 복수의 참조 화소를 사용하여 예측 블록을 생성하는 경우를 설명한다.
도 27에서 복수의 참조 화소 계층을 사용하여 예측 블록을 생성하는 예를 나타낸다.
ref_1의 a와 ref_2의 b에 가중치 평균 등을 적용하여 생성된 화소값이 현재 블록의 x 화소의 예측값으로 획득될 수 있다.
복수의 참조 화소 계층을 사용하여 예측 블록을 생성하는 것은 간혹 더 좋은 예측 효과를 발휘하기도 하다. 즉, 복수의 화소가 현재 블록의 화소들의 예측값을 생성하는데 더 정교한 예측 결과를 낳기도 한다는 것을 의미한다.
그러나 re1_1과 ref_2가 현재 블록이 에지 방향 등과 상관성이 높은 경우에 적용될 수 있는 이야기로 일부의 경우에는 복수의 참조 화소 계층을 사용하는 것이 더 좋지 않은 예측 결과를 낳기도 한다. 예를 들어, 현재 블록은 수직 방향으로 상관성이 높은데 윗 블록이 대각선 방향으로 상관성이 높으면 복수의 참조 화소 계층을 사용하는 것이 좋을리 없다.
이 경우 명시적으로 기존의 하나의 참조 화소 계층을 사용하는 것이 나을지 아니면 복수의 참조 화소 계층을 사용하는 것이 낳을 지 명시적으로 선택하는 것도 좋을 수 있다.
또는, 참조 화소 계층 간의 상관성을 비교하여 높은 상관성을 갖는지 확인하여 묵시적으로 복수의 참조 화소 계층을 사용하여 예측 블록을 생성할 지 여부를 결정하는 것도 좋을 수 있다.
전술한 예를 통해 화면내 예측의 경우 소정의 서브 블록의 단위로 분할되어, 서브 블록 기반의 예측, 변환 등을 수행하는 경우를 살펴보았다. 이때, 현재 블록에 속하는 서브 블록은 하나의 화면내 예측 모드를 공유할 수 있음을 언급하였다. 이때, 복수의 참조 화소 계층을 상기 블록 내 서브 블록에 적용하는 것은 좋을 수 있다.
도 28은 복수의 참조 화소 계층을 사용하여 현재 블록 내의 서브 블록을 생성하는 예를 나타낸다. 현재 블록은 4M x 4N, 서브 블록은 4M x N이며, 순방향 예측(상->하 또는 좌->우. 참고로, 역방향은 하->상, 우->하)이고 예측 방향은 좌상, 상, 우상 블록의 참조 화소를 사용하는 예측 모드가 k(도 9에서 66번)인 경우를 가정한다.
도 28을 참조하면, x를 포함하는 서브 블록(4M x N)은 부호화가 완료된 첫번째 이전 서브 블록을 참조 화소 계층으로 삼아 화면내 예측을 수행할 수 있다. 또는, x를 포함하는 서브 블록은 부호화가 완료된 두번째 이전 서브 블록을 참조 화소 계층으로 삼아 화면내 예측을 수행할 수 있다. 또는, x를 포함하는 서브 블록은 부호화가 완료된 첫번쨰와 두번째 이전 서브 블록을 참조 화소 계층으로 삼아 화면내 예측(각 참조 화소 계층에 적용되는 가중치가 x를 포함한 서브 블록에 다른 서브 블록보다 같거나 높은 가중치 적용)을 수행할 수 있다.
일반적으로 부호화 블록을 기준으로 복수의 참조 화소 계층을 사용하고자 할 때는 무조건 사용하는 것이 항상 올바른 결과를 낳지 않지만, 상기 예의 경우 부호화 대상 서브 블록의 이전 서브 블록은 대상 서브 블록과 동일한 방향성을 갖고 있음을 알고 있기 때문에 더 좋은 결과를 낳을 수 있다. 그렇기 때문에 명시적으로 현재 블록 내의 서브 블록에도 복수의 참조 화소 계층 설정을 적용하여 명시적으로 수행할지 여부 또는 어떤 참조 화소 계층으로 선택할지를 결정하게 할 수 있다. 또는, 묵시적으로 대상 서브 블록의 이전 k개의 서브 블록를 복수의 참조 화소 계층으로 적용하여 대상 서브 블록의 예측값을 생성하게할 수 있다.
만약 서브 블록 단위에서 복수의 서브 블록을 각기 다른 참조 화소 계층으로 설정하고, 이를 사용하여 예측 블록을 생성하고자 할 때 서브 블록의 현재 블록 내 위치에 따라 다른 설정을 둘 수 있다.
예를 들어, 현재 블록 내에 4개의 수평으로 분할된 서브 블록이 지원된다고 하자. 그러면 첫번째 서브 블록은 현재 블록의 최인접한 참조 화소를 사용하여 예측 및 부호화를 수행할 수 있고, 두번째 서브 블록은 현재 블록의 최인접한 참조 화소와 첫번째 서브 블록의 데이터를 사용하여 예측 및 부호화를 수행할 수 있다.
또한, 세번째 서브 블록은 첫번쨰와 두번째 서브 블록의 데이터를 사용하여 예측 및 부호화를 수행할 수 있고, 네번째 서브 블록은 두번째와 세번째 서브 블록의 데이터를 사용하여 예측 및 부호화를 수행할 수 있다.
위에서 각 참조 화소 계층(또는 서브 블록)에 참조 화소 필터링, 참조 화소 보간에 동일한 필터가 사용될 수 있고, 다른 필터가 사용될 수 있다. 이때, 필터는 필터 탭수, 필터 계수로 구분된다. 또한, 필터링 적용 유무도 동일하거나 다르게 적용될 수 있다. 또는, 참조 화소 필터링과 참조 화소 보간을 각각 수행하지 않고 하나의 필터로 구현하여 수행할 수 있다. 예를 들어, 3-tap 저주파 필터인 참조 화소 필터링 수행하고 4-tap 보간 필터를 수행하는 것이 아닌, 하나의 6-tap 보간 필터를 수행함으로써 두번 필터링 안할 수도 있다.
위와 같이 다양한 참조 화소 구성에 대한 설정이 가능하며, 이후 복수의 참조 화소 계층을 사용하여 예측을 수행할 수 있다. 본 발명의 이전 다양한 실시예 등을 통해 위의 내용의 다양한 조합이 설명될 수 있다.
다음은 예측 블록 생성에 관한 예를 살펴본다.
화면내 예측을 위해 사용되는 참조 화소는 복수의 개념으로 구분할 수 있다는 설명을 이전에 하였다. 위의 복수의 참조 화소 계층을 사용하는 것과 달리 예측 모드에 따라 제 1 참조 화소와 제 2 참조 화소를 사용하여 예측 블록을 생성 또는 보정할 수 있다.
이에 대한 예를 예측 모드에 따라 달리 적용되는 경우를 설명하였다. 그러나 본 예는 위의 현재 블록을 쪼개서 여러 서브 블록으로 변환을 수행하는 경우에 적용될 수 있다. 즉, 기존의 경우에서는 현재 블록의 이웃한 블록에 참조 화소를 제 1 참조 화소로 사용하고, 제 2 참조 화소는 예측 모드의 방향에 반대편에 위치하거나 예측 모드의 방향에 상응하는 화소를 이용했던 것에 비해, 여러 서브 블록으로 쪼개져 있을 떄는 제 1 참조 화소가 바로 윗 블록인 것이 다를 수 있다. 즉, 본 발명에서 복수의 참조 화소를 사용하여 예측 블록을 수행했던 것에서 제 1 참조 화소의 위치가 변경되는 식으로 적용할 수 있다.
또는, 복수의 서브 블록으로 쪼개져서 변환 등을 수행하는 경우에는 해당 방법을 사용하지 않을 수 있다. 그 이유로는 이전에 부호화가 완료된 최인접한 화소들이 줄 이어 있는데 제 2 참조 화소를 사용하는 것이 비효율적일 수 있기 떄문이다.
즉, 현재 블록이 서브 블록으로 변환 블록을 쪼개서 부호화하는지를 확인한다. 그래서 쪼개지 않고 기존의 블록 크기로 예측, 변환 등을 통해 부호화한다면 본 발명에서 예측 모드에 따라 제 1, 제 2 참조 화소를 사용하여 예측 블록을 생성 또는 예측 블록을 보정할 수 있다. 만약 쪼개서 부호화한다면 제 2 참조 화소를 사용하여 예측 블록을 생성 또는 보정하는 것을 금지할 수 있다.
부/복호화 설정에 따라 쪼개서 부호화하는 경우에도 제 2 참조 화소를 사용한다면, 제 1 참조 화소 위치를 조정하여 해당 과정을 진행할 수 있다.
도 29는 화면내 예측에 사용되는 참조 화소 구성을 설명하기 위한 예시도이다. 예측이 수행되는 현재 블록의 크기 및 형태(M × N)는 블록 분할부로부터 획득될 수 있으며, 화면내 예측을 위해 4×4 내지 256×256 범위에서 지원되는 가정 하에 설명한다. 화면내 예측은 예측 블록 단위로 수행되는 것이 일반적일 수 있으나 블록 분할부의 설정에 따라 부호화 블록, 변환 블록 등의 단위로 수행될 수 있다. 블록 정보를 확인한 후 참조 화소 구성부에서는 현재 블록의 예측에 사용되는 참조 화소를 구성할 수 있다. 이때, 참조 화소는 임시 메모리(예를 들어, 배열<Array>. 1차, 2차 배열 등)를 통해 관리될 수 있으며, 블록의 화면내 예측 과정마다 생성 및 제거되고, 임시 메모리의 크기는 참조 화소의 구성에 따라 결정될 수 있다.
본 예에서는 현재 블록을 중심으로 좌, 상, 좌상, 우상, 좌하 블록이 현재 블록의 예측에 사용되는 경우를 가정하여 설명하지만, 이에 한정되지 않고 다른 구성의 블록 후보군이 현재 블록의 예측에 사용될 수도 있다. 예를 들어, 상기 참조 화소를 위한 이웃 블록의 후보군은 래스터 또는 Z 스캔을 따르는 경우의 일 예일 수 있으며, 스캔 순서에 따라 상기 후보군 중 일부를 제거할 수 있거나 또는 다른 블록 후보군(예를 들어, 우, 하, 우하 블록 등이 추가 구성)을 포함하여 구성될 수 있다. 즉, 참조 가능한 이웃 블록의 위치가 스캔 순서 등에 의해 변경될 수 있다.
또는, 다른 컬러 공간(예를 들어, 현재 블록이 Cr에 속할 경우 다른 컬러 공간은 Y 또는 Cb가 해당)에서 현재 블록과 대응되는 블록(예를 들어, 각 컬러 공간에서 동일 좌표 또는 컬러 성분 구성 비율에 따라 대응되는 좌표를 갖는 경우)이 현재 블록의 예측에 사용될 수 있다. 또한, 설명의 편의를 위해 상기 기 설정된 위치(좌, 상, 좌상, 우상, 좌하)에 하나의 블록으로 구성된 예를 가정하여 설명하지만, 해당 위치에는 적어도 하나의 블록이 존재할 수 있다. 즉, 상기 기 설정된 위치에는 해당 블록의 블록 분할에 따른 복수의 서브 블록이 존재할 수 있다.
정리하면, 현재 블록의 인접한 영역이 현재 블록의 화면내 예측을 위한 참조 화소의 위치일 수 있고, 예측 모드에 따라 다른 컬러 공간의 현재 블록과 대응되는 영역이 추가로 참조 화소의 위치로 고려될 수 있다. 상기 예 외에도 예측 모드, 방법 등에 따라 정의되는 참조 화소의 위치가 결정될 수 있다. 예를 들어, 블록 매칭 등의 방법을 통해 예측 블록을 생성할 경우에 참조 화소 위치는 현재 영상의 현재 블록 이전의 부/복호화가 완료된 영역 혹은 부/복호화가 완료된 영역에서 탐색 범위(예를 들어, 현재 블록의 왼쪽 또는 위쪽 또는 왼쪽 위, 오른쪽 위 등을 포함) 내에 포함된 영역이 참조 화소의 위치로 고려될 수 있다.
도 29와 같이 현재 블록(M x N)의 예측에 사용되는 참조 화소는 좌, 상, 좌상, 우상, 좌하 블록의 인접한 화소(도 7의 Ref_L, Ref_T, Ref_TL, Ref_TR, Ref_BL)로 구성할 수 있다.
이때, 인접한 화소는 적어도 하나의 참조 화소 계층으로 분류할 수 있는데, 가장 인접한 화소는 ref_0{화소값 차이 1. p(-1,-1) ~ p(2M-1,-1), p(-1,0) ~ p(-1,2N-1)}, 그 다음 인접한 화소{화소값 차이 2. p(-2,-2) ~ p(2M,-2), p(-2,-1) ~ p(-2,2N)}는 ref_1, 그 다음 인접한 화소{화소값 차이 3. p(-3,-3) ~ p(2M+1, -3), p(-3,-2) ~ p(-3,2N+1)}는 ref_2 등으로 나눌 수 있다. 상세하게는, ref_k는 이웃 블록(본 예에서 Ref_TL, Ref_T, Ref_TR, Ref_L, Ref_BL)에서 화소값 차이가 k + 1인 경우를 통합한 참조 화소 세트를 의미하며, 본 발명에서 참조 화소 세트 ref_k가 사용된다는 것은 Ref_TL, Ref_T, Ref_TR, Ref_L, Ref_BL에서 화소값 차이가 k + 1인 화소를 참조 화소로 구성하여 예측 블록에 사용한다는 것을 가정하여 설명(또는 중심으로 설명)하나 이에 한정되지 않는다. 이는 현재 블록의 예측에 사용되는 참조 화소 세트가 이웃 블록마다 동일하거나 동일하지 않을 수 있다는 것을 의미한다.
예를 들어, Ref_TL과 Ref_T와 Ref_TR에서는 ref_0{p(-1,-1) ~p(2M-1,-1)}이 사용되고 Ref_L에서는 ref_1{p(-2,0) ~ p(-2,N-1)}이 사용되며 Ref_BL에서는 ref_2{p(-3,N) ~ p(-3, 2N+1)}이 사용되는 경우 또한 가능하다는 것을 의미한다.
또한, 하나의 참조 화소 세트는 Ref_TL, Ref_T, Ref_TB, Ref_L, Ref_BL(즉, 현재 블록의 화면내 예측에 이용되는 이웃 블록에서 획득됨)를 통합한 참조 화소를 지칭하는 의미이지만, 후술하는 예에서 상기 참조 화소의 일부 부분 조합(예를 들어, Ref_T + Ref_TR, Ref_L + Ref_BL, Ref_T + Ref_TL + Ref_L 등. 또는 각 위치의 블록이 서브 블록으로 구성될 경우도 해당. 즉, Ref_T0 + Ref_T1, Ref_L0 + Ref_TL + Ref_T 등)으로 구성되는 경우로 이해되는 설명이 포함되어 있을 수 있다.
본 발명에서는 참조 화소 세트가 최대 3개인 경우를 가정하여 설명하나 이에 한정되지 않고 그 이상의 참조 화소 세트(k 가 3 이상)가 사용될 수도 있다. 이때, 지원되는 참조 화소 세트(또는 최대 세트 개수. 후술하는 예에서 참조 화소 후보군을 의미)는 부/복호화 설정(예를 들어, 블록의 크기, 형태, 예측 모드, 영상 타입, 컬러 성분 등)에 따라 결정될 수 있다.
본 발명에서는 가장 인접한 참조 화소 세트부터 낮은 인덱스(0부터 1씩 증가)를 할당하는 경우를 가정하지만, 이에 한정되지 않는다. 또한, 후술하는 참조 화소 구성 관련 정보는 위와 같은 인덱스 설정(복수의 참조 화소 세트 중 하나를 선택하는 경우에 작은 인덱스에 짧은 비트를 할당하는 이진화 등) 하에 생성될 수 있으나, 이 역시 한정되지 않는다.
일반적으로는 이웃 블록의 가장 인접한 화소를 참조 화소(본 예에서 참조 화소 계층 ref_0)로 구성할 수 있지만, 부/복호화 설정에 따라 그 이외의 화소를 참조 화소로 구성할 수 있다. 다른 참조 화소 계층 또는 적어도 하나의 참조 화소 계층을 사용할 경우 예측의 정확도를 높여줌으로써 부호화 성능을 향상시킬 수 있다. 이때, 참조 화소 계층 설정과 관련한 다양한 설정이 가능할 수 있다.
예를 들어, 화면내 예측에 사용되는 참조 화소 세트가 묵시적으로 결정되거나 또는 사용되는 참조 화소 세트 관련한 정보가 명시적으로 생성될 수 있다. 상세하게는, 기 설정된 적어도 하나의 참조 화소 세트가 참조 화소로 구성되거나 또는 참조 화소 세트 선택 정보로 인해 결정되는 적어도 하나의 참조 화소 세트를 참조 화소로 구성할 수 있다. 위의 과정을 통해 ref_0, ref_1, ref_2, ref_0 + ref_1, ref_0 + ref_2, ref_1 + ref_2, ref_0 + ref_1 + ref_2와 같은 참조 화소 세트가 현재 블록의 참조 화소로 구성될 수 있다.
또한, 참조 화소로 구성되는 참조 화소 세트의 개수가 하나인 경우와 둘 이상인 경우로 구분할 수 있다. 전자의 경우 하나의 참조 화소 세트에 위치하는 화소를 사용하여 예측 블록을 생성하는 것을 의미하고, 후자의 경우 각 참조 화소 세트에 위치하는 적어도 하나의 화소를 사용(예를 들어, 둘 이상의 참조 화소 세트가 참조 화소로 구성된 경우 각 참조 화소 세트에 위치하는 화소값<이 값 또한 각 참조 화소 세트에서 하나의 화소 또는 복수의 화소로부터 유도된 값일 수 있음>의 중앙값, 가중치 평균 등을 통해 유도되는 값)하여 예측 블록을 생성하는 것을 의미한다.
예를 들어, 제 1 참조 화소 세트에 위치한 화소(본 예에서 ref_0)와 제 2 참조 화소 세트(본 예에서 ref_1)에 위치한 화소의 가중치 합을 통해 획득된 참조 화소를 사용하여 예측 블록을 생성할 수 있다. 이때, 각 참조 화소 세트에서 가중치 합이 적용되는 화소의 경우 예측 모드(예를 들어, 예측 모드 방향성 등)에 따라 정수 단위 화소뿐만 아니라 소수 단위 화소일 수도 있다. 또는, 제 1 참조 화소 세트에 위치한 화소를 참조 화소로 사용하여 획득되는 예측 블록과 제 2 참조 화소 세트에 위치한 화소를 참조 화소로 사용하여 획득되는 예측 블록에 각각 가중치(예를 들어, 7:1, 3:1, 2:1, 1:1 등)를 두어 하나의 예측 블록을 획득할 수 있다.
참조 화소 구성 관련하여 명시적으로 정보가 생성되는 경우를 가정할 때 적응적인 참조 화소 구성을 허용하는 지시 정보(본 예에서 adaptive_intra_ref_sample_enabled_flag)는 비디오, 시퀀스, 픽쳐, 슬라이스, 타일 등의 단위에서 발생할 수 있다.
상기 지시 정보가 적응적인 참조 화소 구성을 허용(본 예에서 adaptive_intra_ref_sample_enabled_flag = 1)하는 것을 의미하면, 적응적인 참조 화소 구성 정보(본 예에서 adaptive_intra_ref_sample_flag)는 픽쳐, 슬라이스, 타일, 블록 등의 단위에서 발생할 수 있다.
상기 구성 정보가 적응적인 참조 화소 구성(본 예에서 adaptive_intra_ref_sample_flag = 1)을 의미하면, 참조 화소 구성 관련 정보(예를 들어, 참조 화소 세트 선택 정보 등. 본 예에서 intra_ref_idx)는 픽쳐, 슬라이스, 타일, 블록 등의 단위에서 발생할 수 있다.
이때, 적응적인 참조 화소 구성을 허용하지 않거나 적응적인 참조 화소 구성이 아닌 경우에 참조 화소는 미리 정해진 설정에 따라 구성될 수 있다. 일반적으로 이웃 블록의 가장 인접한 화소를 참조 화소로 구성하는 것이 그에 대한 예일 수 있으나, 이에 한정되지 않고 다양한 경우의 수(예를 들어, ref_0와 ref_1이 참조 화소로 구성되고 ref_0와 ref_1을 통해 가중치 합 등의 방법으로 예측 화소값을 생성하는 경우 등. 즉, 묵시적인 경우)가 가능할 수 있다.
또한, 참조 화소 구성 관련 정보(예를 들어 참조 화소 세트 선택 정보 등)는 위의 기 설정된 경우(예를 들어, ref_0인 경우)를 제외하고 후보군이 구성(예를 들어, ref_1, ref_2, ref_3 등)될 수 있으나, 역시 이에 한정되지 않는다.
상기 예를 통해 상위 단위부터 계층적인 구조 하에 설명하였지만, 이에 한정되지 않는다. 또한, 일부 경우에는 관련 정보가 묵시적으로 결정될 수도 있다. 예를 들어, 전술한 것처럼 부/복호화 설정에 따라 일부 경우에는 관련 정보가 발생할 수 있고, 일부 경우에는 관련 정보가 묵시적으로 결정되며, 일부 경우에는 혼합적인 경우가 가능할 수 있다.
상기 예를 통해 참조 화소 구성에 관한 일부 경우를 살펴보았는데, 이는 다양한 부/복호화 정보 등과 결합되어 화면내 예측 설정이 정해질 수 있다. 이때, 부/복호화 정보는 영상 타입(I/P/B), 컬러 성분, 현재 블록의 크기, 형태, 예측 모드{예측 모드의 종류(방향성, 비방향성), 예측 모드의 방향(수직, 수평, 대각선1, 대각선2 등)} 등이 해당될 수 있으며, 이웃 블록의 부/복호화 정보와 현재 블록과 이웃 블록의 부/복호화 정보 조합 등에 따라 화면내 예측 설정(본 예에서는 참조 화소 구성 설정)이 정해질 수 있다.
도 30은 참조 화소 구성에 대한 예시도이다.
도 30의 a는 하나의 참조 화소 세트가 참조 화소로 구성되는 경우이며, ref_0를 참조 화소로 구성한 후에 후속하는 화면내 예측 과정(참조 화소 생성, 참조 화소 필터링, 참조 화소 보간, 예측 블록 생성, 후처리 필터링 등. 참조 화소 세트 구성에 따라 일부 화면내 예측 과정이 적응적으로 구성될 수 있음)을 수행할 수 있다. 예를 들어, 하나의 참조 화소 세트로 참조 화소 세트 정보는 발생하지 않으며 비방향성 모드에 따른 화면내 예측 과정을 수행할 수 있다.
도 30의 b는 최대 2개의 참조 화소 세트가 참조 화소로 구성되는 경우이며, ref_0 + ref_1(그림에서 and)를 참조 화소로 구성한 후에 후속하는 화면내 예측 과정을 수행할 수 있다. 예를 들어, 복수의 참조 화소 세트지만 참조 화소 세트 정보는 발생하지 않으며 일부 예측 모드(본 예에서 오른쪽 위에서 왼쪽 아래 방향 또는 왼쪽 아래에서 오른쪽 위 방향)에 따른 화면내 예측 과정을 수행할 수 있다.
도 30의 c는 최대 1개의 참조 화소 세트가 참조 화소로 구성되는 경우이며, ref_0 또는 ref_1 또는 ref_2 중 하나(그림에서 or)를 참조 화소로 구성한 후에 후속하는 화면내 예측 과정을 수행할 수 있다. 예를 들어, 복수의 참조 화소 세트라서 참조 화소 세트 정보가 발생하며 일부 예측 모드(본 예에서 왼쪽 위에서 오른쪽 아래 방향)에 따른 화면내 예측 과정을 수행할 수 있다.
정리하면, 도 30의 b와 c는 참조 화소 세트는 각각 2개, 3개가 지원되는 경우(다른 표현으로 참조 화소 후보군이 각각 2개, 3개인 경우)이며, b는 참조 화소로 구성되는 참조 화소 세트는 최대 2개(예를 들어, 각 참조 화소 세트의 화소값들의 가중치 평균 등으로 유도)이고 c는 참조 화소로 구성되는 참조 화소 세트는 최대 1개(예를 들어, 3개의 후보군 중 선택된 하나의 참조 화소 세트의 화소값에서 유도)인 것을 의미한다.
도 31은 참조 화소 구성에 대한 예시도이다.
도 31의 a는 블록 크기가 64 x 64 이상일 때 하나의 참조 화소 세트가 참조 화소 후보군인 경우를 나타내며, 도 31의 b는 블록 크기가 16 x 16 이상 ~ 64 x 64 미만일 때 2개의 참조 화소 세트가 참조 화소 후보군(참조 화소로 사용되는 참조 화소 세트는 최대 2개라는 것을 의미. 즉, 도 30의 b와 c가 모두 가능하다고 이해될 수 있음. 이하 동일)인 경우를 나타내며, 도 31의 c는 블록 크기가 16 x 16미만일 때 3개의 참조 화소 세트가 참조 화소 후보군(참조 화소로 사용되는 참조 화소 세트는 최대 3개라는 것을 의미)인 경우를 나타낸다. 본 예에서는 현재 블록의 크기가 클수록 이웃 블록의 크기는 작을 확률이 높아지는데, 이는 다른 영상 특성으로 인한 분할의 결과일 수 있기 때문에, 현재 블록과 화소값 거리가 큰 화소로부터 예측을 수행하는 것을 방지하고자 하는 목적으로 블록의 크기가 커질수록 참조 화소 세트 후보 개수가 줄어드는 경우를 가정하지만, 그 반대의 경우도 가능하며 이에 한정되지 않고 다양한 변형의 예가 가능할 수 있다.
도 32는 참조 화소 구성에 대한 예시도이다.
도 32는 블록의 형태가 직사각(본 예에서 가로로 긴 형태)인 경우에 길이가 긴 쪽에는 복수의 참조 화소 세트가 참조 화소 후보군인 경우, 길이가 짧은 쪽에는 하나의 참조 화소 세트가 참조 화소 후보군인 경우를 나타낸다. 본 예에서는 길이가 짧은 쪽이 하나의 참조 화소 세트로 구성되는 경우를 가정하지만, 길이가 긴 쪽보다 적은 개수로 구성되는 예로 이해될 수 있고, 또한, 개수에 대한 구성이 그 반대의 경우 또한 가능할 수 있다. 본 예는 블록의 형태가 직사각일 때 짧은 길이를 갖는 참조 화소는 현재 블록과 거리가 먼 경우가 많이 발생하여 예측의 정확도가 감소되는 것을 방지하고자 하는 목적으로 설정된 예일 수 있지만, 이에 한정되지 않는다.
예를 들어, 블록의 위쪽, 오른쪽 위의 참조 화소를 사용하여 예측되는 방향성 모드의 경우 복수의 참조 화소 세트를 사용(도 30의 b와 c의 경우가 모두 가능)하여 예측을 수행할 수 있고, 블록의 왼쪽, 왼쪽 아래의 참조 화소를 사용하여 예측되는 방향성 모드의 경우 단수의 참조 화소 세트를 사용하여 예측을 수행할 수 있다. 즉, 하나의 블록에서 이웃 블록에 따라 적응적으로 참조 화소 세트가 적응적으로 결정되는 경우일 수 있다.
복수의 참조 화소 세트 중 하나의 참조 화소 세트가 참조 화소로 구성되는 경우에 대한 일 예로, 각 참조 화소 세트가 동일하거나 비슷한 경우에는 참조 화소 구성 정보(예를 들어, 참조 화소 선택 정보, 적응적인 참조 화소 허용 정보 등)를 생성하는 것은 중복적으로 정보가 발생하는 상황일 수 있다. 예를 들어, 각 참조 화소 세트의 참조 화소 분포 특성(예를 들어, 각 참조 화소 세트의 평균, 분산 등으로 판단. 일 예로, 앞선 과정에서 획득된 값과 경계값<Threshold>과의 비교를 통해 판단할 수 있음. 즉, 어떤 참조 화소 세트를 사용하더라도 동일하거나 거의 비슷한 예측 블록이 생성된다고 판단되면 관련 정보를 생략할 수 있음. 본 예는 최종 선정된 예측 모드에 한하여 비교될 수 있음)이 동일하거나 비슷하다고 판단되는 상황에는 참조 화소 구성 정보는 생략될 수 있다. 이 경우 미리 설정된 방법(예를 들어, 가장 인접한 참조 화소 세트)으로 참조 화소를 구성할 수 있다. 복호화기에서는 화면내 예측 정보를 수신(예를 들어, 화면내 예측 모드 정보 등)하여 참조 화소 구성 정보를 수신할 지 여부에 대해 부호화기와 동일한 판단이 가능할 수 있고, 이 판단에 기반하여 참조 화소 구성 정보 수신 여부를 결정할 수 있다.
상기 다양한 예를 통해 복수의 참조 화소 세트가 참조 화소로 구성되는 경우를 나타내었지만, 이에 한정되지 않고 다양한 변형의 예가 가능하며 다른 추가적인 구성과 결합되어 나타낼 수도 있다.
화면내 예측의 참조 화소 구성부는 참조 화소 생성부, 참조 화소 보간부, 참조 화소 필터부 등을 포함할 수 있으며, 상기 구성의 전부 또는 일부를 포함하여 구성할 수 있다.
참조 화소 구성부에서 참조 화소 사용 가능성(Availability)을 확인하여 사용 가능한 참조 화소와 사용 불가한 참조 화소를 분류할 수 있다. 예를 들어, 기 설정된 위치의 블록(또는 참조 화소 후보 블록)이 사용 가능한 경우 해당 블록을 참조 화소로 사용할 수 있고, 사용 불가한 경우 해당 블록을 참조 화소로 사용할 수 없다.
상기 참조 화소 사용 가능성은 다음의 조건 중 적어도 하나를 만족하는 경우에 사용 불가로 판단한다. 예를 들어, 픽쳐 경계 바깥에 위치하는 경우, 현재 블록과 동일한 분할 단위(예를 들어, 슬라이스, 타일 등)에 속하지 않는 경우, 부/복호화가 완료되지 않은 경우, 부/복호화 설정에 따라 사용이 제한되는 경우 중 하나라도 만족하는 경우에는 사용 불가로 판단할 수 있다. 즉, 상기 조건을 하나도 만족하지 않는 경우에는 사용 가능으로 판단할 수 있다.
또한, 부/복호화 설정에 의해 참조 화소 사용을 제한할 수 있다. 예를 들어, 제한된 화면내 예측(예를 들어, constrained_intra_pred_flag)의 수행 여부에 따라 참조 화소 사용이 제한될 수 있다. 제한된 화면내 예측은 통신 환경 등의 외부 요인에 에러 강인한 부/복호화를 수행하고자 할 때 다른 영상으로부터 참조되어 복원된 블록을 참조 화소로 사용을 금지하고자 할 때 수행될 수 있다.
참조 화소 사용 가능성을 통해 참조 화소 후보 블록이 모두 사용 가능, 일부 사용 가능, 모두 사용 불가한 경우로 분류할 수 있다. 모두 사용 가능한 경우를 제외한 나머지 경우에는 사용 불가한 후보 블록 위치의 참조 화소를 채우거나 생성할 수 있다.
참조 화소 후보 블록이 사용 가능한 경우에는 해당 블록의 기 설정된 위치의 화소(본 예에서 현재 블록과 인접한 화소라 가정)를 현재 블록의 참조 화소 메모리에 포함할 수 있다.
참조 화소 후보 블록이 사용 불가한 경우에는 참조 화소 생성 과정을 통해 획득된 화소를 현재 블록의 참조 화소 메모리에 포함할 수 있다.
정리하면, 참조 화소 후보 블록이 사용 가능 상태인 경우 참조 화소를 구성할 수 있고, 참조 화소 후보 블록이 사용 불가 상태인 경우 참소 화소를 생성할 수 있다.
참조 화소 필터부는 일반적으로 저역 통과 필터{Low-pass Filter. 예를 들어, [1, 2, 1] / 4, [2, 3, 6, 3, 2] / 16와 같은 3-tap, 5-tap 필터 등}를 사용하여 평활화(Smoothing)하는 것이 참조 화소 필터부의 주된 목적일 수 있으나, 필터 적용 목적{예를 들어, 선명화(Sharpening) 등}에 따라 다른 종류의 필터(예를 들어, 고역 통과 필터 등)가 사용될 수 있다. 본 발명에서는 평활화를 목적으로 필터링을 수행하여 부/복호화 과정에 발생하는 열화를 줄여주는 것을 중심으로 설명한다.
참조 화소 필터링은 부/복호화 설정에 따라 수행 여부가 결정될 수 있다. 즉, 참조 화소에 필터링을 적용할 수 있거나 적용하지 않을 수 있다. 그러나 이와 같은 일괄적인 필터링 동작은 영상의 부분적인 특성을 반영하지 못하는 단점이 발생하며, 영상의 부분적인 특성을 반영하는 부/복호화 정보 등에 기반하여 필터링을 수행하는 것이 부호화 성능 향상에 좋을 수 있다.
상기 영상의 특성은 영상 타입(I/P/B), 컬러 성분(Y/Cb/Cr), 양자화 파라미터, 현재 블록의 부/복호화 정보(예를 들어, 현재 블록의 크기, 형태, 분할 정보, 예측 모드 등)뿐만 아니라 이웃 블록의 부/복호화 정보, 그리고 현재 블록과 이웃 블록의 부/복호화 정보의 조합 등에 따라 판단할 수 있다. 또한, 참조 화소 분포 특성(예를 들어, 참조 화소 영역의 분산, 표준편차 등)에 따라 판단(예를 들어, 참조 화소 영역이 평탄한 영역인지 불연속적 영역인지 등)할 수 있다. 이와 같이 영상의 특성 정보를 확인할 수 있으면 참조 화소 필터링의 적용 여부를 미리 설정할 수 있다.
또는, 참조 화소 필터링은 명시적인 설정이 가능할 수 있다. 예를 들어, 필터링 적용 여부에 대한 정보가 발생할 수 있다. 이때, 필터가 하나일 경우에는 필터 선택 정보는 발생하지 않으며, 복수의 필터 후보군이 존재하는 경우에는 필터 선택 정보가 발생할 수 있다.
상기 예를 통해 참조 화소 필터링 관련하여 묵시적인 설정과 명시적인 설정에 대해 설명하였지만, 일부 경우에는 명시적인 설정으로 정해지고, 일부 경우에는 묵시적인 설정으로 정해지는 혼합적인 경우가 가능할 수 있다. 여기서 묵시적의 의미는 복호화기에서 참조 화소 필터에 관련된 정보(예를 들어, 필터링 적용 여부 정보, 필터 종류 정보)를 유도할 수 있음을 의미한다.
참조 화소 보간부는 참조 화소의 선형 보간을 통해 소수 단위의 참조 화소를 생성할 수 있다. 본 발명에서는 참조 화소 구성부의 일부 과정으로 가정하여 설명하나, 예측 블록 생성부에 포함되어 구성될 수 있으며 예측 블록을 생성하기 전에 수행되는 과정으로 이해할 수 있다.
또한, 전술하는 참조 화소 필터부와 구분되는 별개의 과정으로 가정하지만, 하나의 과정으로 통합되어 구성될 수 있다. 이는 참조 화소 보간부와 참조 화소 필터부를 통해 복수의 필터링이 적용될 때 참조 화소에 왜곡을 발생시키는 경우를 대비하고자 하는 구성일 수도 있다.
참조 화소 보간 과정은 일부 예측 모드(예를 들어, 수평, 수직, 일부 대각선 모드<Diagonal down right, Diagonal down left, Diagonal up right와 같이 45도 각도를 이루는 모드>, 비방향성 모드, 컬러 모드, 컬러 복사 모드 등. 즉, 예측 블록 생성 시에 소수 단위의 보간이 필요 없는 모드)에는 수행하지 않으며, 그 외의 예측 모드(예측 블록 생성 시에 소수 단위의 보간이 필요한 모드)에 수행될 수 있다.
보간 정밀도(예를 들어, 1, 1/2, 1/4, 1/8, 1/16, 1/32, 1/64 등의 화소 단위)는 예측 모드(또는 예측 모드 방향성)에 따라 결정될 수 있다. 예를 들어, 45도 각도를 이루는 예측 모드의 경우 보간 과정은 필요하지 않으며, 22.5도나 67.5도 각도를 이루는 예측 모드의 경우 1/2 화소 단위의 보간이 필요하다. 위와 같이 예측 모드에 따라 적어도 하나의 보간 정밀도 및 최대 보간 정밀도가 결정될 수 있다.
참조 화소 보간을 위해 기 설정된 하나의 보간 필터(예를 들어, 2-tap 선형 보간 필터. 즉, 어떠한 경우에도 해당 보간 필터만 사용)를 사용할 수 있고, 복수의 보간 필터 후보군(예를 들어, 4-tap 큐빅 필터, 4-tap 가우시안 필터, 6-tap 위너 필터, 8-tap 칼만 필터등. 즉, 부/복호화 설정에 따라 적용되는 보간 필터가 결정되어 사용) 중 하나를 사용할 수 있다. 이때, 보간 필터는 필터 tap의 수(즉, 필터링이 적용되는 화소의 개수), 필터 계수 등의 차이로 구분될 수 있다.
보간은 낮은 정밀도에서 높은 정밀도 순서(예를 들어, 1/2 -> 1/4 - 1/8)와 같이 단계별로 수행되는 예가 가능할 수 있고, 일괄적으로 수행되는 예가 가능할 수 있다. 전자의 경우는 정수 단위의 화소와 소수 단위의 화소(본 예에서는 현재 보간하고자 하는 화소보다 낮은 정밀도로 앞서 보간된 화소)를 기반으로 보간을 수행하는 것(즉, 보간을 위해 정수 단위뿐만 아니라 소수 단위의 화소를 사용한다는 것을 의미)을 의미하고, 후자의 경우는 정수 단위의 화소를 기반으로 보간을 수행하는 것(즉, 보간을 위해 정수 단위의 화소만 사용한다는 것을 의미)을 의미한다.
복수의 필터 후보군 중 하나를 사용하는 경우 필터 선택 정보를 명시적으로 생성할 수 있거나 또는 묵시적으로 정할 수 있으며, 부/복호화 설정(예를 들어, 보간 정밀도, 블록의 크기, 형태, 예측 모드 등)에 따라 정해질 수 있다. 이때, 명시적으로 생성되는 단위는 비디오, 시퀀스, 픽쳐, 슬라이스, 타일, 블록 등이 해당된다.
예측 블록 생성부에서 적어도 하나의 예측 모드에 따라 예측 블록을 생성할 수 있으며, 상기 예측 모드에 기반하여 참조 화소를 사용할 수 있다. 이때, 참조 화소는 예측 모드에 따라 외삽(Extrapolation) 등의 방법(방향성 모드)에 사용될 수 있고, 내삽(Interpolation) 또는 평균(DC) 또는 복사(Copy) 등의 방법(비방향성 모드)에 사용될 수 있다.
또한, 참조 화소의 복사(copy) 방식으로 예측 블록을 생성할 수 있다. 참조 화소의 복사의 경우 하나의 참조 화소를 복사하여 하나 이상의 예측 화소를 생성할 수도 있고, 하나 이상의 참조 화소를 복사하여 하나 이상의 예측 화소를 생성할 수 있으며, 복사한 참조 화소의 개수는 복사된 예측 화소의 개수와 동일하거나 적을 수 있다.
또한, 예측 블록은 예측 블록 생성 과정을 통해 획득되는 하나의 예측 블록으로 구성되는 것이 일반적일 수 있으나, 복수의 예측 블록을 획득하여 이를 가중치 합 등을 적용하여 하나의 최종 예측 블록을 획득하는 예가 가능할 수 있다. 여기서 복수의 예측 블록은 참조 화소 세트에 따라 획득되는 예측 블록을 의미할 수 있으며, 그 밖의 경우 또한 가능할 수 있다.
예측 모드 결정부에서는 복수의 예측 모드 후보군 중 최적의 모드를 선정하기 위한 과정이 수행된다. 일반적으로 블록의 왜곡{예를 들어, 현재 블록과 복원 블록의 Distortion. SAD(Sum of Absolute Difference), SSD(Sum of Square Difference 등}과 해당 모드에 따른 발생 비트량이 고려되는 율-왜곡(Rate-Distortion) 기법을 이용하여 부호화 비용 측면에서 최적인 모드를 결정할 수 있다. 상기 과정을 통해 결정되는 예측 모드에 기반하여 생성되는 예측 블록을 감산부와 가산부로 송신할 수 있다.
예측 모드 부호화부에서는 예측 모드 결정부를 통해 선정된 예측 모드를 부호화할 수 있다. 예측 모드 후보군에서 상기 예측 모드에 대응하는 인덱스 정보를 부호화할 수 있거나 또는 상기 예측 모드를 예측하여 그에 관한 정보를 부호화할 수 있다. 즉, 전자의 경우는 예측 모드를 예측 없이 그대로 부호화하는 방법을, 후자의 경우는 예측 모드의 예측을 수행하여 모드 예측 정보와 그에 기반하여 획득되는 정보를 부호화하는 방법을 의미한다. 또한, 전자의 경우는 색차 성분, 후자의 경우 휘도 성분에 적용될 수 있는 예이며, 이에 한정되지 않고 그 외의 경우 또한 가능할 수 있다.
예측 모드를 예측하여 부호화하는 경우에 예측 모드의 예측값(또는 예측 정보)을 MPM(Most Probable Mode)으로 지칭할 수 있다. 이때, 기 설정된 예측 모드(예를 들어, DC, Planar, 수직, 수평, 대각선 모드 등) 또는 공간적으로 인접한 블록(예를 들어, 좌, 상, 좌상, 우상, 좌하 블록 등)의 예측 모드 등을 MPM으로 구성할 수 있다. 본 예에서 대각선 모드는 Diagonal up right, Diagonal down right, Diagonal down left를 의미하고, 도 9의 2번, 34번, 66번 모드에 대응되는 모드일 수 있다.
또한, MPM 후보군에 기 포함된 모드로부터 유도되는 모드를 MPM 후보군으로 구성할 수 있다. 예를 들어, MPM 후보군에 포함된 모드 중 방향성 모드의 경우, 모드 간격이 a의 차이를 갖는 모드(예를 들어, a는 1, -1, 2, -2 등과 같은 0이 아닌 정수. 도 9에서 10번 모드가 기 포함된 모드인 경우 9번, 11번, 8번, 12번 모드 등이 유도되는 모드에 해당)를 새롭게(또는 추가적으로) MPM 후보군에 포함할 수 있다.
상기 예는 MPM 후보군이 복수 개의 모드로 구성되는 경우에 해당할 수 있으며, MPM 후보군 구성(예를 들어, MPM 후보군 개수, 구성 우선 순위)은 부/복호화 설정(예를 들어, 예측 모드 후보군, 영상 타입, 블록 크기, 블록 형태 등)에 따라 정해지며 적어도 하나의 모드를 포함하여 구성될 수 있다.
MPM 후보군 구성을 위한 예측 모드의 우선 순위가 존재할 수 있다. 상기 우선 순위에 따라 MPM 후보군에 포함되는 예측 모드 순서가 정해질 수 있으며, 상기 우선 순위에 따라 MPM 후보군의 개수만큼 채워지면 MPM 후보군 구성을 완료할 수 있다. 이때, 공간적으로 인접한 블록의 예측 모드, 기 설정된 예측 모드, MPM 후보군에 먼저 포함된 예측 모드로부터 유도되는 모드 순서로 우선 순위가 정해질 수 있으나, 그 외의 변형 또한 가능하다.
예를 들어, 공간적으로 인접한 블록 중에서는 좌 - 상 - 좌하 - 우상 - 좌상 블록 등의 순서로 후보군에 포함할 수 있고, 기 설정된 예측 모드 중에서는 DC - Planar - 수직 - 수평 모드 등의 순서로 후보군에 포함할 수 있고, 기 포함된 모드에서 +1, -1 등을 가산하여 획득된 예측 모드를 후보군에 포함할 수 있다. 또는, 좌 - 상 - DC - Planar - 좌하 - 우상 - 좌상 - 좌+1 - 좌-1 - 상+1 등의 하나의 우선 순위로 예측 모드를 후보군에 포함할 수 있다.
MPM을 사용하여 현재 블록의 예측 모드 부호화를 수행하는 경우 예측 모드가 MPM과 일치하는지 여부에 대한 정보(예를 들어, most_probable_mode_flag)를 생성할 수 있다.
MPM과 일치하는 경우(예를 들어, most_probable_mode_flag = 1)에는 MPM의 구성에 따라 MPM 인덱스 정보(예를 들어, mpm_idx)를 추가로 생성할 수 있다. 예를 들어, MPM이 하나의 예측 모드로 구성되는 경우에는 추가적인 MPM 인덱스 정보는 생성하지 않으며, 복수의 예측 모드로 구성되는 경우에는 MPM 후보군에서 현재 블록의 예측 모드에 대응하는 인덱스 정보를 생성할 수 있다.
MPM과 일치하지 않는 경우(예를 들어, most_probable_mode_flag = 0)에는 예측 모드 후보군에서 MPM 후보군을 제외한 나머지 예측 모드 후보군(또는 non-MPM 후보군)에서 현재 블록의 예측 모드에 대응하는 non-MPM 인덱스 정보(예를 들어, non_mpm_idx)를 생성할 수 있으며, 이는 non-MPM이 하나의 그룹으로 구성되는 경우에 해당하는 예일 수 있다.
non-MPM 후보군이 복수의 그룹으로 구성되는 경우에 현재 블록의 예측 모드가 어떤 그룹에 속하는지에 대한 정보를 생성할 수 있다. 예를 들어, non-MPM은 A와 B 그룹으로 구성되며 현재 블록의 예측 모드가 A 그룹의 예측 모드와 일치하는 경우(예를 들어, non_mpm_A_flag = 1)에는 A 그룹 후보군에서 현재 블록의 예측 모드에 대응하는 인덱스 정보를 생성할 수 있으며, 일치하지 않는 경우(예를 들어, non_mpm_A_flag = 0)에는 나머지 예측 모드 후보군(또는 B 그룹 후보군)에서 현재 블록의 예측 모드에 대응하는 인덱스 정보를 생성할 수 있다. 상기 예와 같이 non-MPM은 적어도 하나의 예측 모드 후보군(또는 그룹)으로 구성이 될 수 있으며, 예측 모드 후보군에 따라 non-MPM 구성이 정해질 수 있다. 예를 들어, 예측 모드 후보군이 35개 이하일 경우에는 1개, 그 이외의 경우에는 2개 이상일 수 있다.
이때, A 그룹은 MPM 후보군 다음으로 현재 블록의 예측 모드와 일치할 확률이 높다고 판단되는 모드를 후보군으로 구성할 수 있다. 예를 들어, MPM 후보군에 포함되지 못한 다음 순위의 예측 모드들을 A 그룹에 포함시킬 수 있거나 또는 일정한 간격을 갖는 방향성을 갖는 예측 모드들을 A 그룹에 포함시킬 수 있다.
상기 예와 같이 non-MPM이 복수의 그룹으로 구성되는 경우는 예측 모드의 개수가 많고 예측 모드가 MPM으로 예측되지 않을 경우에 모드 비트량을 줄이고자 하는 목적으로 지원될 수 있다.
MPM을 사용하여 현재 블록의 예측 모드 부호화(또는 예측 모드 복호화)를 수행하는 경우 각 예측 모드 후보군(예를 들어, MPM 후보군, non-MPM 후보군 등)에 적용되는 이진화 테이블은 개별적으로 생성될 수 있으며, 각 후보군에 따라 적용되는 이진화 방법 또한 개별적으로 적용될 수 있다.
상기 예에서 MPM 후보군, non-MPM 후보군 등과 같은 용어는 본 발명에서 사용되는 일부 용어일 뿐 이에 한정되지 않는다. 상세하게는, 현재 화면내 예측 모드를 복수의 카데고리로 분류하여 어떤 카테고리에 속했는지에 대한 정보와 해당 카테고리 내 모드 정보로 표현하는 것으로, 다른 표현으로 1차 MPM 후보군, 2차 MPM 후보군 등의 용어로 사용되는 것 또한 가능할 수 있다.
예측 모드 부호화부를 통해 생성되는 예측 관련 정보는 부호화부로 전송되어 비트스트림에 수록될 수 있다.
다음은 하나 이상의 참조 화소 세트가 참조 화소 후보군으로 구성될 때 하나의 참조 화소 세트를 사용하는 경우와 둘 이상의 참조 화소 세트를 사용하는 경우로 구분할 수 있다.
(1) 하나의 참조 화소 세트가 사용되는 경우
본 예에서는 복수의 참조 화소 세트가 후보군으로 구성되는 경우에서 하나의 참조 화소 세트(도 29에서 ref_0, ref_1, ref_2 중 하나)가 선택되어 화면내 예측에 사용되는 경우를 가정한다.
하나의 참조 화소 세트를 사용하여 화면내 예측을 수행할 때는 다음과 같은 경우가 가능할 수 있다.
참조 화소 세트 ref를 사용하여 참조 화소 생성, 참조 화소 필터링, 참조 화소 보간 등의 예측 전 처리 과정을 거쳐 획득된 ref*를 사용하여 예측 블록 P를 생성할 수 있다.
예를 들어, 참조 화소 필터부를 통해 ref에 위치하는 화소에 5-tap 저역 통과 필터링이 적용되고, 참조 화소 보간부를 통해 ref'(즉, 참조 화소 필터링 이후 화소)에 위치하는 화소에 6-tap 선형 보간 필터링이 적용될 수 있다. 그리고 상기 과정을 통해 획득된 ref*를 사용하여 예측 블록을 생성할 수 있다.
다음을 통해 하나의 참조 화소 세트를 사용할 때의 예측 전 처리 과정을 살펴본다.
예를 들어, 도 29에서 참조 화소 세트 ref_2를 사용할 때 Ref_TL과 Ref_TR 위치는 참조 화소로 사용 가능하고 Ref_T 위치는 참조 화소로 사용 불가한 경우, 사용 가능한 참조 화소 중 인접한 P(-1, -3)과 P(n, -3)를 통해 Ref_T 위치의 P(0, -3) ~ P(n-1, -3) 위치의 화소를 생성하여 참조 화소로 구성할 수 있다.
위의 과정을 통해 참조 화소를 구성한 후에 참조 화소 필터부와 참조 화소 보간부 등의 과정이 예측 블록 생성 전에 수행될 수 있다.
참조 화소 필터부의 경우 대상 화소를 중심으로 인접한 화소에 필터링을 적용할 수 있는데, 일반적으로 필터에 적용되는 화소의 개수가 증가할 때 더 정교한 필터링 효과(예를 들어, 평활화, 선명화 등)가 발생할 수 있다.
참조 화소 보간부의 경우 보간하고자 하는 화소를 중심으로 인접한 화소에 필터링을 적용할 수 있는데, 역시 필터에 적용되는 화소의 개수가 증가할 때 더 정교한 필터링 효과가 발생할 수 있다.
상기 두 단계는 모두 필터링을 수행하는 과정으로 경우에 따라 불필요한 필터링 효과가 발생할 수 있다. 즉, 각 단계에서 필터링을 적용할 때 원하고자 하는 효과가 다른 단계에서 필터링을 적용할 때 역효과가 발생하는 경우 또한 발생할 수 있다.
예를 들어, 참조 화소 보간 과정 중에 보간 대상 소수 화소는 인접한 정수 화소에 필터링을 적용할 수 있는데, 본 예에서의 이전 단계에서 참조 화소 필터링을 적용한 경우(즉, 정수 단위 화소에)를 가정하자. 참조 화소 필터링을 통해 각 정수 화소의 양자화 에러를 줄이는 효과가 발생할 수 있는데, 참조 화소 보간 과정에 상기 화소들이 사용되어 오히려 보간되는 화소에 역으로 양자화 에러가 더 포함되는 경우가 발생할 수도 있다.
(S1. Ref smoothing process)
m* = v0 x l' + v1 x m' + v2 x n'
m* = m + k1
(m은 원본 화소, m*은 필터링 후 화소, m'은 필터링 전 화소, l'과 n'은 인접한 필터링 전 화소, v는 필터 계수, k1은 양자화 에러)
(S2. Interpolation process)
z* = (w0 x a' + w1 x b' + w2 x c' + w3 x d' + w4 x e' + w5 x f')
z* = z + k2
(z는 해당 위치의 원본이라 추정되는 화소, z*는 보간 화소. a' ~ f'는 인접 화소<필터링 되지 않음>, w는 필터 계수, k2는 양자화 에러)
(S3. Ref smoothing process + Interpolation process)
z** = (w0 x a* + w1 x b* + w2 x c* + w3 x d* + w4 x e* + w5 x f*)
z** = z + k3
(z는 해당 위치의 원본이라 추정되는 화소, z**는 보간 화소. a* ~ f*는 인접한 필터링 후 화소, w는 필터 계수, k3는 양자화 에러)
위의 식에서 참조 화소 필터링 과정(S1)의 입력 화소값은 부/복호화가 완료된 이웃 블록의 인접 화소이며, 상기 과정을 통해 얻은 출력값은 부/복호화시에 포함된 양자화 에러를 줄인 원본에 가까울 가능성이 높은 화소이다.
또한, 참조 화소 보간 과정(S2)의 입력 화소값은 부/복호화가 완료된 이웃 블록의 인접 화소이며, 상기 과정을 통해 얻은 출력값은 해당 화소 위치의 원본 화소값에 근접할 가능성이 높은 화소이다. 이 과정을 통해 양자화 에러가 포함된 이웃 블록의 인접 화소에 가중치를 적용하여 보간 화소가 획득되는 것(즉, 양자화 에러를 줄이기 위한 목적으로 필터링이 적용되는 것이 아니지만 상기 과정을 통해 양자화 에러 또한 줄 수 있다는 가정)이기 때문에 양자화 에러 또한 줄인 원본에 가까운 화소가 획득될 가능성이 존재한다. 즉, 소수 단위 화소의 생성뿐만 아니라 저역 통과 필터 효과가 존재할 수 있다.
한편, 상기 각 과정이 차례로 발생하는 경우(S3)에 각 과정에서 획득하고자 하는 효과가 그대로 유지될 지에 대한 부분은 고려할 필요가 존재한다. 즉, 필터링의 수행 여부(하나만 수행할 지 둘 다 수행할 지 등), 필터 종류(더 좋은 효과를 내는 필터를 사용한다던지 조금 좋은 효과를 내는 필터를 사용한다던지. 즉, 해당 과정에서 좋은 효과를 낸다하더라도 다른 과정에서 그효과가 없어지던지 또는 역으로 안 좋은 결과를 유도하던지), 필터 탭수 증가 등이 결과적으로 꼭 좋은 필터링 효과를 보장하지 않을 수 있기 때문이다.
(2) 둘 이상의 참조 화소 세트가 사용되는 경우
본 예에서는 복수의 참조 화소 세트가 후보군으로 구성되어 둘 이상의 참조 화소 세트(도 29에서 ref_1, ref_2, ref3 중 둘 이상)가 선택되어 화면내 예측에 사용되는 경우를 가정한다.
복수의 참조 화소 세트를 사용하여 화면내 예측을 수행할 때는 다음과 같은 경우가 가능할 수 있다.
<1> 도 33의 a와 같이 참조 화소 세트 ref_A을 통해 첫번째 예측 블록을 생성할 수 있다. 즉, ref_A을 사용하여 참조 화소 생성, 참조 화소 필터링, 참조 화소 보간 등의 예측 전 처리 과정을 거쳐 획득된 ref_A*을 사용하여 예측 블록 PA을 생성할 수 있다. 그리고 ref_B의 상기 예측 전 처리 과정을 거쳐 획득된 ref_B*를 사용하여 예측 블록 PB를 생성할 수 있다.
상기 획득된 복수의 예측 블록을 통해 최종 예측 블록 P를 생성할 수 있다.
예를 들어, 참조 화소 필터부를 통해 ref_A에 위치하는 화소에 3-tap 저역 통과 필터링이 적용되고, 참조 화소 보간부를 통해 ref_A'(즉, 참조 화소 필터링 이후 화소)에 위치하는 화소에 4-tap Cubic 필터링이 적용될 수 있다. 또한, ref_B에 위치하는 화소에 5-tap 저역 통과 필터링이 적용되고, ref_B'(즉, 참조 화소 필터링 이후 화소)에 위치하는 화소에 6-tap 선형 보간 필터링이 적용될 수 있다.
그리고 상기 과정을 통해 획득된 ref_A*와 ref_B*를 사용하여 각각의 예측 블록을 생성한 후 가중치 평균(예를 들어, 현재 블록에 인접한 예측 블록에 높은 가중치. 3:1 등) 등을 적용하여 예측 블록을 생성할 수 있다.
<2> 도 33의 b와 같이 참조 화소 세트 ref_A와 ref_B를 통해 예측 블록을 생성할 수 있다. 이때, ref_A와 ref_B를 사용하여 참조 화소 생성, 참조 화소 필터링. 참조 화소 보간 등의 예측 전 처리 과정을 거쳐 획득된 ref*를 사용하여 예측 블록 P를 생성할 수 있다.
예를 들어, 참조 화소 필터부를 통해 ref_A에 위치하는 화소에 3-tap 저역 통과 필터링이 적용되고, 참조 화소 보간부를 통해 ref_A'에 위치하는 화소에 4-tap Cubic 필터링이 적용될 수 있다. 또한, ref_B에 위치하는 화소에 5-tap 저역 통과 필터링이 적용되고, ref_B'에 위치하는 화소에 2-tap 선형 보간 필터링이 적용될 수 있다.
그리고 상기 과정을 통해 획득된 ref_A*와 ref_B*를 사용하여 ref*를 획득한 후 예측 블록을 생성할 수 있다. 즉, 예측 모드에 따라 각 참조 화소 세트에서 화면내 예측 모드의 방향성에 대응되는 화소값(예로, ref_A*에서 pa, ref_B*에서 pb)을 획득한 후 가중치 평균(예로, pa x A + pb x B) 등을 적용하여 예측 블록을 생성할 수 있다.
위의 <1>과 <2> 등의 방법(<1>은 각 참조 화소 세트에서 예측 블록 생성 후 나중에 예측 블록 간의 가중치 평균을 적용하는 것이고, <2>는 하나의 예측 블록 생성에서 화소 간의 가중치 평균을 적용하는 것. 즉, 동일하거나 비슷한 결과를 얻지만 과정에서의 차이가 존재)을 통해 둘 이상의 참조 화소 세트를 사용하여 예측 블록을 생성할 수 있다.
다음을 통해 둘 이상의 참조 화소 세트를 사용할 때의 예측 전 처리 과정을 살펴본다.
예를 들어, 도 29에서 참조 화소 세트 ref_1과 ref_2를 사용할 때 Ref_TL과 Ref_TR 위치는 참조 화소로 사용 가능하고 Ref_T 위치는 참조 화소로 사용 불가한 경우, 참조 화소 세트 ref_1에서 사용 가능한 참조 화소 중 인접한 P(-1, -1)과 P(n, -1)를 통해 ref_1에서 Ref_T 위치의 P(0, -1) ~ P(n-1, -1) 위치의 화소를 생성하고, 참조 화소 세트 ref_2에서 사용 가능한 참조 화소 중 인접한 P(-1, -2)과 P(n, -2)를 통해 ref_2에서 Ref_T 위치의 P(0, -2) ~ P(n-1, -2) 위치의 화소를 생성할 수 있다.
또는, ref_1의 사용 불가한 화소 위치에 ref_1뿐만 아니라 ref_2의 사용 가능한 화소를 사용하여 생성할 수 있고, ref_2의 사용 불가한 화소 위치에도 위와 같이 ref_2와 ref_1의 사용 가능한 화소를 사용하여 생성할 수 있다.
참조 화소 필터부의 경우 대상 화소를 중심으로 인접한 화소에 필터링을 적용할 수 있고, 참조 화소 보간부의 경우 보간하고자 하는 화소를 중심으로 인접한 화소에 필터링을 적용할 수 있다.
본 예에서도 (1)의 하나의 참조 화소 세트를 사용하여 예측 블록을 생성하는 경우에서 언급한 것과 같이 필터링 적용에 역효과가 발생할 수 있다.
(1)에서의 과정에 이어 추가로 (2)의 <1> 경우를 가정하여 설명한다.
(S4. Intra prediction process)
P = v0 x P1 + v1 + P2
위의 식에서 각 참조 화소 세트를 사용하여 획득되는 예측 블록에 가중치 합을 통해 최종 예측 블록을 획득하는 과정을 나타낸다. 즉, 각 참조 화소 세트에서 S3 과정을 거쳐서 획득된 값들로 예측 블록을 획득하고, 그 예측 블록들의 가중치 합을 적용함으로써 예측 블록의 정확도가 높아질 지에 대한 부분도 고려할 필요가 존재한다.
(1)과 (2)를 통해 고려해볼 필요가 존재하는 문제에 대해서는 명시적으로 복수의 후보군(예를 들어, 참조 화소 필터 관련 후보군인 <No filtering or 3-tap filtering or 5-tap filtering> 중 하나를 선택하고, 참조 화소 보간 관련 후보군인 <4-tap filtering or 6-tap filtering> 중 하나를 선택함) 중 하나를 선택하게 하는 방법이 하나의 해결책이 될 수 있으며, 다음을 통해 묵시적으로 결정하는 최적의 방법에 대한 부분을 살펴본다.
다음의 실시예를 통해 하나의 참조 화소 세트를 사용하거나 둘 이상의 참조 화소 세트를 사용하여 예측 블록을 생성하는 경우에 화면내 예측 과정을 살펴본다.
(3) 하나의 참조 화소 세트가 사용되는 경우 예측 전 처리 과정
도 34의 a와 같이 예측에 사용되는 참조 화소를 위한 임시 메모리가 필요할 수 있으며, 1차 또는 2차 배열을 가질 수 있다. 본 예에서는 그림과 같은 1차 배열을 통해 참조 화소를 구성한다고 가정한다.
그림에서와 같이 예측에 사용되는 참조 화소 세트에 위치하는 화소를 사용하여 ref에 채울 수 있다. 이때, 참조 화소 생성부 등과 같이 참조 화소를 구성 또는 생성하여 ref를 구성한 후에 참조 화소 필터부를 거칠 수 있다. 참조 화소 필터부를 통해 획득되는 참조 화소는 ref'라고 표현한다. 이 후 ref'에 참조 화소 보간 과정을 거쳐서 획득되는 참조 화소는 ref*라고 표현하며, ref*를 사용하여 예측 블록을 생성할 수 있다.
* 정수 단위 화소: ref'로 구성, 소수 단위 화소: ref'를 사용하여 보간한 ref*로 구성 (도 12의 b)
전술한 예에서 언급한 것과 같이 ref*(ref* 중 정수 단위 화소는 ref'와 동일)의 경우 참조 화소 필터 과정과 참조 화소 보간 과정이 차례로 수행되는 것이기 때문에 이 과정을 통해 획득된 정수 단위 화소를 소수 단위의 화소의 보간에 적용할 경우 중복적인 필터링으로 인한 정확도가 낮은 참조 화소가 획득될 수 있다. 그렇기 때문에 이를 분리하여 적용할 필요가 있다.
예를 들어, 참조 화소 필터링은 생략하고 참조 화소 보간 과정만 수행할 수 있다. 이 경우, 예측에 사용되는 정수 단위의 화소는 참조 화소 필터링이 적용되지 않은 기존의 인접한 화소일 수 있고, 소수 단위의 화소는 기존의 인접한 정수 단위 화소로 보간이 적용된 화소일 수 있다.
* 정수 단위 화소: ref로 구성, 소수 단위 화소: ref를 사용하여 보간한 ref*로 구성 (도 34의 c)
또는, 소수 단위의 화소를 보간할 때 사용되는 참조 화소를 ref'가 아닌 ref를 사용할 수 있다. 이 경우, 예측에 사용되는 정수 단위의 화소는 참조 화소 필터링이 적용된 화소일 수 있고, 소수 단위의 화소는 참조 화소 필터링 전의 화소인 기존의 인접한 화소로 보간이 적용된 화소일 수 있다.
* 정수 단위 화소: ref'로 구성, 소수 단위 화소: ref를 사용하여 보간한 ref*로 구성 (도 34의 d)
도 34에서 b 내지 d를 통해 ref에서 각 위치의 화소에 필터링이 적용된 횟수를 나타낸다. 도 34에서 c와 d의 경우 최대 1 번의 필터링이 적용되어 참조 화소가 구성되는 예를 나타낸다.
(4) 둘 이상의 참조 화소 세트가 사용되는 경우 예측 전 처리 과정
설명의 편의를 위해 전술한 예 중 (2)의 <2> 경우, 그리고 2개의 참조 화소 세트를 사용하여 예측 블록을 생성한다고 가정한다.
ref_A를 구성한 후 참조 화소 필터부를 거쳐 ref_A'를 획득하고, ref_A'에 참조 화소 보간 과정을 거친 후에 ref_A*를 획득할 수 있고, ref_B의 경우도 마찬가지로 ref_B'를 통해 ref_B*를 획득할 수 있으며 ref_A*와 ref_B*(즉, 도 34의 b에서 ref*)를 사용하여 예측 블록을 생성할 수 있다. 이때, 예측 모드에 따라 ref_A*와 ref_B*에 존재하는 정수 단위 화소 또는 소수 단위 화소를 사용하여 예측 블록을 생성할 수 있다.
위와 같이 ref_A*, ref_B*의 경우 각각 참조 화소 필터 과정과 참조 화소 보간 과정이 차례로 수행되는 것이기 때문에 이 과정을 통해 획득된 정수 단위 화소를 소수 단위의 화소의 보간에 적용할 경우 중복적인 필터링으로 인한 정확도가 낮은 참조 화소가 획득될 수 있다. 또한, 2개 이상의 참조 화소 세트에 위치한 화소가 가중치 합 등의 형태로 추가적인 필터링이 적용되는 것일 수 있기 때문에 최종 예측에 사용되는 화소에 너무 많은 횟수의 필터링이 적용되는 결과를 얻을 수 있다.
다음은 예측 화소에 사용되는 참조 화소의 다양한 조합을 나타낸다. 예를 들어, 예측 모드의 방향성에 따라 ref_A와 ref_B에서 2개의 정수 단위 화소를 사용하여 예측 화소를 생성(예를 들어, 수직, 수평 모드 등)할 수 있고, 1개의 정수 단위 화소와 1개의 소수 단위 화소를 사용하여 예측 화소를 생성(예를 들어, 방향성 모드 등)할 수 있고, 2개의 소수 단위 화소를 사용하여 예측 화소를 생성(예를 들어, 방향성 모드 등)할 수 있다. 이는 도 35에서 b 내지 d를 통해 확인할 수 있다.
위의 경우 도 34에서 b와 같이 단일 참조 화소 세트에 필터링이 적용되어 있는 경우로 다른 참조 화소 세트와의 가중치 평균 등이 적용되는 경우를 가정하면 도 35의 b는 필터링 적용 횟수가 2회, 도 35의 c는 3회, 도 35의 d는 4회일 수 있다.
위와 같은 경우를 위해 다음과 같은 예가 적용될 수 있다.
예를 들어, 각 참조 화소 세트에서 참조 화소 필터링은 생략하고 참조 화소 보간 과정만 수행할 수 있다. 이 경우, 예측에 사용되는 정수 단위는 참조 화소 필터링이 적용되지 않는 기존의 인접한 화소일 수 있고, 소수 단위의 화소는 기존의 인접한 정수 단위 화소로 보간이 적용된 화소일 수 있다.
상세하게는, 참조 화소 필터링의 경우 대상 화소와 비슷한 화소에 필터링을 적용하는 것이 양자화 에러를 줄이는데 더 효율적일 수 있다. 본 예에서 둘 이상의 참조 화소 세트를 사용하여 예측을 수행한다는 것은 현재 블록의 방향성이 해당 참조 화소를 포함한 블록의 경계(즉, 현재 블록과 인접한 둘 이상의 참조 화소 세트)에서도 존재한다는 것을 의미하기 때문에 기존과 같이 현재 블록의 예측 모드의 방향성과 무관하게 최인접한 화소만을 사용하여 필터링을 적용하는 것은 대상 화소와 원본 화소값 기준으로 다를지 모르는 화소들에 필터링을 적용하는 것과 마찬가지이기 때문이다.
또는, 각 참조 화소 세트에서 참조 화소 필터링과 참조 화소 보간 과정을 수행할 수 있다. 단, 도 35의 b처럼 정수 단위의 화소만 사용하여 가중치 평균을 적용할 때는 참조 화소 필터링이 적용된 화소를 사용할 수 있고, 도 35의 c처럼 정수 단위와 소수 단위의 화소를 사용하여 가중치 평균을 적용할 때 사용되는 정수 단위 화소는 참조 화소 필터링이 적용되지 않는 화소를 사용할 수 있다.
상기 예를 통해 하나의 참조 화소 세트를 사용하는 경우와 둘 이상의 참조 화소 세트를 사용하는 경우의 예측 전 처리 과정을 살펴보았다.
상기 예에서는 필터의 중복적인 사용으로 인한 역효과가 발생하는 경우를 가정하여 일부 경우를 설명하였지만, 영상의 특성을 하나로 정의하는 것은 불가능하며 다른 변형의 예가 가능할 수 있다.
예를 들어, (3)과 (4)가 고정적으로 사용되는 경우(예를 들어, 현재 블록의 크기, 형태, 예측 모드 등의 상태와 관계없이)가 가능할 수 있고, 적응적으로 사용되는 경우(예를 들어, 현재 블록의 상태에 따라 결정)가 가능할 수 있다
상기 적응적으로 사용되는 경우에는 (3)과 (4)에서 설정한 것이 전부 또는 일부에는 그대로 적용되는 경우도 있고, 일부에서는 변경되거나 반대의 예가 적용되는 경우도 가능할 수 있다.
일 예로, (3)에서 일부 모드(예를 들어, 수직, 수평, 45, 135도의 각도를 갖는 대각선 모드 등)에서는 5 tap 저역 통과 필터를 수행할 수 있다. 본 예의 경우 소수 단위의 보간 과정이 필요하지 않기 때문에 양자화 에러를 줄이기 위한 목적으로 정교한 필터링(본 예에서 tap 수가 길면 정교하다고 가정)을 수행할 수 있다.
또는, (3)에서 일부 모드(예를 들어, 방향성 모드 등)에서는 3 tap 저역 통과 필터를 수행할 수 있고, 6 tap Gaussian 보간 필터를 수행할 수 있다. 본 예의 경우 소수 단위의 보간 과정이 필요하고 정수 단위의 화소에 필터링을 적용하는 게 복수의 필터링(본 예에서 정수 단위에 참조 화소 필터링이 적용되고 이 화소들을 사용하여 소수 단위 화소를 보간할 때 필터링이 적용)의 양자화 에러 등을 줄이기 위한 목적으로 간단한 필터링(예를 들어, 필터 종류를 달리하거나 또는 필터가 적용되는 화소의 개수를 적게 한다던가. tap 수가 적으면 간단하다고 가정 하에)을 수행할 수 있다. 즉, 도 34의 b와 같은 경우(도 12의 b를 설명할 때는 기존의 경우라고 설명했지만, 본 예에서는 도 34의 c와 d가 아닌 b의 경우가 적용될 수 있음을 설명)일 수 있다.
일 예로, (3)에서 일정 크기 이상의 블록(예를 들어, 32 x 32)인 경우 5 tap 저역 통과 필터를 수행할 수 있고, 4 tap cubic 보간 필터를 수행하되 보간에 적용되는 화소는 저역 통과 필터링 전의 화소(즉, 정수 단위 화소)를 입력 화소로 할 수 있다. 또한, 일정 크기 미만의 블록인 경우 상기 과정과 동일한 참조 화소 필터링과 참조 화소 보간 과정을 수행하되 보간에 적용되는 화소는 저역 통과 필터링 후의 화소를 입력 화소로 할 수 있다.
일 예로, (4)에서 일부 모드(예를 들어, 수직, 수평 모드 등)에서는 각 참조 화소 세트에 5 tap 저역 통과 필터(즉, 다른 방향성 모드에서는 3 tap 필터를 쓰는 것일 때와 비교하면 더 정교한 필터. 또는 동일한 tap 수를 갖더라도 다른 종류의 필터 사용)를 수행할 수 있다. 본 예에서는 보간 과정이 필요하지 않기 때문에 양자화 에러를 줄이기 위한 목적으로 필터링을 수행할 수 있다. 또는, 현재 블록에 인접한 참조 화소 세트에는 5 tap 저역 통과 필터를, 그 다음 인접한 참조 화소 세트에는 3-tap 저역 통과 필터를 수행할 수 있다. 본 예에서는 둘 이상의 참조 화소 세트 중에 가중치가 더 높게 할당되는 참조 화소 세트(본 예에서는 현재 블록에 가까운 것에 가중치를 더 주는 가정)에 정교한 필터링을 수행할 수 있다. 또는, 현재 블록에 인접한 참조 화소 세트에는 5-tap 저역 통과 필터를 수행하고 그 다음 인접한 참조 화소 세트에는 저역 통과 필터를 수행하지 않는다. 본 예에서는 가중치가 더 높은 참조 화소 세트의 화소가 중심이 되어 해당 화소가 속한 참조 화소 세트에 인접한 화소와 다른 참조 화소 세트 중 해당 화소와 인접한 화소에 저역 통과 필터를 적용하는 경우를 변경 적용하는 예(즉, 기존의 경우 1D 필터링 이었다면, 본 예에서는 2D 필터링 개념으로 이해 가능)로 이해될 수 있다.
또는, (4)에서 일부 모드(예를 들어, 방향성 모드 등)에서는 각 참조 화소 세트에 참조 화소 세트에 3 tap 저역 통과 필터를 수행하고, 현재 블록에 인접한 참조 화소 세트에는 8 tap cubic 보간 필터를 수행하고, 그 다음으로 인접한 참조 화소 세트에는 2 tap 선형 보간 필터를 수행할 수 있다. 또는, 각 참조 화소 세트에 저역 통과 필터를 수행하지 않고, 현재 블록에 인접한 참조 화소 세트에 6 tap Gaussian 보간 필터를 수행하고, 그 다음 인접한 참조 화소 세트에 4-tap Gaussian 보간 필터를 수행할 수 있다. 또는, 현재 블록에 인접한 참조 화소 세트에 5 tap 저역 통과 필터를 수행하고, 그 다음 인접한 참조 화소 세트에 3-tap 저역 통과 필터를 수행하며, 각 참조 화소 세트에 4 tap cubic 보간 필터를 수행할 수 있다. 또는, 현재 블록에 인접한 참조 화소 세트(A)에 3 tap 저역 통과 필터를 수행하고, 그 다음 인접한 참조 화소 세트(B)에는 저역 통과 필터를 수행하지 않으며, 현재 블록에 인접한 참조 화소 세트(A)에는 8 tap Gaussian 보간 필터를 수행하고, 그 다음 인접한 참조 화소 세트(B)에는 4 tap Cubic 보간 필터를 수행할 수 있다.
일 예로, (4)에서 일정 크기 이상의 블록(예를 들어, 64 x 64)인 경우 각 참조 화소 세트에 저역 통과 필터를 수행하지 않고, 4 tap Cubic 보간 필터를 수행할 수 있다. 또한, 일부 크기 미만과 일부 크기 이상의 블록(예를 들어, 16 x 16 ~ 64 x 64)에서 각 참조 화소 세트에 3 tap 저역 통과 필터를 수행하고, 4 tap Gaussian 보간 필터를 수행하되, 가중치 평균에 사용되는 화소가 정수 단위 화소로만 구성되어 있을 경우에는 저역 통과 필터링 후의 화소를 사용하고, 정수 단위와 소수 단위가 혼합되어 구성되어 있을 경우에는 정수 단위 화소는 저역 통과 필터링 전의 화소를 사용할 수 있다. 또한, 일부 크기 미만의 블록(16 x 16)에서는 각 참조 화소 세트에 5 tap 저역 통과 필터를 수행하고, 6-tap Cubic 보간 필터를 수행하되, 가중치 평균에 사용되는 화소는 정수 단위든 소수 단위든 모두 저역 통과 필터링 후의 화소를 사용할 수 있다.
상기 예를 통해 하나의 참조 화소 세트를 사용하는 경우와 둘 이상의 참조 화소 세트를 사용하는 경우에 다양한 경우를 살펴보았다.
예측 전 처리 과정에 대한 명시적인 처리가 가능할 수 있다. 즉, 참조 화소 세트를 하나 사용할지 또는 복수 개 사용할 지에 대한 선택 정보가 발생할 수 있고, 참조 화소 필터링 설정에 관해 필터링을 수행하지 않을지 또는 필터 A를 사용하여 수행할지 또는 필터 B를 사용하여 수행할지 선택 정보가 발생할 수 있으며, 참조 화소 보간 설정에 관해 필터 A를 사용하여 수행할지 또는 필터 B를 사용하여 수행할지 선택 정보가 발생할 수 있다.
또는, 예측 전 처리 과정에 대한 묵시적인 처리가 가능할 수 있다. 즉, 블록의 크기, 형태, 예측 모드 등의 부호화 정보(상태)에 따라 위에서의 참조 화소 세트 개수, 참조 화소 필터링 설정, 참조 화소 보간 설정이 묵시적으로 정해질 수 있다. 이때, 참조 화소 세트 개수가 2개 이상으로 결정되는 경우에는 복수의 참조 화소 세트에 동일한 참조 화소 필터링, 참조 화소 보간 설정을 둘지 다른 설정을 둘지도 묵시적으로 정할 수 있다.
또는, 예측 전 처리 과정에 대한 혼합적인 처리가 가능할 수 있다. 즉, 일부 경우에는 묵시적인 처리를 할 수 있고, 일부 경우에는 명시적인 처리를 할 수 있다. 이때, 혼합적인 처리의 기준이 되는 것은 부호화 정보에 따라 결정될 수 있다. 즉, 어떤 블록 크기 또는 형태 또는 예측 모드 중 적어도 하나 이상의 조합에 따라 묵시적으로 처리할 지 명시적으로 처리할 지가 결정될 수 있다.
본 발명에서는 묵시적인 처리 또는 혼합적인 처리에 대한 경우를 설명한다. 상기 두 처리를 위해 부호화 정보에 기반하여 화면내 예측 설정(예를 들어, 예측 전 처리 등. 위에서는 예측 전 처리만 적응적인 구성을 갖는 것처럼 설명했지만, 화면내 예측 내 다른 과정<후술하는 내용에서 화면내 예측 모드 후보군 구성. 즉, 화면내 예측 모드의 개수, 예측 방향 등이 부호화 정보에 의해 정해지는 경우>도 적응적인 구성을 갖는 것이 가능)을 둘 수 있다.
다음과 같이 정리한다.
(부호화기)
<1> 현재 블록의 크기, 형태를 확인
- 화면내 예측 모드 후보군 설정(즉, 모드 개수, 각도 등이 결정. 하나의 후보군이면 이 과정은 생략 가능)
<2> 현재 블록의 크기, 형태, 예측 모드를 확인(이때, 예측 모드는 위의 과정에서 결정된 화면내 예측 모드 후보군에서 정의되는 것임)
- 참조 화소 세트 설정(즉, 하나 사용 또는 둘 이상 사용)
- 참조 화소 필터링 설정(만약 참조 화소 세트가 2개 이상이라면 각 세트에서 필터링 설정이 결정될 수 있음)
- 참조 화소 보간 설정(역시 참조 화소 세트가 2개 이상이라면 각 세트에서 보간 설정이 결정될 수 있음)
<3> 화면내 예측 관련 정보 부호화 (예측 모드와 위의 과정의 각 설정에서 복수의 후보군이 존재하여 선택 정보가 발생하면 해당 정보도 화면내 예측 관련 정보로 포함)
(복호화기)
<1> 현재 블록의 크기, 형태를 확인(이전 단계에서 블록 정보는 블록 분할부를 통해 관련 정보 파싱하여 확인)
- 화면내 예측 모드 후보군 설정(이 후보군에 따라 예측 모드 정보를 파싱하여 복원)
<2> 현재 블록의 크기, 형태, 예측 모드를 확인
- 참조 화소 세트 설정
- 참조 화소 필터링 설정
- 참조 화소 보간 설정
<3> 화면내 예측 관련 정보 복호화 (예측 모드와 그 외의 선택 정보. 해당 정보는 해당 단계에서 파싱했다고 보면 됨)
부호화기에서 현재 블록의 상태에 따라 화면내 예측 모드 후보군을 확인할 수 있다. 즉, 어떤 모드 개수를 갖고 모드 구성을 갖는 후보군을 사용하는지 확인한다. 만약 모든 조건에서 동일한 화면내 예측 모드 후보군을 갖는 경우라면 상관없지만 영상에서 둘 이상의 화면내 예측 모드 후보군을 사용하는 경우라면 확인한다. 즉, 현재 블록의 상태에 따라 어떤 후보군을 사용할 지 알 수 있거나 또는 명시적으로 어떤 후보군을 사용하는지 정보를 통해 알 수 있다.
이 과정에 따라 예측 모드 번호 등이 할당되는데, 만약 예측 모드 후보군이 다르면 후보군에 따라 각 예측 모드가 갖는 방향 또는 각도 등이 다르기 때문에 이를 통일시켜야 하는 과정이 필요할 수 있다. 즉, 도 9에서의 예측 모드를 사용할 때 50번은 수직 모드이나, 다른 예측 모드 후보군에서 50번은 수직 모드가 아닐 수 있으니까 이를 확인해야 한다.
그래서 본 발명에서 예측 모드가 어떤 모드인지에 따라 동작, 설정 등이 바뀌는 부분에 대한 설명이 있는데 거기에서 사용될 수 있는 것이다.
예를 들어, if(intra mode == Vertical)인 조건문을 통해 어떤 화면내 예측 처리(예를 들어, 참조 화소 보간, 참조 화소 필터링 등)를 할 지 결정해야한다고 할 때, intra mode가 50번이고 하나의 예측 모드 후보군을 사용하는 경우라면 상관이 없이 바로 확인될 수 있으나, 해당 화면내 예측 모드 후보군에서 상기 모드가 어떤 모드인지 알아야 하기 때문(방향성 모드인지 아니면 비방향성 모드인지. 방향성 모드라면 수직 또는 수평에 속하는지. 아니면 정수 화소만을 사용하여 예측 블록을 생성하는 방향성 모드인지 등등)에 해당 예측 모드 후보군에서의 위의 모드가 어떤 방향을 갖는 모드인지 확인하는 과정 후에 위의 조건문에 입력될 수 있다. 즉, if(intra mode<x> == Vertical)와 같이 x의 화면내 예측 모드 후보군에서 x라는 모드가 vertical인지 확인하는 과정으로 변경되어야 한다.
그리고 현재 블록의 상태를 확인하여 화면내 예측 설정을 확인해야 한다. 이때, 현재 블록의 상태는 현재 블록의 크기, 형태, 예측 모드 등에서 적어도 하나 이상의 요인에 따라 정의될 수 있다. 현재 블록의 상태에 따라 참조 화소 세트, 참조 화소 필터링, 참조 화소 보간 등을 설정한다. 즉, 참조 화소 세트 개수, 어떤 참조 화소 세트를 쓸지, 참조 화소 필터링을 적용할지 말지, 쓰면 어떤 필터를 쓸지 등을 확인할 수 있다. 만약 명시적으로 관련 정보를 확인하는 거면 플래그 등이 발생할 수 있고, 묵시적이면 부호화 정보(위에서 현재 블록의 상태 등. 또는, 현재 영상 타입<I/P/B>, 현재 영상의 컬러 타입<Y/Cb/Cr> 등이 화면내 예측 설정에 영향을 줄 수 있음)에 따라 결정될 수 있다.
본 발명에서는 참조 화소 세트, 참조 화소 필터링, 참조 화소 보간을 중심으로 설명하였으나, 그 외의 화면내 예측에 관련된 것에 대한 추가 설정이 가능할 수 있다. 예를 들어, 예측 과정에서 기존과 같이 예측 모드에 따라 참조 화소를 사용(외삽, 평균, 내삽)하여 예측 블록을 생성할 지 또는 기존의 방향성에 따라 사용하는 참조 화소 말고 다른 참조 화소 등을 사용(예를 들어, 예측 화소 위치에 따라 해당 예측 화소를 보정하기 위해 추가적으로 다른 참조 화소 등을 사용하여 보정값 생성 후에 기존의 예측 값에 더해준다던가 등)하여 예측 블록을 생성할 지 등이 부호화 정보에 따라 결정될 수도 있다. 이 경우도 명시적인 경우에는 관련 정보를 통해 어떤 예측 방법을 사용할 지 알 수 있고, 그렇지 않고 묵시적인 경우에는 현재 블록 상태 등과 같은 것을 통해 어떤 예측 방법을 사용할 지를 결정할 수 있다.
복호화기에서는 부호화기의 내용을 통해 역으로 관련 설명을 유도할 수 있다. 명시적인 부분에 대해서는 관련 정보를 파싱하는 것이고, 묵시적인 부분은 역시 부호화 정보 등에 따라 관련 정보를 확인하는 것이다.
위에서 참조 화소 필터링 설정과 참조 화소 보간 설정은 본 발명에서 참조 화소 세트가 사용되는 개수에 따라 변경되는 설정 내용 부분도 고려하여 정해질 수 있다.
본 발명은 비디오 신호를 부호화/복호화하기 위해 이용될 수 있다.

Claims (9)

  1. 현재 블록의 화면내 예측 모드를 유도하는 단계;
    복수의 화소 라인 중 상기 현재 블록의 화면내 예측을 위한 화소 라인을 결정하는 단계; 및
    상기 화면내 예측 모드와 상기 결정된 화소 라인을 기반으로, 상기 현재 블록의 화면내 예측을 수행하는 단계를 포함하는 화면내 예측 방법.
  2. 제1항에 있어서,
    상기 결정된 화소 라인의 제1 참조 화소를 필터링하는 단계를 더 포함하는 화면내 예측 방법.
  3. 상기 필터링하는 단계는, 상기 화면내 예측을 위한 제1 참조 화소에 필터링이 수행되는지 여부를 나타내는 제1 플래그에 기초하여 선택적으로 수행되는 화면내 예측 방법.
  4. 제3항에 있어서,
    상기 제1 플래그는, 상기 현재 블록의 부호화 파라미터에 기초하여 복호화 장치에서 유도되고,
    상기 부호화 파라미터는, 블록 크기, 성분 타입, 화면내 예측 모드 또는 서브 블록 단위의 화면내 예측이 적용되는지 여부 중 적어도 하나를 포함하는 화면내 예측 방법.
  5. 제1항에 있어서,
    상기 화면내 예측에 따른 상기 현재 블록의 예측 화소를 보정하는 단계를 더 포함하는 화면내 예측 방법.
  6. 제5항에 있어서, 상기 보정하는 단계는,
    상기 현재 블록의 예측 화소의 위치에 기초하여, 상기 보정을 위한 제2 참조 화소 또는 가중치 중 적어도 하나를 결정하는 단계를 더 포함하는 화면내 예측 방법.
  7. 제6항에 있어서,
    상기 보정하는 단계는, 상기 현재 블록의 화소 라인의 위치, 상기 현재 블록의 화면내 예측 모드 또는, 상기 현재 블록의 서브 블록 단위의 화면내 예측을 수행하는지 여부 중 적어도 하나를 고려하여 선택적으로 수행되는 화면내 예측 방법.
  8. 제1항에 있어서,
    상기 화면내 예측은, 상기 현재 블록의 서브 블록의 단위로 수행되고,
    상기 서브 블록은, 분할 여부에 관한 제2 플래그, 분할 방향 정보 또는 분할 개수 정보 중 적어도 하나에 기초하여 결정되는 화면내 예측 방법.
  9. 제1항에 있어서,
    상기 현재 블록의 화면내 예측 모드는, 소정의 디폴트 모드 또는 복수의 MPM 후보를 기반으로 유도되는 화면내 예측 방법.
PCT/KR2019/007651 2018-06-25 2019-06-25 화면내 예측 방법 및 장치 WO2020004900A1 (ko)

Priority Applications (26)

Application Number Priority Date Filing Date Title
AU2019292266A AU2019292266B2 (en) 2018-06-25 2019-06-25 Intra-frame prediction method and device
CN202310352558.5A CN116456096A (zh) 2018-06-25 2019-06-25 帧内预测方法和装置
JP2020571752A JP7373509B2 (ja) 2018-06-25 2019-06-25 フレーム内予測方法及び装置
CN202110406581.9A CN113347423B (zh) 2018-06-25 2019-06-25 帧内预测方法和装置
MX2020014112A MX2020014112A (es) 2018-06-25 2019-06-25 Método y dispositivo de predicción intra-trama.
CN202310350781.6A CN116471409A (zh) 2018-06-25 2019-06-25 帧内预测方法和装置
EP19827016.7A EP3800883A4 (en) 2018-06-25 2019-06-25 INTRAFRAME PREDICTION PROCESS AND DEVICE
CN201980042368.5A CN112740670A (zh) 2018-06-25 2019-06-25 帧内预测方法和装置
CN202310350961.4A CN116437082A (zh) 2018-06-25 2019-06-25 帧内预测方法和装置
CN202310351940.4A CN116456095A (zh) 2018-06-25 2019-06-25 帧内预测方法和装置
KR1020217002317A KR20210016472A (ko) 2018-06-25 2019-06-25 화면내 예측 방법 및 장치
SG11202013040VA SG11202013040VA (en) 2018-06-25 2019-06-25 Intra-frame prediction method and device
CA3105023A CA3105023C (en) 2018-06-25 2019-06-25 Intra-frame prediction method and device
BR112020026381-8A BR112020026381A2 (pt) 2018-06-25 2019-06-25 método de intrapredição
IL279503A IL279503A (en) 2018-06-25 2020-12-16 Interior-frame and device prediction method
US17/130,601 US11528505B2 (en) 2018-06-25 2020-12-22 Intra-frame prediction method and device
PH12020552258A PH12020552258A1 (en) 2018-06-25 2020-12-23 Intra-frame prediction method and device
ZA2021/00055A ZA202100055B (en) 2018-06-25 2021-01-05 Intra-frame prediction method and device
US17/818,448 US11930210B2 (en) 2018-06-25 2022-08-09 Intra-frame prediction method and device
US17/818,456 US11936907B2 (en) 2018-06-25 2022-08-09 Intra-frame prediction method and device
US17/818,462 US11936908B2 (en) 2018-06-25 2022-08-09 Intra-frame prediction method and device
US17/818,452 US11936906B2 (en) 2018-06-25 2022-08-09 Intra-frame prediction method and device
JP2023182108A JP2023179784A (ja) 2018-06-25 2023-10-23 フレーム内予測方法及び装置
JP2023182104A JP2023179782A (ja) 2018-06-25 2023-10-23 フレーム内予測方法及び装置
JP2023182099A JP2023179781A (ja) 2018-06-25 2023-10-23 フレーム内予測方法及び装置
JP2023182107A JP2023179783A (ja) 2018-06-25 2023-10-23 フレーム内予測方法及び装置

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR20180072558 2018-06-25
KR10-2018-0072558 2018-06-25
KR20180076783 2018-07-02
KR10-2018-0076783 2018-07-02

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/130,601 Continuation US11528505B2 (en) 2018-06-25 2020-12-22 Intra-frame prediction method and device

Publications (1)

Publication Number Publication Date
WO2020004900A1 true WO2020004900A1 (ko) 2020-01-02

Family

ID=68987398

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2019/007651 WO2020004900A1 (ko) 2018-06-25 2019-06-25 화면내 예측 방법 및 장치

Country Status (15)

Country Link
US (5) US11528505B2 (ko)
EP (1) EP3800883A4 (ko)
JP (5) JP7373509B2 (ko)
KR (1) KR20210016472A (ko)
CN (6) CN112740670A (ko)
AU (1) AU2019292266B2 (ko)
BR (1) BR112020026381A2 (ko)
CA (1) CA3105023C (ko)
CL (1) CL2020003298A1 (ko)
IL (1) IL279503A (ko)
MX (1) MX2020014112A (ko)
PH (1) PH12020552258A1 (ko)
SG (1) SG11202013040VA (ko)
WO (1) WO2020004900A1 (ko)
ZA (1) ZA202100055B (ko)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220174326A1 (en) * 2019-09-30 2022-06-02 Huawei Technologies Co., Ltd. Affine motion model restrictions for memory bandwidth reduction of enhanced interpolation filter
US20220201329A1 (en) * 2020-12-22 2022-06-23 Qualcomm Incorporated Intra prediction using enhanced interpolation filters
CN115804095A (zh) * 2020-08-21 2023-03-14 阿里巴巴集团控股有限公司 视频编码中的帧内预测方法

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11671619B2 (en) * 2018-07-02 2023-06-06 Intellectual Discovery Co., Ltd. Video coding method and device using merge candidate
US11477440B2 (en) * 2018-09-20 2022-10-18 Lg Electronics Inc. Image prediction method and apparatus performing intra prediction
MX2021003297A (es) * 2018-09-21 2021-05-13 Huawei Tech Co Ltd Derivacion de modo de intraprediccion basada en bloques vecinos.
US11516506B2 (en) * 2018-10-05 2022-11-29 Lg Electronics Inc. Method and apparatus for processing image service
WO2020076064A1 (ko) 2018-10-09 2020-04-16 엘지전자 주식회사 Mpm 리스트를 사용하는 인트라 예측 기반 영상 코딩 방법 및 그 장치
US11729376B2 (en) * 2018-11-27 2023-08-15 Apple Inc. Method for encoding/decoding video signal and apparatus therefor
US11445203B2 (en) * 2019-01-04 2022-09-13 Qualcomm Incorporated Sub-partition intra prediction in video coding
CN112514384A (zh) 2019-01-28 2021-03-16 株式会社 Xris 视频信号编码/解码方法及其装置
KR20200106589A (ko) 2019-03-04 2020-09-15 삼성디스플레이 주식회사 표시 장치, 표시 장치의 제조장치 및 표시 장치의 제조방법
WO2020228578A1 (en) * 2019-05-10 2020-11-19 Mediatek Inc. Method and apparatus of luma most probable mode list derivation for video coding
EP3989548A4 (en) * 2019-06-19 2022-09-21 Electronics and Telecommunications Research Institute INTRAPREDICTION MODE AND ENTROPIE CODING/DECODING METHOD AND APPARATUS
WO2020262963A1 (ko) * 2019-06-24 2020-12-30 엘지전자 주식회사 크로마 블록의 최대 변환 크기 설정을 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법
CN114223200B (zh) * 2019-08-14 2023-11-17 北京字节跳动网络技术有限公司 位置相关帧内预测样点滤波
US11557635B2 (en) 2019-12-10 2023-01-17 Samsung Display Co., Ltd. Display device, mask assembly, and apparatus for manufacturing the display device
US20220400255A1 (en) * 2021-06-11 2022-12-15 Tencent America LLC Intra Mode Coding
CN113794882B (zh) * 2021-08-31 2023-12-29 绍兴市北大信息技术科创中心 一种帧内快速编码方法
CN114420066B (zh) * 2022-01-20 2023-04-25 海宁奕斯伟集成电路设计有限公司 图像处理方法、装置、电子设备及计算机可读存储介质
WO2023164245A1 (en) * 2022-02-28 2023-08-31 Beijing Dajia Internet Information Technology Co., Ltd. Methods and devices for decoder-side intra mode derivation
WO2024053987A1 (ko) * 2022-09-06 2024-03-14 주식회사 윌러스표준기술연구소 기하학적 분할을 이용하는 비디오 신호 처리 방법 및 이를 위한 장치

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130003832A1 (en) * 2011-06-30 2013-01-03 Futurewei Technologies, Inc. Simplified Bilateral Intra Smoothing Filter
US20160309147A1 (en) * 2011-01-12 2016-10-20 Mitsubishi Electric Corporation Image encoding device, image decoding device, image encoding method, and image decoding method for generating a prediction image
KR20180001478A (ko) * 2016-06-24 2018-01-04 주식회사 케이티 비디오 신호 처리 방법 및 장치
KR20180029905A (ko) * 2016-09-13 2018-03-21 한국전자통신연구원 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
KR20180041575A (ko) * 2016-10-14 2018-04-24 세종대학교산학협력단 영상의 부호화/복호화 방법 및 장치

Family Cites Families (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101682774B (zh) 2007-02-23 2013-07-24 日本电信电话株式会社 视频编码方法和解码方法、视频编码装置和解码装置
KR101452860B1 (ko) 2009-08-17 2014-10-23 삼성전자주식회사 영상의 부호화 방법 및 장치, 영상 복호화 방법 및 장치
JP5871906B2 (ja) 2010-04-26 2016-03-01 パナソニック インテレクチュアル プロパティ コーポレーション オブアメリカPanasonic Intellectual Property Corporation of America 復号方法、プログラムおよび復号装置
CN101854551B (zh) * 2010-06-08 2012-08-15 浙江大学 帧内预测模式编解码方法及装置
AU2010357291B2 (en) * 2010-07-15 2015-01-15 Kabushiki Kaisha Toshiba Image encoding method and image decoding method
KR101373814B1 (ko) * 2010-07-31 2014-03-18 엠앤케이홀딩스 주식회사 예측 블록 생성 장치
KR101756442B1 (ko) 2010-11-29 2017-07-11 에스케이텔레콤 주식회사 인트라예측모드의 중복성을 최소화하기 위한 영상 부호화/복호화 방법 및 장치
KR101444667B1 (ko) * 2011-01-15 2014-09-30 에스케이 텔레콤주식회사 양방향 인트라 예측을 이용한 영상 부호화/복호화 방법 및 장치
US9654785B2 (en) 2011-06-09 2017-05-16 Qualcomm Incorporated Enhanced intra-prediction mode signaling for video coding using neighboring mode
KR20120140181A (ko) * 2011-06-20 2012-12-28 한국전자통신연구원 화면내 예측 블록 경계 필터링을 이용한 부호화/복호화 방법 및 그 장치
KR20130049522A (ko) 2011-11-04 2013-05-14 오수미 인트라 예측 블록 생성 방법
KR20130049526A (ko) 2011-11-04 2013-05-14 오수미 복원 블록 생성 방법
MX352965B (es) 2012-11-30 2017-12-15 Sony Corp Aparato para procesamiento de imagen y método para procesamiento de imagen.
US9451254B2 (en) 2013-07-19 2016-09-20 Qualcomm Incorporated Disabling intra prediction filtering
CN115134595A (zh) * 2015-06-05 2022-09-30 杜比实验室特许公司 用于执行帧间预测的图像编解码方法、比特流存储方法
EP3453180A4 (en) 2016-05-04 2020-04-01 Microsoft Technology Licensing, LLC INTRA-IMAGE PREDICTION USING NON-ADJACENT REFERENCE LINES OF SAMPLE VALUES
WO2017205703A1 (en) 2016-05-25 2017-11-30 Arris Enterprises Llc Improved weighted angular prediction coding for intra coding
US10397569B2 (en) * 2016-06-03 2019-08-27 Mediatek Inc. Method and apparatus for template-based intra prediction in image and video coding
US10230961B2 (en) * 2016-06-03 2019-03-12 Mediatek Inc. Method and apparatus for template-based intra prediction in image and video coding
CN109479129B (zh) 2016-07-18 2023-07-11 韩国电子通信研究院 图像编码/解码方法和装置以及存储比特流的记录介质
CL2016002047A1 (es) 2016-08-12 2017-03-17 Oculus Machina S P A Un método para realizar la detección de elementos mediante una segmentación dentro de en una secuencia ordenada de datos digitales.
US10390015B2 (en) 2016-08-26 2019-08-20 Qualcomm Incorporated Unification of parameters derivation procedures for local illumination compensation and cross-component linear model prediction
JP6669622B2 (ja) 2016-09-21 2020-03-18 Kddi株式会社 動画像復号装置、動画像復号方法、動画像符号化装置、動画像符号化方法及びコンピュータ可読記録媒体
US10382781B2 (en) 2016-09-28 2019-08-13 Qualcomm Incorporated Interpolation filters for intra prediction in video coding
WO2018066989A1 (ko) * 2016-10-04 2018-04-12 김기백 영상 데이터 부호화/복호화 방법 및 장치
CN117615131A (zh) 2016-10-14 2024-02-27 世宗大学校产学协力团 影像编码/解码方法及比特流的传送方法
KR102351029B1 (ko) * 2017-05-16 2022-01-13 엘지전자 주식회사 인트라 예측 모드 기반 영상 처리 방법 및 이를 위한 장치
SG11202012036QA (en) * 2018-01-15 2021-01-28 Ki Baek Kim Intra prediction encoding/decoding method and device for chrominance components
KR20200083356A (ko) * 2018-12-28 2020-07-08 김기백 인트라 예측 기반의 영상 부호화/복호화 방법 및 장치

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160309147A1 (en) * 2011-01-12 2016-10-20 Mitsubishi Electric Corporation Image encoding device, image decoding device, image encoding method, and image decoding method for generating a prediction image
US20130003832A1 (en) * 2011-06-30 2013-01-03 Futurewei Technologies, Inc. Simplified Bilateral Intra Smoothing Filter
KR20180001478A (ko) * 2016-06-24 2018-01-04 주식회사 케이티 비디오 신호 처리 방법 및 장치
KR20180029905A (ko) * 2016-09-13 2018-03-21 한국전자통신연구원 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
KR20180041575A (ko) * 2016-10-14 2018-04-24 세종대학교산학협력단 영상의 부호화/복호화 방법 및 장치

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220174326A1 (en) * 2019-09-30 2022-06-02 Huawei Technologies Co., Ltd. Affine motion model restrictions for memory bandwidth reduction of enhanced interpolation filter
CN115804095A (zh) * 2020-08-21 2023-03-14 阿里巴巴集团控股有限公司 视频编码中的帧内预测方法
CN115804095B (zh) * 2020-08-21 2024-04-16 阿里巴巴达摩院(杭州)科技有限公司 视频编码中的帧内预测方法
US20220201329A1 (en) * 2020-12-22 2022-06-23 Qualcomm Incorporated Intra prediction using enhanced interpolation filters

Also Published As

Publication number Publication date
EP3800883A1 (en) 2021-04-07
CL2020003298A1 (es) 2021-06-04
JP2021529461A (ja) 2021-10-28
JP2023179784A (ja) 2023-12-19
US20220385919A1 (en) 2022-12-01
BR112020026381A2 (pt) 2021-03-23
CN112740670A (zh) 2021-04-30
JP2023179783A (ja) 2023-12-19
CA3105023C (en) 2023-03-14
US11936908B2 (en) 2024-03-19
IL279503A (en) 2021-01-31
CN116456095A (zh) 2023-07-18
CN116471409A (zh) 2023-07-21
ZA202100055B (en) 2022-09-28
US11936906B2 (en) 2024-03-19
JP2023179782A (ja) 2023-12-19
JP2023179781A (ja) 2023-12-19
JP7373509B2 (ja) 2023-11-02
CN116456096A (zh) 2023-07-18
CN113347423B (zh) 2023-04-21
US20220394274A1 (en) 2022-12-08
KR20210016472A (ko) 2021-02-15
CN113347423A (zh) 2021-09-03
US11930210B2 (en) 2024-03-12
AU2019292266B2 (en) 2023-02-09
US11528505B2 (en) 2022-12-13
CA3105023A1 (en) 2020-01-02
MX2020014112A (es) 2021-06-15
SG11202013040VA (en) 2021-01-28
US20220385923A1 (en) 2022-12-01
US20210176492A1 (en) 2021-06-10
EP3800883A4 (en) 2021-07-07
US20230047534A1 (en) 2023-02-16
CN116437082A (zh) 2023-07-14
PH12020552258A1 (en) 2021-06-07
AU2019292266A1 (en) 2021-01-28
US11936907B2 (en) 2024-03-19

Similar Documents

Publication Publication Date Title
WO2020004900A1 (ko) 화면내 예측 방법 및 장치
WO2020185022A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2016195453A1 (ko) 영상 부호화 및 복호화 방법과 영상 복호화 장치
WO2018012851A1 (ko) 영상 부호화/복호화 방법 및 이를 위한 기록 매체
WO2016200242A1 (ko) 적응적인 디블록킹 필터링을 이용하는 영상 부호화 방법과 영상 복호화 방법 및 장치
WO2019194485A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2019182385A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2018012886A1 (ko) 영상 부호화/복호화 방법 및 이를 위한 기록 매체
WO2016195460A1 (ko) 화면 내 예측에 대한 부호화/복호화 방법 및 장치
WO2017192011A2 (ko) 화면 내 예측을 이용한 영상 부호화/복호화 방법 및 장치
WO2020009514A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2018174617A1 (ko) 블록 형태에 기반한 예측 방법 및 장치
WO2020256413A1 (ko) 적응적 루프내 필터링 방법 및 장치
WO2020005035A1 (ko) 처리율 향상을 위한 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2019017651A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2021101345A1 (ko) 적응적 루프내 필터링 방법 및 장치
WO2018097700A1 (ko) 필터링을 위한 방법 및 장치
WO2020005045A1 (ko) 머지 모드 기반의 인터 예측 방법 및 장치
WO2017222331A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020004902A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2019190140A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2020017873A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2020005046A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2018174618A1 (ko) 참조 블록을 사용하는 예측 방법 및 장치
WO2020050600A1 (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: 19827016

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 3105023

Country of ref document: CA

Ref document number: 2020571752

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112020026381

Country of ref document: BR

ENP Entry into the national phase

Ref document number: 2019827016

Country of ref document: EP

Effective date: 20210104

ENP Entry into the national phase

Ref document number: 20217002317

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2019292266

Country of ref document: AU

Date of ref document: 20190625

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 112020026381

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20201222