WO2021060844A1 - 팔레트 모드를 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법 - Google Patents

팔레트 모드를 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법 Download PDF

Info

Publication number
WO2021060844A1
WO2021060844A1 PCT/KR2020/012898 KR2020012898W WO2021060844A1 WO 2021060844 A1 WO2021060844 A1 WO 2021060844A1 KR 2020012898 W KR2020012898 W KR 2020012898W WO 2021060844 A1 WO2021060844 A1 WO 2021060844A1
Authority
WO
WIPO (PCT)
Prior art keywords
palette
current block
mode
block
current
Prior art date
Application number
PCT/KR2020/012898
Other languages
English (en)
French (fr)
Inventor
장형문
유선미
남정학
Original Assignee
엘지전자 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 엘지전자 주식회사 filed Critical 엘지전자 주식회사
Priority to KR1020227008747A priority Critical patent/KR20220047834A/ko
Priority to JP2022518236A priority patent/JP7362910B2/ja
Priority to CN202080066527.8A priority patent/CN114521328A/zh
Priority to CA3155112A priority patent/CA3155112A1/en
Publication of WO2021060844A1 publication Critical patent/WO2021060844A1/ko
Priority to US17/697,474 priority patent/US11689732B2/en
Priority to US18/198,170 priority patent/US12003740B2/en
Priority to JP2023172537A priority patent/JP2023171923A/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/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/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/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/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/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/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/184Methods 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 bits, e.g. of the compressed video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • 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/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Definitions

  • the present disclosure relates to an image encoding/decoding method, an apparatus, and a method of transmitting a bitstream using a palette mode, and more particularly, an image encoding/decoding method for selectively updating a palette predictor based on a split structure of a current block.
  • An object of the present disclosure is to provide a video encoding/decoding method and apparatus with improved encoding/decoding efficiency.
  • an object of the present disclosure is to provide a method and apparatus for encoding/decoding an image using a palette mode.
  • an object of the present disclosure is to provide an image encoding/decoding method and apparatus for selectively updating a palette predictor based on a split structure of a current block.
  • an object of the present disclosure is to provide an image encoding/decoding method and apparatus for selectively applying a palette mode based on a divided structure of a current block.
  • an object of the present disclosure is to provide a method for transmitting a bitstream generated by an image encoding method or apparatus according to the present disclosure.
  • an object of the present disclosure is to provide a recording medium storing a bitstream generated by an image encoding method or apparatus according to the present disclosure.
  • an object of the present disclosure is to provide a recording medium storing a bitstream that is received and decoded by an image decoding apparatus according to the present disclosure and used for restoring an image.
  • a palette mode when a palette mode is applied to a current block, obtaining palette information and palette index prediction information for the current block from a bitstream, based on the palette information, the Constructing a palette predictor and a palette table for a current block, generating a palette index map for the current block based on the palette index prediction information, and based on the palette table and the palette index map, Decoding the current block, and the palette predictor may be selectively updated based on a partition structure of the current block.
  • An image decoding apparatus includes a memory and at least one processor, wherein when a palette mode is applied to a current block, the at least one processor includes palette information for the current block from a bitstream and Acquires palette index prediction information, configures a palette predictor and a palette table for the current block based on the palette information, and generates a palette index map for the current block based on the palette index prediction information , Based on the palette table and the palette index map, the current block is decoded, and the palette predictor may be selectively updated based on the partition structure of the current block.
  • a palette mode when a palette mode is applied to a current block, configuring a palette predictor and a palette table for the current block, based on the palette table, in the current block Generating a palette index map for, and encoding the current block based on the palette index map, wherein the palette predictor may be selectively updated based on a partition structure of the current block.
  • a transmission method may transmit a bitstream generated by the image encoding apparatus or image encoding method of the present disclosure.
  • a computer-readable recording medium may store a bitstream generated by the image encoding method or image encoding apparatus of the present disclosure.
  • an image encoding/decoding method and apparatus with improved encoding/decoding efficiency may be provided.
  • a method and apparatus for encoding/decoding an image based on an improved palette mode may be provided.
  • an image encoding/decoding method and apparatus for selectively applying a palette mode based on a divided structure of a current block may be provided.
  • a method for transmitting a bitstream generated by an image encoding method or an apparatus according to the present disclosure may be provided.
  • a recording medium storing a bitstream generated by an image encoding method or apparatus according to the present disclosure may be provided.
  • a recording medium may be provided that stores a bitstream that is received and decoded by the image decoding apparatus according to the present disclosure and used for image restoration.
  • FIG. 1 is a diagram schematically illustrating a video coding system to which an embodiment according to the present disclosure can be applied.
  • FIG. 2 is a diagram schematically illustrating an image encoding apparatus to which an embodiment according to the present disclosure can be applied.
  • FIG. 3 is a diagram schematically illustrating an image decoding apparatus to which an embodiment according to the present disclosure can be applied.
  • FIG. 4 is a diagram illustrating an image segmentation structure according to an exemplary embodiment.
  • FIG. 5 is a diagram illustrating an embodiment of a partition type of a block according to a multi-type tree structure.
  • FIG. 6 is a diagram illustrating a signaling mechanism of block division information in a quadtree with nested multi-type tree structure according to the present disclosure.
  • FIG. 7 is a diagram illustrating an embodiment in which a CTU is divided into multiple CUs.
  • FIG. 8 is a diagram illustrating an embodiment of a redundant division pattern.
  • FIG. 9 is a diagram illustrating an example of a luma block and a chroma block in a 4:2:0 color format.
  • 10A to 10C are diagrams illustrating an example of syntax for converting a single tree structure to a dual tree structure.
  • FIG. 11 is a flowchart illustrating a video/video encoding method based on intra prediction.
  • FIG. 12 is a diagram illustrating a configuration of an intra prediction unit according to the present disclosure.
  • FIG. 13 is a flowchart illustrating a video/video decoding method based on intra prediction.
  • FIG. 14 is a diagram illustrating a configuration of an intra prediction unit according to the present disclosure.
  • 15 is a diagram illustrating an example of a scanning method that can be used in a palette mode.
  • 16 is a diagram illustrating an example of a process of encoding a palette of a current block.
  • 17 is a diagram illustrating a part of a coding_unit syntax for a palette mode.
  • 18A to 18E are diagrams illustrating palette_coding syntax for a palette mode.
  • 19 is a diagram illustrating an example of a CTU having a local dual tree structure.
  • FIG. 20 is a diagram illustrating an example of a decoding process for respective CUs in the example of FIG. 19.
  • 21 and 22 are diagrams for explaining problems that occur when a palette mode is applied in the decoding process of FIG. 20.
  • FIG. 23 is a flowchart illustrating a palette encoding method according to an embodiment of the present disclosure.
  • FIG. 24 is a diagram for describing a palette encoding process when a palette predictor is not updated in the example of FIG. 19.
  • 25 is a diagram illustrating an example of a process of selectively updating a palette predictor based on a partition structure of a current block.
  • 26 is a flowchart illustrating a method of decoding a palette according to an embodiment of the present disclosure.
  • FIG. 27 is a flowchart illustrating a palette encoding method according to an embodiment of the present disclosure.
  • FIG. 28 is a diagram illustrating a specific example of a coding_unit syntax including a palette mode flag.
  • 29 is a flowchart illustrating a method of decoding a palette according to an embodiment of the present disclosure.
  • FIG. 30 is a diagram illustrating a content streaming system to which an embodiment according to the present disclosure can be applied.
  • a component when a component is said to be “connected”, “coupled” or “connected” with another component, it is not only a direct connection relationship, but also an indirect connection relationship in which another component exists in the middle. It can also include.
  • a certain component when a certain component “includes” or “have” another component, it means that other components may be further included rather than excluding other components unless otherwise stated. .
  • first and second are used only for the purpose of distinguishing one component from other components, and do not limit the order or importance of the components unless otherwise noted. Accordingly, within the scope of the present disclosure, a first component in one embodiment may be referred to as a second component in another embodiment, and similarly, a second component in one embodiment is referred to as a first component in another embodiment. It can also be called.
  • components that are distinguished from each other are intended to clearly describe each feature, and do not necessarily mean that the components are separated. That is, a plurality of components may be integrated into one hardware or software unit, or one component may be distributed to form a plurality of hardware or software units. Therefore, even if not stated otherwise, such integrated or distributed embodiments are also included in the scope of the present disclosure.
  • components described in various embodiments do not necessarily mean essential components, and some may be optional components. Accordingly, an embodiment consisting of a subset of components described in an embodiment is also included in the scope of the present disclosure. In addition, embodiments including other elements in addition to the elements described in the various embodiments are included in the scope of the present disclosure.
  • the present disclosure relates to encoding and decoding of an image, and terms used in the present disclosure may have a common meaning commonly used in the technical field to which the present disclosure belongs unless newly defined in the present disclosure.
  • a “picture” generally refers to a unit representing one image in a specific time period
  • a slice/tile is a coding unit constituting a part of a picture
  • one picture is one It may be composed of more than one slice/tile.
  • a slice/tile may include one or more coding tree units (CTU).
  • pixel or “pel” may mean a minimum unit constituting one picture (or image).
  • sample may be used as a term corresponding to a pixel.
  • a sample may generally represent a pixel or a value of a pixel, may represent only a pixel/pixel value of a luma component, or may represent only a pixel/pixel value of a chroma component.
  • unit may represent a basic unit of image processing.
  • the unit may include at least one of a specific area of a picture and information related to the corresponding area.
  • the unit may be used interchangeably with terms such as “sample array”, “block”, or “area” depending on the case.
  • the MxN block may include samples (or sample arrays) consisting of M columns and N rows, or a set (or array) of transform coefficients.
  • current block may mean one of “current coding block”, “current coding unit”, “coding object block”, “decoding object block”, or “processing object block”.
  • current block may mean “current prediction block” or “prediction target block”.
  • transformation inverse transformation
  • quantization inverse quantization
  • current block may mean “current transform block” or “transform target block”.
  • filtering is performed, “current block” may mean “block to be filtered”.
  • current block may mean a block including both a luma component block and a chroma component block or "a luma block of the current block” unless explicitly stated as a chroma block.
  • the luma component block of the current block may be explicitly expressed by including an explicit description of a luma component block, such as “luma block” or "current luma block”.
  • the chroma component block of the current block may be explicitly expressed by including an explicit description of a chroma component block such as a "chroma block” or a "current chroma block”.
  • FIG. 1 shows a video coding system according to this disclosure.
  • a video coding system may include an encoding device 10 and a decoding device 20.
  • the encoding device 10 may transmit the encoded video and/or image information or data in a file or streaming format to the decoding device 20 through a digital storage medium or a network.
  • the encoding apparatus 10 may include a video source generation unit 11, an encoding unit 12, and a transmission unit 13.
  • the decoding apparatus 20 may include a receiving unit 21, a decoding unit 22, and a rendering unit 23.
  • the encoder 12 may be referred to as a video/image encoder, and the decoder 22 may be referred to as a video/image decoder.
  • the transmission unit 13 may be included in the encoding unit 12.
  • the receiving unit 21 may be included in the decoding unit 22.
  • the rendering unit 23 may include a display unit, and the display unit may be configured as a separate device or an external component.
  • the video source generator 11 may acquire a video/image through a process of capturing, synthesizing, or generating a video/image.
  • the video source generator 11 may include a video/image capturing device and/or a video/image generating device.
  • the video/image capture device may include, for example, one or more cameras, a video/image archive including previously captured video/images, and the like.
  • the video/image generating device may include, for example, a computer, a tablet and a smartphone, and may (electronically) generate a video/image.
  • a virtual video/image may be generated through a computer or the like, and in this case, a video/image capturing process may be substituted as a process of generating related data.
  • the encoder 12 may encode an input video/image.
  • the encoder 12 may perform a series of procedures such as prediction, transformation, and quantization for compression and encoding efficiency.
  • the encoder 12 may output encoded data (coded video/image information) in the form of a bitstream.
  • the transmission unit 13 may transmit the encoded video/image information or data output in the form of a bitstream to the reception unit 21 of the decoding apparatus 20 through a digital storage medium or a network in a file or streaming form.
  • Digital storage media may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD.
  • the transmission unit 13 may include an element for generating a media file through a predetermined file format, and may include an element for transmission through a broadcast/communication network.
  • the receiving unit 21 may extract/receive the bitstream from the storage medium or network and transmit it to the decoding unit 22.
  • the decoder 22 may decode the video/image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoder 12.
  • the rendering unit 23 may render the decoded video/image.
  • the rendered video/image may be displayed through the display unit.
  • FIG. 2 is a diagram schematically illustrating an image encoding apparatus to which an embodiment according to the present disclosure can be applied.
  • the image encoding apparatus 100 includes an image segmentation unit 110, a subtraction unit 115, a transformation unit 120, a quantization unit 130, an inverse quantization unit 140, and an inverse transformation unit ( 150), an addition unit 155, a filtering unit 160, a memory 170, an inter prediction unit 180, an intra prediction unit 185, and an entropy encoding unit 190.
  • the inter prediction unit 180 and the intra prediction unit 185 may be collectively referred to as a “prediction unit”.
  • the transform unit 120, the quantization unit 130, the inverse quantization unit 140, and the inverse transform unit 150 may be included in a residual processing unit.
  • the residual processing unit may further include a subtraction unit 115.
  • All or at least some of the plurality of constituent units constituting the image encoding apparatus 100 may be implemented as one hardware component (eg, an encoder or a processor) according to embodiments.
  • the memory 170 may include a decoded picture buffer (DPB), and may be implemented by a digital storage medium.
  • DPB decoded picture buffer
  • the image segmentation unit 110 may divide an input image (or picture, frame) input to the image encoding apparatus 100 into one or more processing units.
  • the processing unit may be referred to as a coding unit (CU).
  • the coding unit is a coding tree unit (CTU) or a largest coding unit (LCU) recursively according to a QT/BT/TT (Quad-tree/binary-tree/ternary-tree) structure ( It can be obtained by dividing recursively.
  • one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad tree structure, a binary tree structure, and/or a ternary tree structure.
  • a quad tree structure may be applied first, and a binary tree structure and/or a ternary tree structure may be applied later.
  • the coding procedure according to the present disclosure may be performed based on the final coding unit that is no longer divided.
  • the largest coding unit may be directly used as the final coding unit, or a coding unit of a lower depth obtained by dividing the largest coding unit may be used as the final cornet unit.
  • the coding procedure may include a procedure such as prediction, transformation, and/or restoration, which will be described later.
  • the processing unit of the coding procedure may be a prediction unit (PU) or a transform unit (TU).
  • the prediction unit and the transform unit may be divided or partitioned from the final coding unit, respectively.
  • the prediction unit may be a unit of sample prediction
  • the transform unit may be a unit for inducing a transform coefficient and/or a unit for inducing a residual signal from the transform coefficient.
  • the prediction unit (inter prediction unit 180 or intra prediction unit 185) performs prediction on a block to be processed (current block), and generates a predicted block including prediction samples for the current block. Can be generated.
  • the prediction unit may determine whether intra prediction or inter prediction is applied in units of a current block or CU.
  • the prediction unit may generate various information on prediction of the current block and transmit it to the entropy encoding unit 190.
  • the information on prediction may be encoded by the entropy encoding unit 190 and output in the form of a bitstream.
  • the intra prediction unit 185 may predict the current block by referring to samples in the current picture.
  • the referenced samples may be located in a neighborhood of the current block or may be located away from each other according to an intra prediction mode and/or an intra prediction technique.
  • the intra prediction modes may include a plurality of non-directional modes and a plurality of directional modes.
  • the non-directional mode may include, for example, a DC mode and a planar mode (Planar mode).
  • the directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes, depending on the degree of detail of the prediction direction. However, this is an example, and more or less directional prediction modes may be used depending on the setting.
  • the intra prediction unit 185 may determine a prediction mode applied to the current block by using the prediction mode applied to the neighboring block.
  • the inter prediction unit 180 may derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on the reference picture.
  • motion information may be predicted in units of blocks, subblocks, or samples based on correlation between motion information between neighboring blocks and the current block.
  • the motion information may include a motion vector and a reference picture index.
  • the motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information.
  • the neighboring block may include a spatial neighboring block existing in the current picture and a temporal neighboring block existing in the reference picture.
  • the reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different from each other.
  • the temporal neighboring block may be referred to by a name such as a collocated reference block and a collocated CU (colCU).
  • a reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic).
  • the inter prediction unit 180 constructs a motion information candidate list based on neighboring blocks, and provides information indicating which candidate is used to derive a motion vector and/or a reference picture index of the current block. Can be generated. Inter prediction may be performed based on various prediction modes.
  • the inter prediction unit 180 may use motion information of a neighboring block as motion information of a current block.
  • a residual signal may not be transmitted.
  • MVP motion vector prediction
  • a motion vector of a neighboring block is used as a motion vector predictor, and an indicator for a motion vector difference and a motion vector predictor ( indicator) to signal the motion vector of the current block.
  • the motion vector difference may mean a difference between a motion vector of a current block and a motion vector predictor.
  • the prediction unit may generate a prediction signal based on various prediction methods and/or prediction techniques to be described later.
  • the prediction unit may apply intra prediction or inter prediction for prediction of the current block, and may simultaneously apply intra prediction and inter prediction.
  • a prediction method in which intra prediction and inter prediction are applied simultaneously for prediction of the current block may be referred to as combined inter and intra prediction (CIIP).
  • the prediction unit may perform intra block copy (IBC) for prediction of the current block.
  • the intra block copy may be used for content image/movie coding such as games, such as, for example, screen content coding (SCC).
  • IBC is a method of predicting a current block by using a reference block in a current picture at a distance from the current block by a predetermined distance.
  • the position of the reference block in the current picture may be encoded as a vector (block vector) corresponding to the predetermined distance.
  • IBC basically performs prediction in the current picture, but in that it derives a reference block in the current picture, it may be performed similarly to inter prediction. That is, the IBC may use at least one of the inter prediction techniques described in this disclosure.
  • the prediction signal generated through the prediction unit may be used to generate a reconstructed signal or may be used to generate a residual signal.
  • the subtraction unit 115 subtracts the prediction signal (predicted block, prediction sample array) output from the prediction unit from the input image signal (original block, original sample array), and subtracts a residual signal (remaining block, residual sample array). ) Can be created.
  • the generated residual signal may be transmitted to the converter 120.
  • the transform unit 120 may generate transform coefficients by applying a transform technique to the residual signal.
  • the transformation technique uses at least one of DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT (Karhunen-Loeve Transform), GBT (Graph-Based Transform), or CNT (Conditionally Non-linear Transform).
  • DCT Discrete Cosine Transform
  • DST Discrete Sine Transform
  • KLT Kerhunen-Loeve Transform
  • GBT Graph-Based Transform
  • CNT Conditionally Non-linear Transform
  • GBT refers to the transformation obtained from this graph when the relationship information between pixels is expressed in a graph.
  • CNT refers to a transformation obtained based on generating a prediction signal using all previously reconstructed pixels.
  • the conversion process may be applied to a block of pixels having the same size of a square, or may be applied to a block of a variable size other than a square.
  • the quantization unit 130 may quantize the transform coefficients and transmit the quantization to the entropy encoding unit 190.
  • the entropy encoding unit 190 may encode a quantized signal (information on quantized transform coefficients) and output it as a bitstream. Information about the quantized transform coefficients may be called residual information.
  • the quantization unit 130 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and the quantized transform coefficients in the form of the one-dimensional vector It is also possible to generate information about transform coefficients.
  • the entropy encoding unit 190 may perform various encoding methods such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), and the like.
  • the entropy encoding unit 190 may encode information necessary for video/image restoration (eg, values of syntax elements) together or separately, in addition to the quantized transform coefficients.
  • the encoded information (eg, encoded video/video information) may be transmitted or stored in a bitstream form in units of network abstraction layer (NAL) units.
  • the video/video information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS).
  • the video/video information may further include general constraint information.
  • the signaling information, transmitted information, and/or syntax elements mentioned in the present disclosure may be encoded through the above-described encoding procedure and included in the bitstream.
  • the bitstream may be transmitted through a network or may be stored in a digital storage medium.
  • the network may include a broadcasting network and/or a communication network
  • the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD.
  • a transmission unit (not shown) for transmitting the signal output from the entropy encoding unit 190 and/or a storage unit (not shown) for storing may be provided as an internal/external element of the image encoding apparatus 100, or transmission The unit may be provided as a component of the entropy encoding unit 190.
  • the quantized transform coefficients output from the quantization unit 130 may be used to generate a residual signal.
  • a residual signal residual block or residual samples
  • inverse quantization and inverse transform residual transforms
  • the addition unit 155 adds the reconstructed residual signal to the prediction signal output from the inter prediction unit 180 or the intra prediction unit 185 to obtain a reconstructed signal (a reconstructed picture, a reconstructed block, and a reconstructed sample array). Can be generated.
  • a reconstructed signal (a reconstructed picture, a reconstructed block, and a reconstructed sample array).
  • the predicted block may be used as a reconstructed block.
  • the addition unit 155 may be referred to as a restoration unit or a restoration block generation unit.
  • the generated reconstructed signal may be used for intra prediction of the next processing target block in the current picture, and may be used for inter prediction of the next picture through filtering as described later.
  • the filtering unit 160 may improve subjective/objective image quality by applying filtering to the reconstructed signal.
  • the filtering unit 160 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and the modified reconstructed picture may be converted to the memory 170, specifically, the DPB of the memory 170. Can be saved on.
  • the various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, and the like.
  • the filtering unit 160 may generate various information about filtering and transmit it to the entropy encoding unit 190 as described later in the description of each filtering method. Information about filtering may be encoded by the entropy encoding unit 190 and output in the form of a bitstream.
  • the modified reconstructed picture transmitted to the memory 170 may be used as a reference picture in the inter prediction unit 180.
  • the image encoding apparatus 100 may avoid prediction mismatch between the image encoding apparatus 100 and the image decoding apparatus, and may improve encoding efficiency.
  • the DPB in the memory 170 may store a reconstructed picture modified to be used as a reference picture in the inter prediction unit 180.
  • the memory 170 may store motion information of a block from which motion information in a current picture is derived (or encoded) and/or motion information of blocks in a picture that have already been reconstructed.
  • the stored motion information may be transmitted to the inter prediction unit 180 in order to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block.
  • the memory 170 may store reconstructed samples of reconstructed blocks in the current picture, and may be transmitted to the intra prediction unit 185.
  • FIG. 3 is a schematic diagram of an image decoding apparatus to which an embodiment according to the present disclosure can be applied.
  • the image decoding apparatus 200 includes an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an addition unit 235, a filtering unit 240, and a memory 250. ), an inter prediction unit 260 and an intra prediction unit 265.
  • the inter prediction unit 260 and the intra prediction unit 265 may be collectively referred to as a “prediction unit”.
  • the inverse quantization unit 220 and the inverse transform unit 230 may be included in the residual processing unit.
  • All or at least some of the plurality of constituent units constituting the image decoding apparatus 200 may be implemented as one hardware component (eg, a decoder or a processor) according to embodiments.
  • the memory 170 may include a DPB, and may be implemented by a digital storage medium.
  • the image decoding apparatus 200 receiving a bitstream including video/image information may reconstruct an image by performing a process corresponding to the process performed by the image encoding apparatus 100 of FIG. 2.
  • the image decoding apparatus 200 may perform decoding using a processing unit applied by the image encoding apparatus.
  • the processing unit of decoding may be, for example, a coding unit.
  • the coding unit may be a coding tree unit or may be obtained by dividing the largest coding unit.
  • the reconstructed image signal decoded and output through the image decoding apparatus 200 may be reproduced through a reproducing apparatus (not shown).
  • the image decoding apparatus 200 may receive a signal output from the image encoding apparatus of FIG. 2 in the form of a bitstream.
  • the received signal may be decoded through the entropy decoding unit 210.
  • the entropy decoding unit 210 may parse the bitstream to derive information (eg, video/video information) necessary for image restoration (or picture restoration).
  • the video/video information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS).
  • the video/video information may further include general constraint information.
  • the image decoding apparatus may additionally use information on the parameter set and/or the general restriction information to decode an image.
  • the signaling information, received information, and/or syntax elements mentioned in the present disclosure may be obtained from the bitstream by decoding through the decoding procedure.
  • the entropy decoding unit 210 decodes information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and quantizes a value of a syntax element required for image restoration and a transform coefficient related to a residual. You can print out the values.
  • the CABAC entropy decoding method receives a bin corresponding to each syntax element in a bitstream, and includes information on the syntax element to be decoded, decoding information of the neighboring block and the block to be decoded, or information of the symbol/bin decoded in the previous step.
  • the context model is determined by using and, according to the determined context model, the probability of occurrence of bins is predicted to perform arithmetic decoding of the bins to generate a symbol corresponding to the value of each syntax element.
  • the CABAC entropy decoding method may update the context model using information of the decoded symbol/bin for the context model of the next symbol/bin after the context model is determined.
  • information about prediction is provided to the prediction unit (inter prediction unit 260 and intra prediction unit 265), and the register on which entropy decoding is performed by the entropy decoding unit 210
  • the dual value that is, quantized transform coefficients and related parameter information may be input to the inverse quantization unit 220.
  • information about filtering among information decoded by the entropy decoding unit 210 may be provided to the filtering unit 240.
  • a receiving unit for receiving a signal output from the image encoding device may be additionally provided as an inner/outer element of the image decoding device 200, or the receiving unit is provided as a component of the entropy decoding unit 210 It could be.
  • the video decoding apparatus may include an information decoder (video/video/picture information decoder) and/or a sample decoder (video/video/picture sample decoder).
  • the information decoder may include an entropy decoding unit 210, and the sample decoder includes an inverse quantization unit 220, an inverse transform unit 230, an addition unit 235, a filtering unit 240, a memory 250, It may include at least one of the inter prediction unit 260 and the intra prediction unit 265.
  • the inverse quantization unit 220 may inverse quantize the quantized transform coefficients and output transform coefficients.
  • the inverse quantization unit 220 may rearrange the quantized transform coefficients in a two-dimensional block shape. In this case, the rearrangement may be performed based on a coefficient scan order performed by the image encoding apparatus.
  • the inverse quantization unit 220 may perform inverse quantization on quantized transform coefficients using a quantization parameter (eg, quantization step size information) and obtain transform coefficients.
  • a quantization parameter eg, quantization step size information
  • the inverse transform unit 230 may inverse transform the transform coefficients to obtain a residual signal (residual block, residual sample array).
  • the prediction unit may perform prediction on the current block and generate a predicted block including prediction samples for the current block.
  • the prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on the prediction information output from the entropy decoding unit 210, and determine a specific intra/inter prediction mode (prediction technique). I can.
  • the prediction unit can generate the prediction signal based on various prediction methods (techniques) described later.
  • the intra prediction unit 265 may predict the current block by referring to samples in the current picture.
  • the description of the intra prediction unit 185 may be equally applied to the intra prediction unit 265.
  • the inter prediction unit 260 may derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on the reference picture.
  • motion information may be predicted in units of blocks, subblocks, or samples based on correlation between motion information between neighboring blocks and the current block.
  • the motion information may include a motion vector and a reference picture index.
  • the motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information.
  • the neighboring block may include a spatial neighboring block existing in the current picture and a temporal neighboring block existing in the reference picture.
  • the inter prediction unit 260 may construct a motion information candidate list based on neighboring blocks, and derive a motion vector and/or a reference picture index of the current block based on the received candidate selection information.
  • Inter prediction may be performed based on various prediction modes (techniques), and the information on prediction may include information indicating a mode (technique) of inter prediction for the current block.
  • the addition unit 235 is reconstructed by adding the obtained residual signal to the prediction signal (predicted block, prediction sample array) output from the prediction unit (including the inter prediction unit 260 and/or the intra prediction unit 265).
  • a signal (restored picture, reconstructed block, reconstructed sample array) can be generated.
  • the predicted block may be used as a reconstructed block.
  • the description of the addition unit 155 may be equally applied to the addition unit 235.
  • the addition unit 235 may be referred to as a restoration unit or a restoration block generation unit.
  • the generated reconstructed signal may be used for intra prediction of the next processing target block in the current picture, and may be used for inter prediction of the next picture through filtering as described later.
  • the filtering unit 240 may improve subjective/objective image quality by applying filtering to the reconstructed signal.
  • the filtering unit 240 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and the modified reconstructed picture may be converted to the memory 250, specifically, the DPB of the memory 250. Can be saved on.
  • the various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, and the like.
  • the reconstructed picture (modified) stored in the DPB of the memory 250 may be used as a reference picture in the inter prediction unit 260.
  • the memory 250 may store motion information of a block from which motion information in a current picture is derived (or decoded) and/or motion information of blocks in a picture that have already been reconstructed.
  • the stored motion information may be transmitted to the inter prediction unit 260 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block.
  • the memory 250 may store reconstructed samples of reconstructed blocks in the current picture, and may be transmitted to the intra prediction unit 265.
  • embodiments described in the filtering unit 160, the inter prediction unit 180, and the intra prediction unit 185 of the image encoding apparatus 100 are respectively the filtering unit 240 of the image decoding apparatus 200, The same or corresponding to the inter prediction unit 260 and the intra prediction unit 265 may be applied.
  • the video/image coding method according to the present disclosure may be performed based on the following image segmentation structure. Specifically, procedures such as prediction, residual processing ((inverse) transformation, (inverse) quantization, etc.), syntax element coding, filtering, etc., which will be described later, are CTU, CU (and/or TU, PU) can be performed.
  • the image may be divided in block units, and the block division procedure may be performed by the image dividing unit 110 of the above-described encoding apparatus.
  • Split-related information may be encoded by the entropy encoding unit 190 and transmitted to a decoding apparatus in the form of a bitstream.
  • the entropy decoding unit 210 of the decoding apparatus derives a block division structure of the current picture based on the division-related information obtained from the bitstream, and based on this, a series of procedures for decoding an image (ex. prediction, residual). Processing, block/picture restoration, in-loop filtering, etc.) can be performed.
  • Pictures can be divided into a sequence of coding tree units (CTUs). 4 shows an example in which a picture is divided into CTUs.
  • the CTU may correspond to a coding tree block (CTB).
  • CTB coding tree block
  • the CTU may include a coding tree block of luma samples and two coding tree blocks of corresponding chroma samples.
  • the CTU may include an NxN block of luma samples and two corresponding blocks of chroma samples.
  • the coding unit is obtained by recursively dividing a coding tree unit (CTU) or a maximum coding unit (LCU) according to a QT/BT/TT (Quad-tree/binary-tree/ternary-tree) structure.
  • CTU coding tree unit
  • LCU maximum coding unit
  • QT/BT/TT Quad-tree/binary-tree/ternary-tree
  • the CTU may be first divided into a quadtree structure. Thereafter, leaf nodes of a quadtree structure may be further divided by a multitype tree structure.
  • the division according to the quadtree means division in which the current CU (or CTU) is divided into four. By partitioning according to the quadtree, the current CU can be divided into four CUs having the same width and the same height.
  • the current CU corresponds to a leaf node of the quadtree structure.
  • the CU corresponding to the leaf node of the quadtree structure is no longer divided and may be used as the above-described final coding unit.
  • a CU corresponding to a leaf node of a quadtree structure may be further divided by a multitype tree structure.
  • the division according to the multi-type tree structure may include two divisions according to the binary tree structure and two divisions according to the ternary tree structure.
  • the two divisions according to the binary tree structure may include vertical binary splitting (SPLIT_BT_VER) and horizontal binary splitting (SPLIT_BT_HOR).
  • the vertical binary division (SPLIT_BT_VER) means division in which the current CU is divided into two in the vertical direction. As shown in FIG. 5, two CUs having a height equal to the height of the current CU and a width of half the width of the current CU may be generated by vertical binary division.
  • the horizontal binary division means division in which the current CU is divided into two in the horizontal direction. As shown in FIG. 5, two CUs having a height of half the height of the current CU and a width equal to the width of the current CU may be generated by horizontal binary division.
  • the two divisions according to the ternary tree structure may include vertical ternary splitting (SPLIT_TT_VER) and horizontal ternary splitting (hotizontal ternary splitting, SPLIT_TT_HOR).
  • the vertical ternary division (SPLIT_TT_VER) divides the current CU in the vertical direction at a ratio of 1:2:1. As shown in FIG. 5, by vertical ternary division, two CUs having a height equal to the height of the current CU and a width of 1/4 of the width of the current CU, and a current CU having a height equal to the height of the current CU A CU with a width of half the width of can be created.
  • the horizontal ternary division divides the current CU in the horizontal direction at a ratio of 1:2:1. As shown in FIG. 4, by horizontal ternary division, two CUs having a height of 1/4 of the height of the current CU and having the same width as the width of the current CU, and a height of half the height of the current CU, and the current One CU can be created with a width equal to the width of the CU.
  • FIG. 6 is a diagram illustrating a signaling mechanism of block division information in a quadtree with nested multi-type tree structure according to the present disclosure.
  • the CTU is treated as a root node of a quadtree, and the CTU is first divided into a quadtree structure.
  • Information eg, qt_split_flag
  • qt_split_flag a first value (eg, “1”)
  • the current CU may be quadtree split.
  • qt_split_flag is a second value (eg, "0")
  • the current CU is not divided into a quadtree, but becomes a leaf node (QT_leaf_node) of the quadtree.
  • the leaf nodes of each quadtree can then be further divided into a multi-type tree structure. That is, a leaf node of a quad tree may be a node (MTT_node) of a multi-type tree.
  • a first flag (ex. mtt_split_cu_flag) may be signaled to indicate whether the current node is additionally divided.
  • a second flag (e.g. mtt_split_cu_verticla_flag) may be signaled to indicate the splitting direction.
  • the division direction may be a vertical direction
  • the second flag is 0, the division direction may be a horizontal direction.
  • a third flag (eg, mtt_split_cu_binary_flag) may be signaled to indicate whether the division type is a binary division type or a ternary division type.
  • the division type may be a binary division type
  • the third flag when the third flag is 0, the division type may be a ternary division type.
  • Nodes of a multitype tree obtained by binary division or ternary division may be further partitioned into a multitype tree structure.
  • nodes of a multitype tree cannot be partitioned into a quadtree structure.
  • the first flag is 0, the corresponding node of the multi-type tree is no longer divided and becomes a leaf node (MTT_leaf_node) of the multi-type tree.
  • the CU corresponding to the leaf node of the multitype tree may be used as the above-described final coding unit.
  • a multi-type tree splitting mode (MttSplitMode) of the CU may be derived as shown in Table 1.
  • the multitree partitioning mode may be abbreviated as a multitree partitioning type or a partitioning type.
  • a bold block edge 710 represents a quadtree division
  • the remaining edges 720 represent a multitype tree division.
  • the CU may correspond to a coding block (CB).
  • a CU may include a coding block of luma samples and two coding blocks of chroma samples corresponding to the luma samples.
  • the chroma component (sample) CB or TB size is determined by the luma component (sample) according to the component ratio according to the color format (chroma format, ex. 4:4:4, 4:2:2, 4:2:0, etc.) of the picture/video. ) Can be derived based on CB or TB size.
  • the color format is 4:4:4, the chroma component CB/TB size may be set equal to the luma component CB/TB size.
  • the width of the chroma component CB/TB may be set to half the width of the luma component CB/TB, and the height of the chroma component CB/TB may be set to the height of the luma component CB/TB.
  • the width of the chroma component CB/TB may be set to half the width of the luma component CB/TB, and the height of the chroma component CB/TB may be set to half the height of the luma component CB/TB.
  • the size of the CU when the size of the CTU is 128 based on the luma sample unit, the size of the CU may have a size from 128 x 128 to 4 x 4, which is the same size as the CTU. In one embodiment, in the case of a 4:2:0 color format (or chroma format), the chroma CB size may have a size ranging from 64x64 to 2x2.
  • the CU size and the TU size may be the same.
  • a plurality of TUs may exist in the CU region.
  • the TU size may generally represent a luma component (sample) TB (Transform Block) size.
  • the TU size may be derived based on a preset maximum allowable TB size (maxTbSize). For example, when the CU size is larger than the maxTbSize, a plurality of TUs (TB) having the maxTbSize may be derived from the CU, and transformation/inverse transformation may be performed in units of the TU (TB). For example, the maximum allowable luma TB size may be 64x64, and the maximum allowable chroma TB size may be 32x32. If the width or height of the CB divided according to the tree structure is larger than the maximum transform width or height, the CB may be automatically (or implicitly) divided until the TB size limit in the horizontal and vertical directions is satisfied.
  • the intra prediction mode/type is derived in units of the CU (or CB), and procedures for deriving neighboring reference samples and generating prediction samples may be performed in units of TU (or TB).
  • the intra prediction mode/type is derived in units of the CU (or CB)
  • procedures for deriving neighboring reference samples and generating prediction samples may be performed in units of TU (or TB).
  • one or a plurality of TUs (or TBs) may exist in one CU (or CB) region, and in this case, the plurality of TUs (or TBs) may share the same intra prediction mode/type.
  • the following parameters may be signaled from the encoding device to the decoding device as SPS syntax elements.
  • SPS syntax elements For example, CTU size, a parameter indicating the size of the root node of a quadtree tree, MinQTSize, a parameter indicating the minimum usable size of a quadtree leaf node, MaxBTSize, a parameter indicating the maximum usable size of a binary tree root node, and a ternary tree.
  • MaxTTSize a parameter representing the maximum usable size of a root node, MaxMttDepth, a parameter representing the maximum allowed hierarchy depth of a multitype tree divided from a quadtree leaf node, and a parameter representing the minimum usable leaf node size of a binary tree.
  • MinBtSize and MinTtSize which is a parameter indicating the minimum available leaf node size of the ternary tree, may be signaled.
  • the CTU size may be set to a 128x128 luma block and two 64x64 chroma blocks corresponding to the luma block.
  • MinQTSize is set to 16x16
  • MaxBtSize is set to 128x1208
  • MaxTtSzie is set to 64x64
  • MinBtSize and MinTtSize are set to 4x4
  • MaxMttDepth may be set to 4.
  • Quart tree partitioning can be applied to CTU to create quadtree leaf nodes.
  • the quadtree leaf node may be referred to as a leaf QT node.
  • Quadtree leaf nodes may have a size of 128x128 (e.g.
  • the leaf QT node is 128x128, it may not be additionally divided into a binary tree/ternary tree. This is because in this case, even if it is divided, it exceeds MaxBtsize and MaxTtszie (i.e. 64x64). In other cases, the leaf QT node can be further divided into a multi-type tree. Therefore, the leaf QT node is a root node for a multi-type tree, and the leaf QT node may have a multi-type tree depth (mttDepth) of 0. If the multi-type tree depth reaches MaxMttdepth (ex. 4), additional partitioning may not be considered any more.
  • mttDepth multi-type tree depth
  • the encoding apparatus may omit signaling of the division information. In this case, the decoding apparatus may derive the segmentation information with a predetermined value.
  • one CTU may include a coding block of luma samples (hereinafter referred to as a “luma block”) and two coding blocks of chroma samples corresponding thereto (hereinafter referred to as a “chroma block”).
  • the above-described coding tree scheme may be applied equally to the luma block and the chroma block of the current CU, or may be applied separately.
  • a luma block and a chroma block in one CTU may be divided into the same block tree structure, and the tree structure in this case may be represented as a single tree (SINGLE_TREE).
  • a luma block and a chroma block in one CTU may be divided into individual block tree structures, and the tree structure in this case may be represented as a dual tree (DUAL_TREE). That is, when the CTU is divided into a dual tree, a block tree structure for a luma block and a block tree structure for a chroma block may exist separately.
  • the block tree structure for the luma block may be referred to as a dual tree luma (DUAL_TREE_LUMA)
  • the block tree structure for the chroma block may be referred to as a dual tree chroma (DUAL_TREE_CHROMA).
  • luma blocks and chroma blocks in one CTU may be limited to have the same coding tree structure.
  • luma blocks and chroma blocks may have separate block tree structures from each other. If an individual block tree structure is applied, a luma coding tree block (CTB) may be divided into CUs based on a specific coding tree structure, and the chroma CTB may be divided into chroma CUs based on a different coding tree structure.
  • CTB luma coding tree block
  • a CU in an I slice/tile group to which an individual block tree structure is applied is composed of a coding block of a luma component or a coding block of two chroma components, and a CU of a P or B slice/tile group has three color components (luma component And two chroma components).
  • the structure in which the CU is divided is not limited thereto.
  • the BT structure and the TT structure can be interpreted as a concept included in the Multiple Partitioning Tree (MPT) structure, and the CU can be interpreted as being divided through the QT structure and the MPT structure.
  • MPT Multiple Partitioning Tree
  • a syntax element e.g., MPT_split_type
  • MPT_split_mode a syntax element including information on which direction of splitting between horizontal and horizontal.
  • the CU may be divided in a different way from the QT structure, the BT structure, or the TT structure. That is, according to the QT structure, the CU of the lower depth is divided into 1/4 size of the CU of the upper depth, or the CU of the lower depth is divided into 1/2 of the CU of the upper depth according to the BT structure, or according to the TT structure. Unlike CUs of lower depth are divided into 1/4 or 1/2 of CUs of higher depth, CUs of lower depth are 1/5, 1/3, 3/8, 3 of CUs of higher depth depending on the case. It may be divided into /5, 2/3, or 5/8 size, and the method of partitioning the CU is not limited thereto.
  • the quadtree coding block structure accompanying the multi-type tree can provide a very flexible block division structure.
  • different partitioning patterns may potentially lead to the same coding block structure result in some cases.
  • the encoding device and the decoding device can reduce the amount of data of the split information by limiting the occurrence of such redundant split patterns.
  • FIG. 8 exemplarily shows redundant partitioning patterns that may occur in binary tree partitioning and ternary tree partitioning.
  • consecutive binary divisions 810 and 820 in one direction of the second level have the same coding block structure as binary division for the center partition after ternary division.
  • the binary tree division for the center blocks 830 and 840 of the ternary tree division may be prohibited. This prohibition can be applied to CUs of all pictures.
  • signaling of corresponding syntax elements may be modified to reflect such a prohibited case, and through this, the number of bits signaled for division may be reduced. For example, as in the example shown in FIG.
  • the mtt_split_cu_binary_flag syntax element indicating whether the division is binary division or ternary division is not signaled, and its value is It can be induced to 0 by the decoding device.
  • the source or coded picture/video may include a luma component (Y) block and two chroma component (cb, cr) blocks. That is, one pixel of a picture/image may include a luma sample and two chroma samples cb and cr.
  • the chroma format may represent a configuration format of a luma sample and a chroma sample (cb, cr), and may also be called a color format.
  • the chroma format may be predetermined or may be signaled adaptively. For example, the chroma format may be signaled based on at least one of chroma_format_idc and separate_colour_plane_flag as shown in Table 2.
  • At least one of chroma_format_idc and separate_colour_plane_flag may be signaled through a higher level syntax such as DPS, VPS, SPS, or PPS.
  • chroma_format_idc and separate_colour_plane_flag may be included in the SPS syntax.
  • chroma_format_idc may indicate a luma sample and a format of a chroma sample corresponding thereto, and separate_colour_plane_flag indicates whether three color components (Y, Cb, Cr) are separately encoded in a 4:4:4 chroma format. Can be indicated.
  • the chroma format corresponds to a monochrome format, and the current block does not include a chroma component block and may include only a luma component block.
  • chroma_format_idc 1
  • the chroma format corresponds to a 4:2:0 chroma format
  • the width and height of the chroma component block may correspond to half of the width and height of the luma component block, respectively.
  • the chroma format corresponds to the 4:2:2 chroma format
  • the width of the chroma component block is half the width of the luma component block
  • the height of the chroma component block is equal to the height of the luma component block. It can be the same.
  • the chroma format corresponds to a 4:4:4 chroma format
  • the width and height of the chroma component block may be the same as the width and height of the luma component block, respectively.
  • SubWidthC and SubHeightC may represent a ratio between a luma sample and a chroma sample.
  • the width and height of the luma component block are CbWidth and CbHeight, respectively
  • the width and height of the chroma component block may be derived as (CbWidth/SubwidthC) and (CbHeight/SubHeightC), respectively.
  • the size of a chroma block may have a great influence on throughput. For example, when a chroma block having a predetermined size or less is excessively generated, a throughput of an image encoding/decoding process may be significantly lowered. In order to solve this problem, CU partitioning may be limited so that chroma blocks of a predetermined size or less are not generated.
  • the image encoding/decoding apparatus may set a minimum size of a chroma block.
  • a chroma block may be limited to include at least 16 chroma samples.
  • division of a luma block or a chroma block may be limited so that a 2x2, 2x4, or 4x2 chroma block is not generated.
  • quadtree division and/or binary division for 2x8, 4x4, or 8x2 chroma blocks may be limited.
  • ternary division for 2x8, 2x16, 4x4, 4x8, 8x2, or 8x4 chroma blocks may be limited.
  • quadtree division for the current block may be limited.
  • binary division for the current block may be restricted.
  • ternary division for the current block may be limited.
  • a luma block and a chroma block corresponding to the luma block may be divided in the same manner.
  • a chroma block corresponding to the luma block may also be vertically ternary segmented.
  • whether to divide a CU may be determined based on the size of a luma block included in the CU.
  • the size of the chroma block corresponding to the luma block may be determined based on the size and color format of the luma block, as described above with reference to Table 2.
  • FIG. 9 is a diagram illustrating an example of a luma block and a chroma block in a 4:2:0 color format.
  • 10A to 10C are diagrams illustrating an example of a syntax for dividing a current CTU into a local dual tree.
  • the size of a chroma block corresponding to the luma block may be determined to be 8x4.
  • the 8x4 chroma block is vertically ternary divided, a 2x4 chroma block may be generated.
  • the chroma block is limited to include at least 16 chroma samples, the 2x4 chroma block cannot satisfy the minimum size limit. Accordingly, additional division of an 8x4 chroma block may be prohibited in the 4:2:0 color format.
  • the additional division of the chroma block may be allowed. Accordingly, when additional partitioning is performed only on the luma block, the luma block and the chroma block that have been divided into a single tree structure in the current CTU may be converted into a dual tree structure.
  • a luma block divided into a dual tree structure and a divided structure of a chroma block may be referred to as a local dual tree structure.
  • 10A to 10C are diagrams illustrating an example of syntax for converting a single tree structure to a dual tree structure.
  • 10A to 10C illustrate one coding_tree syntax by dividing it into three drawings for convenience.
  • a prediction mode type of each of CUs generated from a current CTU may be determined based on a modeTypeCondition parameter in a coding_tree syntax.
  • modeTypeCondition may indicate a prediction mode characteristic of each of the CUs.
  • modeType may indicate a prediction mode type of each of the CUs.
  • modeType is MODE_TYPE_ALL indicating that all prediction modes such as intra prediction, IBC, palette mode, inter prediction, etc. are available, MODE_TYPE_INTRA indicating that only intra prediction, IBC and palette modes are available, and only inter prediction modes are available. It can have any one of MODE_TYPE_INTER indicating that it is.
  • the modeTypeCondition of the current CU may have any one of a first value (e.g. 0) to a third value (e.g. 2) according to a predetermined condition.
  • modeTypeCondition may have a first value (e.g. 0).
  • the modeTypeCondition may have a second value (e.g. 1).
  • the current CU may mean a luma component block of the current CU.
  • the modeTypeCondition is the second value (eg 1) or the second value according to whether the current CU is included in the I slice. It can have a value of 3 (eg 2).
  • modeTypeCondition has a second value if the current CU is included in the I slice, and modeTypeCondition is zero if the current CU is not included in the I slice. It can have a value of 3.
  • the current CU may mean a luma component block of the current CU.
  • modeTypeCondition may have a first value (e.g. 0).
  • the modeType of the current CU may be determined based on the value of modeTypeCondition.
  • modeTypeCondition has a second value (e.g. 1) (1010)
  • modeType may be determined as MODE_TYPE_INTRA (1020).
  • modeType when modeTypeCondition has a third value (e.g. 2) (1030), modeType may be determined based on the value of mode_constraint_flag.
  • mode_constraint_flag may indicate whether the inter prediction mode can be applied to the current CU.
  • the first value (e.g. 0) of mode_constraint_flag may indicate that only the inter prediction mode can be applied to the current CU.
  • the modeType of the current CU may be determined as MODE_TYPE_INTER.
  • the second value (e.g. 1) of mode_constraint_flag may indicate that the inter prediction mode cannot be applied to the current CU.
  • modeType may be determined as MODE_TYPE_INTRA (1040).
  • modeTypeCondition has a value other than the second value (eg 1) and the third value (eg 2) (for example, when modeTypeCondition has the first value (eg 0))
  • modeType is the same value as modeTypeCurr It can be determined as (1050).
  • modeTypeCurr is a call input value of the coding_tree syntax, and may mean a prediction mode type of the current CU.
  • modeTypeCurr may be MODE_TYPE_ALL.
  • the modeType determined based on the value of modeTypeCondition may be used as a call input value of a coding_tree syntax for calling a lower CU obtained by dividing the current CU.
  • a treeType of a lower CU generated by dividing the current CU may be determined (1060 ).
  • the split structure of the lower CU may be determined as a dual tree luma (DUAL_TREE_LUMA).
  • the partition structure of the lower CU may be the same as the partition structure of the current CU (treeTypeCurr).
  • Information on the partition structure of the lower CU may be stored in the parameter treeType.
  • the treeType and modeType can be used as input values of coding_tree syntax for calling lower CUs by additionally dividing the current CU.
  • the current CU may be additionally divided into a dual tree structure.
  • the lower CU may have a tree structure of a dual tree luma (DUAL_TREE_LUMA). That is, the luma component and the chroma component of the current CU may be divided into separate tree structures (1070).
  • DUAL_TREE_LUMA dual tree luma
  • the chroma component of the current CU is not divided, and the lower CU may have a tree structure of a dual tree chroma (DUAL_TREE_CHROMA). Yes (1080).
  • the modeType of the lower CU may be determined based on modeTypeCondition.
  • the modeType of the lower CU is MODE_TYPE_INTRA
  • the luma component of the lower CU may have a dual tree luma tree structure
  • the chroma component of the lower CU may have a dual tree chroma tree structure. That is, the lower CU partially has a dual tree structure in the current CTU, and such a partition structure may be referred to as a local dual tree structure.
  • Intra prediction may represent prediction of generating prediction samples for a current block based on reference samples in a picture (hereinafter, referred to as a current picture) to which the current block belongs.
  • a current picture a picture to which the current block belongs.
  • neighboring reference samples to be used for intra prediction of the current block may be derived.
  • the neighboring reference samples of the current block are a sample adjacent to the left boundary of the current block of size nWxnH, a total of 2xnH samples adjacent to the bottom-left, and a sample adjacent to the top boundary of the current block. And a total of 2xnW samples adjacent to the top-right side and one sample adjacent to the top-left side of the current block.
  • the peripheral reference samples of the current block may include a plurality of columns of upper peripheral samples and a plurality of rows of left peripheral samples.
  • the neighboring reference samples of the current block are a total of nH samples adjacent to the right boundary of the current block of size nWxnH, a total of nW samples adjacent to the bottom boundary of the current block, and the lower right side of the current block. It may include one sample adjacent to (bottom-right).
  • the decoder may construct neighboring reference samples to be used for prediction by substituting samples that are not available with available samples.
  • neighboring reference samples to be used for prediction may be configured through interpolation of available samples.
  • a prediction sample can be derived based on an average or interpolation of neighboring reference samples of the current block, and (ii) neighboring reference samples of the current block Among them, the prediction sample may be derived based on a reference sample existing in a specific (prediction) direction with respect to the prediction sample.
  • it may be called a non-directional mode or a non-angular mode
  • it may be called a directional mode or an angular mode.
  • LIP linear interpolation intra prediction
  • chroma prediction samples may be generated based on luma samples using a linear model. This case may be called LM (Linear Model) mode.
  • LM Linear Model
  • a temporary prediction sample of the current block is derived based on the filtered surrounding reference samples, and at least one derived according to the intra prediction mode among the existing surrounding reference samples, that is, unfiltered surrounding reference samples.
  • a prediction sample of the current block may be derived by weighted summation of a reference sample and the temporary prediction sample. This case may be called PDPC (Position dependent intra prediction).
  • a reference sample line having the highest prediction accuracy among the neighboring multi-reference sample lines of the current block may be selected, and a prediction sample may be derived using a reference sample positioned in the prediction direction from the corresponding line.
  • information on the used reference sample line eg, intra_luma_ref_idx
  • MRL multi-reference line intra prediction
  • the current block may be divided into vertical or horizontal subpartitions, and intra prediction may be performed for each subpartition based on the same intra prediction mode.
  • neighboring reference samples for intra prediction may be derived for each subpartition. That is, the reconstructed sample of the previous sub-partition in the encoding/decoding order may be used as a neighboring reference sample of the current sub-partition.
  • the intra prediction mode for the current block is equally applied to the subpartitions, but by deriving and using neighboring reference samples in units of the subpartitions, intra prediction performance may be improved in some cases.
  • This prediction method may be called intra sub-partitions (ISP) or ISP-based intra prediction.
  • the intra prediction technique may include at least one of the aforementioned LIP, LM, PDPC, MRL, and ISP. Meanwhile, post-processing filtering may be performed on the derived prediction samples as necessary.
  • the intra prediction procedure may include an intra prediction mode/type determination step, a neighbor reference sample derivation step, and an intra prediction mode/type-based prediction sample derivation step. Also, if necessary, a post-filtering step may be performed on the derived prediction samples.
  • FIG. 11 is a flowchart illustrating a video/video encoding method based on intra prediction.
  • the encoding method of FIG. 11 may be performed by the video encoding apparatus of FIG. 2. Specifically, step S1110 may be performed by the intra prediction unit 185, and step S1120 may be performed by the residual processing unit. Specifically, step S1120 may be performed by the subtraction unit 115. Step S1130 may be performed by the entropy encoding unit 190.
  • the prediction information of step S1130 may be derived by the intra prediction unit 185, and the residual information of step S1130 may be derived by the residual processing unit.
  • the residual information is information on the residual samples.
  • the residual information may include information on quantized transform coefficients for the residual samples.
  • the residual samples may be derived as transform coefficients through the transform unit 120 of the image encoding apparatus, and the transform coefficients may be derived as quantized transform coefficients through the quantization unit 130.
  • Information on the quantized transform coefficients may be encoded by the entropy encoding unit 190 through a residual coding procedure.
  • the image encoding apparatus may perform intra prediction on the current block (S1110).
  • the video encoding apparatus determines the intra prediction mode/type for the current block, derives neighboring reference samples of the current block, and then generates prediction samples in the current block based on the intra prediction mode/type and the neighboring reference samples. can do.
  • the procedure of determining the intra prediction mode/type, deriving neighboring reference samples, and generating prediction samples may be performed simultaneously, or one procedure may be performed before the other procedure.
  • FIG. 12 is a diagram illustrating a configuration of an intra prediction unit according to the present disclosure.
  • the intra prediction unit 185 of the video encoding apparatus may include an intra prediction mode/type determination unit 186, a reference sample derivation unit 187, and/or a prediction sample derivation unit 188.
  • the intra prediction mode/type determiner 186 may determine an intra prediction mode/type for the current block.
  • the reference sample derivation unit 187 may derive neighboring reference samples of the current block.
  • the prediction sample derivation unit 188 may derive prediction samples of the current block.
  • the intra prediction unit 185 may further include a prediction sample filter unit (not shown).
  • the image encoding apparatus may determine a mode/type applied to the current block from among a plurality of intra prediction modes/types.
  • the video encoding apparatus may compare RD costs for the intra prediction modes/types and determine an optimal intra prediction mode/type for the current block.
  • the image encoding apparatus may perform a prediction sample filtering procedure.
  • Predictive sample filtering may be referred to as post filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering procedure. In some cases, the prediction sample filtering procedure may be omitted.
  • the apparatus for encoding an image may generate residual samples for the current block based on prediction samples or filtered prediction samples (S1120).
  • the image encoding apparatus may derive the residual samples by subtracting the prediction samples from original samples of the current block. That is, the image encoding apparatus may derive the residual sample value by subtracting the corresponding predicted sample value from the original sample value.
  • the image encoding apparatus may encode image information including information about the intra prediction (prediction information) and residual information about the residual samples (S1130).
  • the prediction information may include intra prediction mode information and/or intra prediction technique information.
  • the image encoding apparatus may output the encoded image information in the form of a bitstream.
  • the output bitstream may be delivered to an image decoding apparatus through a storage medium or a network.
  • the residual information may include a residual coding syntax to be described later.
  • the image encoding apparatus may transform/quantize the residual samples to derive quantized transform coefficients.
  • the residual information may include information on the quantized transform coefficients.
  • the image encoding apparatus may generate a reconstructed picture (including reconstructed samples and a reconstructed block). To this end, the image encoding apparatus may perform inverse quantization/inverse transformation on the quantized transform coefficients again to derive (modified) residual samples. The reason why the residual samples are transformed/quantized and then inverse quantized/inverse transformed is performed to derive residual samples that are the same as the residual samples derived from the image decoding apparatus.
  • the image encoding apparatus may generate a reconstructed block including reconstructed samples for the current block based on the prediction samples and the (modified) residual samples. A reconstructed picture for the current picture may be generated based on the reconstructed block. As described above, an in-loop filtering procedure or the like may be further applied to the reconstructed picture.
  • FIG. 13 is a flowchart illustrating a video/video decoding method based on intra prediction.
  • the image decoding apparatus may perform an operation corresponding to an operation performed by the image encoding apparatus.
  • the decoding method of FIG. 13 may be performed by the video decoding apparatus of FIG. 3.
  • Steps S1310 to S1330 may be performed by the intra prediction unit 265, and the prediction information of step S1310 and the residual information of step S1440 may be obtained from the bitstream by the entropy decoding unit 210.
  • the residual processing unit of the image decoding apparatus may derive residual samples for the current block based on the residual information (S1340).
  • the inverse quantization unit 220 of the residual processing unit derives transform coefficients by performing inverse quantization based on the quantized transform coefficients derived based on the residual information
  • the inverse transform unit of the residual processing unit ( 230) may derive residual samples for the current block by performing inverse transform on the transform coefficients.
  • Step S1350 may be performed by the addition unit 235 or the restoration unit.
  • the image decoding apparatus may derive an intra prediction mode/type for the current block based on the received prediction information (intra prediction mode/type information) (S1310).
  • the image decoding apparatus may derive neighboring reference samples of the current block (S1320).
  • the image decoding apparatus may generate prediction samples in the current block based on the intra prediction mode/type and the neighboring reference samples (S1330).
  • the image decoding apparatus may perform a prediction sample filtering procedure. Predictive sample filtering may be referred to as post filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering procedure. In some cases, the prediction sample filtering procedure may be omitted.
  • the image decoding apparatus may generate residual samples for the current block based on the received residual information (S1340).
  • the image decoding apparatus may generate reconstructed samples for the current block based on the prediction samples and the residual samples, and derive a reconstructed block including the reconstructed samples (S1350).
  • a reconstructed picture for the current picture may be generated based on the reconstructed block.
  • an in-loop filtering procedure or the like may be further applied to the reconstructed picture.
  • FIG. 14 is a diagram illustrating a configuration of an intra prediction unit according to the present disclosure.
  • the intra prediction unit 265 of the image decoding apparatus may include an intra prediction mode/type determination unit 266, a reference sample derivation unit 267, and a prediction sample derivation unit 268. .
  • the intra prediction mode/type determiner 266 determines an intra prediction mode/type for the current block based on intra prediction mode/type information generated and signaled by the intra prediction mode/type determiner 186 of the image encoding apparatus.
  • the reference sample deriving unit 266 may derive neighboring reference samples of the current block from the reconstructed reference region in the current picture.
  • the prediction sample derivation unit 268 may derive prediction samples of the current block.
  • the intra prediction unit 265 may further include a prediction sample filter unit (not shown).
  • the intra prediction mode information may include flag information (eg intra_luma_mpm_flag and/or intra_chroma_mpm_flag) indicating whether a most probable mode (MPM) is applied to the current block or a remaining mode is applied, for example. And, when the MPM is applied to the current block, the intra prediction mode information may further include index information (eg intra_luma_mpm_idx and/or intra_chroma_mpm_idx) indicating one of intra prediction mode candidates (MPM candidates).
  • the intra prediction mode candidates (MPM candidates) may be composed of an MPM candidate list or an MPM list.
  • the intra prediction mode information includes remaining mode information indicating one of the remaining intra prediction modes except for the intra prediction mode candidates (MPM candidates) (eg intra_luma_mpm_remainder and/ Alternatively, intra_chroma_mpm_remainder) may be further included.
  • the video decoding apparatus may determine an intra prediction mode of the current block based on the intra prediction mode information.
  • the MPM candidate modes may include an intra prediction mode and additional candidate modes of a neighboring block (e.g. a left neighboring block and/or an upper neighboring block) of the current block.
  • the intra prediction mode may include two non-directional intra prediction modes and 33 directional intra prediction modes.
  • the non-directional intra prediction modes may include a planar mode and a DC mode, and the directional intra prediction modes may include intra prediction modes 2 to 34.
  • the planar intra prediction mode may be referred to as a planner mode, and the DC intra prediction mode may be referred to as a DC mode.
  • the intra prediction mode may include two non-directional intra prediction modes and 65 extended directional intra prediction modes.
  • the non-directional intra prediction modes may include a planar mode and a DC mode
  • the extended directional intra prediction modes may include intra prediction modes 2 to 66.
  • the intra prediction mode can be applied to blocks of all sizes, and can be applied to both a luma component (a luma block) and a chroma component (a chroma block).
  • the intra prediction mode may include two non-directional intra prediction modes and 129 directional intra prediction modes.
  • the non-directional intra prediction modes may include a planar mode and a DC mode, and the directional intra prediction modes may include 2 to 130 intra prediction modes.
  • the intra prediction mode may further include a cross-component linear model (CCLM) mode for chroma samples in addition to the aforementioned intra prediction modes.
  • CCLM cross-component linear model
  • the CCLM mode can be divided into L_CCLM, T_CCLM, and LT_CCLM depending on whether left samples are considered, upper samples are considered, or both are considered to derive LM parameters, and can be applied only to a chroma component.
  • the intra prediction mode may include 93 directional intra prediction modes along with two non-directional intra prediction modes in order to capture an arbitrary edge direction presented in a natural video.
  • Non-directional intra prediction modes may include planar mode and DC mode.
  • the planar mode may be indicated as INTRA_PLANAR
  • the DC mode may be indicated as INTRA_DC.
  • the directional intra prediction mode may be expressed as INTRA_ANGULAR-14 to INTRA_ANGULAR-1, and INTRA_ANGULAR2 to INTRA_ANGULAR80.
  • the intra prediction technique information may be implemented in various forms.
  • the intra prediction technique information may include intra prediction technique index information indicating one of a plurality of intra prediction techniques.
  • the intra prediction technique information includes reference sample line information (eg intra_luma_ref_idx) indicating whether the MRL is applied to the current block and, if applied, a reference sample line (eg intra_luma_ref_idx), and the ISP is applied to the current block.
  • ISP flag information indicating whether it is applied (eg intra_subpartitions_mode_flag), ISP type information indicating the split type of subpartitions when the ISP is applied (eg intra_subpartitions_split_flag), flag information indicating whether or not PDPC is applied, or indicating whether the LIP is applied. It may include at least one of flag information.
  • the ISP flag information may be referred to as an ISP application indicator.
  • the intra prediction mode information and/or the intra prediction technique information may be encoded/decoded using the coding method described in the present disclosure.
  • the intra prediction mode information and/or the intra prediction method information may be encoded/decoded through entropy coding (e.g. CABAC, CAVLC) based on a truncated (rice) binary code.
  • entropy coding e.g. CABAC, CAVLC
  • intra prediction When intra prediction is performed on the current block, prediction on a luma component block (luma block) of the current block and prediction on a chroma component block (chroma block) may be performed.
  • the intra prediction mode for the chroma block is It can be set separately from the intra prediction mode for the luma block.
  • an intra prediction mode for a chroma block may be indicated based on intra chroma prediction mode information, and the intra chroma prediction mode information may be signaled in the form of an intra_chroma_pred_mode syntax element.
  • the intra-chroma prediction mode information includes one of a planar mode, a DC mode, a vertical mode, a horizontal mode, a derived mode (DM), and a cross-component linear model (CCLM) mode.
  • the planar mode may indicate a 0th intra prediction mode
  • the DC mode may indicate a 1st intra prediction mode
  • the vertical mode may indicate a 26th intra prediction mode
  • the horizontal mode may indicate a 10th intra prediction mode.
  • DM can also be called direct mode.
  • CCLM may be referred to as a linear model (LM).
  • the DM and CCLM are dependent intra prediction modes that predict a chroma block using information of a luma block.
  • the DM may represent a mode in which an intra prediction mode identical to an intra prediction mode for the luma component is applied as an intra prediction mode for the chroma component.
  • the CCLM subsamples the reconstructed samples of the luma block in the process of generating the prediction block for the chroma block, and then applies CCLM parameters ⁇ and ⁇ to the subsampled samples to be derived as shown in Equation 1. It may represent an intra prediction mode in which samples are used as prediction samples of the chroma block.
  • pred c (i,j) may represent a predicted sample of (i,j) coordinates of the current chroma block in the current CU.
  • rec L '(i,j) may represent a reconstructed sample of the (i,j) coordinate of the current luma block in the CU.
  • rec L '(i,j) may represent a down-sampled reconstructed sample of the current luma block.
  • the linear model coefficients ⁇ and ⁇ may be signaled, but may also be derived from surrounding samples.
  • the intra prediction mode of the chroma block may be derived as the intra prediction mode of the corresponding luma block.
  • an intra prediction mode at a predetermined position of a corresponding luma block may be used as an intra prediction mode of a chroma block.
  • intra prediction of a chroma block may be performed using Multiple Direct Modes (MDM).
  • MDM Multiple Direct Modes
  • the multiple DM is a mode in which the above-described single DM is extended to a plurality of modes, and a DM candidate list including a plurality of DM candidates is constructed to induce an intra prediction mode of a chroma block, and is included in the DM candidate list.
  • One of the candidates may be derived as an intra prediction mode of a chroma block.
  • the DM candidate list may include at least one of a plurality of DM candidates below.
  • -Directional mode derived by adding or subtracting a predetermined offset (e.g. 1) to the already included directional mode
  • -Default DM candidate mode vertical mode, horizontal mode, 2, 34, 66, 10, 26 modes (in case of 65 directional modes)
  • the intra prediction mode of the chroma block may be derived based on the intra chroma prediction mode information (intra_chroma_pred_mode) and/or the intra prediction mode of the corresponding luma block. For example, when the intra chroma prediction mode information indicates DM, the intra prediction mode of the chroma block may be determined to be the same as the intra prediction mode of the corresponding luma block.
  • intra prediction for a luma block may be performed based on an MPM list, and intra prediction for a chroma block may be performed based on a predetermined default mode and/or DM.
  • the default intra prediction mode may include a planar mode, a DC mode, a vertical mode, and a horizontal mode.
  • the palette mode may represent a prediction mode for encoding/decoding a current block based on a palette (or palette table) including a predetermined representative color value set.
  • each sample in the current block may be represented by a palette index indicating a predetermined representative color value.
  • encoding/decoding using the palette mode may be referred to as palette encoding/decoding.
  • the palette mode may be used to improve encoding/decoding efficiency of a specific image.
  • screen content which is an image that includes a significant amount of text and graphics and is generated by an electronic device such as a computer or a smartphone, includes a local area separated by a sharp edge, and the local area is a relatively small number of It can be expressed as pixel values. Therefore, the palette mode, which expresses most pixel values in the current block with a relatively small number of indices, is more effective in encoding/decoding screen contents than other prediction modes (eg intra prediction mode, inter prediction mode, etc.). I can.
  • the palette mode is a kind of the aforementioned intra prediction mode, and may be referred to as a palette encoding mode, an intra palette mode, an intra palette encoding mode, and the like.
  • the palette mode when the palette mode is applied to the current block, unlike the case of the intra prediction mode, the residual value for the current block may not be signaled separately.
  • the palette mode may be similar to the skip mode described above.
  • the palette mode can be applied to both the luma component and the chroma component of the current block.
  • the palette mode may be applied to the chroma component of the current block.
  • the palette mode can be applied individually to the luma component and the chroma component of the current block.
  • the palette mode may be applied to the chroma component of the current block, or other prediction modes (eg intra prediction mode, inter prediction mode, etc.) ) May be applied.
  • a palette table for the current block may be configured based on the palette predictor.
  • the palette predictor may include one or more palette entries (representative color values) and one or more palette indexes for identifying each of the palette entries.
  • the palette predictor may be initialized to a predetermined value (e.g. 0) at the initial encoding/decoding time of the CTU (or slice) including the current block.
  • the palette predictor may be updated using at least one palette entry used for palette encoding/decoding.
  • the size of the palette predictor reaches a predetermined maximum size (i.e., until the palette predictor contains the maximum number of palette entries allowed), the palette of the previous palette predictor that is not included in the current palette table.
  • An entry may be added to the last position (index) of the palette predictor for the next palette encoding. This may be referred to as pallet stuffing.
  • the palette table may include at least one palette entry included in the palette predictor and at least one palette index for identifying the palette entry.
  • a reuse flag indicating whether the palette entry is included in the palette table may be signaled through a bitstream.
  • the reuse flag having the first value e.g. 0
  • a reuse flag having a second value e.g. 1
  • the reuse flag may be encoded using, for example, run-length coding for a value of 0.
  • the palette table may include at least one new palette entry not included in the palette predictor and at least one palette index for identifying the new palette entry.
  • Information on the new palette entry e.g. total number, component value, etc.
  • a palette index map for a current block to be encoded may be generated. Specifically, a palette index map for the current block by mapping a predetermined palette index in the palette table to each of the plurality of samples based on the similarity between the pixel value and the representative color value of each of the plurality of samples in the current block. Can be generated. In this case, among a plurality of samples in the current block, for a sample (escape sample) having a pixel value similar to a representative color value (palette entry) defined in the palette table, an escape palette index may be mapped. . The escape palette index indicates an escape sample (escape symbol) and may have the largest value in the palette table.
  • whether the current block includes an escape sample may be signaled using an escape sample flag (e.g. palette_escape_val_present_flag).
  • an escape sample flag e.g. palette_escape_val_present_flag
  • a palette_escape_val_present_flag having a first value e.g. 0
  • a palette_escape_val_present_flag having a second value e.g. 1
  • Palette index prediction information about the palette index map may be signaled through a bitstream.
  • the palette index prediction information may include at least one palette index mapped to the current block and run-value information of the palette index.
  • the run-value of the palette index may represent a value obtained by subtracting 1 from the number of palette indices successively mapped to the current block with the same value.
  • the current block includes first to fourth samples continuously present along a predetermined scan direction (eg horizontal direction), and a first palette index (eg 0) in each of the first to third samples
  • a run-value of the first palette index may be 2, and a run-value of the second palette index may be 0.
  • the palette index prediction information may include run-value information of the escape palette index mapped to the escape sample.
  • a palette index map for a current block to be decoded may be generated.
  • a palette index map for the current block may be generated by mapping each of one or more palette indices obtained from the palette index prediction information to each of a plurality of samples in the current block.
  • a value of each of the one or more palette indices may be adjusted based on a last palette index (in mapping order) among one or more palette indices obtained from the palette index prediction information. For example, when the last palette index obtained from the palette index prediction information is an escape palette index, one or more palette entries obtained from the palette index prediction information will be mapped to the current block with a value increased by a predetermined size (eg 1). I can.
  • the current block may be encoded/decoded based on the palette index map. For a sample having a pixel value that is the same as or similar to a representative color value defined in the palette table among a plurality of samples in the current block, a value of a palette index indicating the representative color value may be signaled through a bitstream. Alternatively, for a sample having a pixel value dissimilar to the representative color value defined in the palette table among a plurality of samples in the current block, the quantized pixel value of the sample may be directly signaled through the bitstream.
  • the palette index map may be scanned using a predetermined scan method.
  • the current block may be scanned using a predetermined scan method.
  • 15 is a diagram illustrating an example of a scanning method that can be used in a palette mode.
  • a scan method that can be used in the palette mode may include a horizontal traverse scan and a vertical traverse scan.
  • the horizontal traverse scan may mean a method of scanning odd-numbered rows of the current block (or palette index map) from left to right, and scanning even-numbered rows of the current block from right to left.
  • the vertical traverse scan may mean a method of scanning an odd-numbered column of the current block from top to bottom, and scanning an even-numbered column of the current block from bottom to top.
  • Information about a scan method that can be used in the palette mode may be signaled using a predetermined flag (e.g. palette_transpose_flag).
  • a predetermined flag e.g. palette_transpose_flag
  • a palette_transpose_flag having a first value e.g. 0
  • a palette_transpose_flag having a second value e.g. 1
  • a second value e.g. 1
  • Palette indices mapped to each sample in the current block may be encoded using the'INDEX' mode and the'COPY_ABOVE' mode.
  • the'INDEX' mode and the'COPY_ABOVE' mode may be referred to as a palette sample mode.
  • copy_above_palette_indices_flag e.g copy_above_palette_indices_flag
  • copy_above_palette_indices_flag having a first value may indicate that a predetermined palette index mapped to the current block is encoded using the'INDEX' mode.
  • copy_above_palette_indices_flag having a second value may indicate that a predetermined palette index mapped to the current block is encoded using the'COPY_ABOVE' mode.
  • the value of the palette index can be explicitly signaled through the bitstream.
  • run-value information indicating the number of consecutively encoded samples using the same palette sample mode may be signaled through a bitstream.
  • Palette indices included in the palette index map may be encoded in the following order.
  • the number of palette indexes mapped to the current block (or the current CU) may be signaled.
  • values of each of the palette indices may be signaled using fixed length coding.
  • the number of palette indices and a value of each of the palette indices may be encoded using the bypass mode.
  • bypass bins related to the palette index may be grouped.
  • information on the palette sample mode e.g. copy_above_palette_indices_flag
  • run-value information on the palette sample mode may be signaled in an interleaving manner.
  • component escape values corresponding to escape samples in the current block may be grouped and encoded in bypass mode.
  • At least one additional syntax element (e.g. last_run_type_flag) may be additionally signaled.
  • the signaling process for a run-value corresponding to the last run in the current block may be skipped based on the number of palette indexes and an additional syntax element.
  • 16 is a diagram illustrating an example of a process of encoding a palette of a current block.
  • a plurality of pixels (samples) in a current block may be expressed using a total of three color values (S1610).
  • the first pixels PX1 may have a first color value
  • the second pixels PX2 may have a second color value
  • the third pixels PX3 may have a third color value. .
  • a palette table for the current block may be configured (S1620).
  • the palette table contains palette entries (representative color values) for each color component (eg (G, B, R), (Y, Cb, Cr), etc.) and a palette index (eg 0) for identifying each palette entry. , 1) may be included.
  • the palette table may further include an escape palette index (e.g. 2).
  • the escape palette index may be mapped to an escape sample (or escape symbol) having a pixel value similar to a representative color value defined in the palette table among a plurality of pixels in the current block. For the escape sample to which the escape palette index is mapped, a quantized pixel value of the escape sample may be signaled.
  • a palette index map for the current block is generated by mapping a predetermined palette index in the palette table to each of the plurality of samples based on the similarity between the pixel value and the representative color value of each of the plurality of samples in the current block. It can be done (S1630). For example, a first palette index (eg 0) is mapped to each of the first pixels PX1, a second palette index (eg 1) is mapped to each of the second pixels PX2, and an escape sample The palette index map for the current block may be generated by mapping the escape palette index (eg 2) for the in-third pixel PX3.
  • the palette sample mode and the run-value of the palette sample mode of each of a plurality of samples in the current block can be derived. Yes (S1640, S1650).
  • the palette indexes '1, 0, 1, 1, 1'that are successively mapped to the 3rd row of the palette index map are located at the same position in the 2nd row of the palette index map. Since they have the same index value as the palette indices, they may be encoded in the'COPY_ABOVE' mode, and the run-value of the'COPY_ABOVE' mode may be 4 (S1640).
  • the palette indexes '1, 1, 1'successively mapped to the second row of the palette index map are index values different from the palette indexes existing in the same position of the first row of the palette index map. Since it has an'INDEX' mode, the run-value of the'INDEX' mode may be 2 (S1650). Meanwhile, the escape palette index (e.g. 2) mapped to the third pixel PX3, which is an escape sample, may be encoded in the'INDEX' mode.
  • a palette index map is generated by mapping a predetermined palette index in the palette table to each of the plurality of samples in the current block, and the palette index included in the palette index map is Depending on the scan method, it may be encoded in the'INDEX' mode or the'COPY_ABOVE' mode.
  • FIG. 17 is a diagram illustrating a part of a coding_unit syntax for a palette mode
  • FIGS. 18A to 18E are diagrams showing a palette_coding syntax for a palette mode.
  • the syntax element for the palette mode may be encoded as shown in FIGS. 17 and 18A to 18E and signaled through a bitstream.
  • a palette mode flag pred_mode_plt_flag may indicate whether a palette mode is applied to a current block (or a current CU). For example, a first value (e.g. 0) of pred_mode_plt_flag may indicate that the palette mode is not applied to the current block. Unlike this, the second value (e.g. 1) of pred_mode_plt_flag may indicate that the palette mode is applied to the current block. When pred_mode_plt_flag is not obtained from the bitstream, the value of pred_mode_plt_flag may be determined as the first value.
  • a parameter PredictorPaletteSize[startComp] may indicate the size of a palette predictor for startComp, a first color component of a palette table (current palette table) for a current block.
  • the parameter PalettePredictorEntryReuseFlags[i] may indicate whether the i-th palette entry in the palette predictor is included in the current palette table (ie, reused). For example, PalettePredictorEntryReuseFlags[i] having a first value (e.g. 0) may indicate that the i-th palette entry of the palette predictor is not reused in the current palette table. Alternatively, PalettePredictorEntryReuseFlags[i] having a second value (e.g. 1) may indicate that the i-th palette entry of the palette predictor is reused in the current palette table. In one example, an initial value of PalettePredictorEntryReuseFlags[i] may be set to 0.
  • parameter palette_predictor_run may indicate the number of zeros that exist prior to non-zero palette entries in the PalettePredictorEntryReuseFlags array.
  • parameter num_signalled_palette_entries may indicate the number of palette entries in the current palette table explicitly signaled for the first color component startComp of the current palette table.
  • num_signalled_palette_entries may be inferred as 0.
  • the parameter CurrentPaletteSize[startComp] may indicate the size of the current palette table for the first color component startComp of the current palette table.
  • the value of CurrentPaletteSize[startComp] may be calculated as in Equation 2 below.
  • CurrentPaletteSize[startComp] may have a value between 0 and palette_max_size.
  • parameter new_palette_entries[cIdx][i] may indicate a value of a new palette entry signaled for the i-th color component cIdx.
  • parameter PredictorPaletteEntries[cIdx][i] may indicate the i-th palette entry in the palette predictor for the color component cIdx.
  • parameter CurrentPaletteEntries[cIdx][i] may indicate the i-th palette entry in the current palette table for the color component cIdx.
  • palette_escape_val_present_flag may indicate whether an escape sample (escape symbol) exists. For example, a palette_escape_val_present_flag having a first value (e.g. 0) may indicate that the current block does not include an escape sample. Alternatively, palette_escape_val_present_flag having a second value (e.g. 1) may indicate that the current block includes at least one escape sample. When palette_escape_val_present_flag is not obtained from the bitstream, the value of palette_escape_val_present_flag may be inferred as 1.
  • the parameter MaxPaletteIndex may represent the maximum value of the palette index in the current palette table.
  • the value of MaxPaletteIndex may be calculated as in Equation 3 below.
  • parameter num_palette_indices_minus1 may represent a value obtained by subtracting 1 from the number of palette indices signaled during the palette encoding process of the current block.
  • num_palette_indices_minus1 is not obtained from the bitstream, the value of num_palette_indices_minus1 may be inferred as 0.
  • the parameter palette_idx_idc may be an indicator of a palette index for the current palette table CurrentPaletteEntries.
  • the palette_idx_idc may have a value between 0 and MaxPaletteIndex for the first palette index of the corresponding block, and may have a value between 0 and MaxPaletteIndex-1 for the remaining palette indices of the corresponding block.
  • the value of palette_idx_idc may be inferred as 0.
  • parameter PaletteIndexIdc[i] may indicate the i-th palette_idx_idc. In one example, all values of the array PaletteIndexIdc may be initialized to zero.
  • the parameter copy_above_indices_for_final_run_flag may indicate whether the palette index of the last position in the current block is copied from the previous palette index. For example, copy_above_indices_for_final_run_flag having a first value (e.g. 0) may indicate that the palette index of the last position in the current block is copied from PaletteIndexIdc[num_palette_indices_minus1]. Alternatively, copy_above_indices_for_final_run_flag having a second value (e.g 1) may indicate that the palette index at the last position in the current block is copied from the palette index of the surrounding samples.
  • a first value e.g. 0
  • copy_above_indices_for_final_run_flag having a second value e.g 1
  • the surrounding sample When the vertical traverse scan is used, the surrounding sample may be a sample present at the same position as the current sample in a left column of the current sample. When the horizontal traverse scan is used, the surrounding sample may be a sample present at the same position as the current sample in a row above the current sample.
  • copy_above_indices_for_final_run_flag When copy_above_indices_for_final_run_flag is not obtained from the bitstream, the value of copy_above_indices_for_final_run_flag may be inferred as 0.
  • the parameter palette_transpose_flag may indicate the scanning method of the current block (or palette index map). For example, a palette_transpose_flag having a first value (e.g. 0) may indicate that a horizontal traverse scan is applied to the current block. Unlike this, palette_transpose_flag having a second value (e.g. 1) may indicate that a vertical traverse scan is applied to the current block.
  • a palette_transpose_flag having a first value (e.g. 0) may indicate that a horizontal traverse scan is applied to the current block.
  • palette_transpose_flag having a second value e.g. 1
  • the value of the palette_transpose_flag may be inferred as 0.
  • the parameter copy_above_palette_indices_flag may indicate an encoding mode (palette sample mode) for a current sample in a current block.
  • copy_above_palette_indices_flag having a first value e.g. 0
  • copy_above_palette_indices_flag having a second value e.g. 1
  • CopyAboveIndicesFlag[xC][yC] may indicate an encoding mode for each of a plurality of samples in the current block. That is, CopyAboveIndicesFlag may be an array of copy_above_palette_indices_flag for each of a plurality of samples in the current block.
  • xC and yC may be coordinate indicators indicating a relative position of the current sample from the upper left sample of the current picture.
  • PaletteRunMinus1 When CopyAboveIndicesFlag[xC][yC] has a first value (e.g. 0), PaletteRunMinus1 may represent a value obtained by subtracting 1 from the number of consecutively encoded palette indexes using the'COPY_ABOVE' mode. In contrast, when CopyAboveIndicesFlag[xC][yC] has a second value (e.g. 1), PaletteRunMinus1 may represent a value obtained by subtracting 1 from the number of consecutively encoded palette indexes using the'INDEX' mode.
  • a first value e.g. 0
  • PaletteRunMinus1 When CopyAboveIndicesFlag[xC][yC] has a second value (e.g. 1), PaletteRunMinus1 may represent a value obtained by subtracting 1 from the number of consecutively encoded palette indexes using the'INDEX' mode.
  • the parameter PaletteIndexMap[xC][yC] may indicate a palette index map for a current block. That is, PaletteIndexMap may be an array of CurrentPaletteEntries for each of a plurality of samples in the current block.
  • xC and yC may be coordinate indicators indicating a relative position of the current sample from the upper left sample of the current picture.
  • PaletteIndexMap[xC][yC] may have a value between 0 and (MaxPaletteIndex-1).
  • the parameter PaletteMaxRunMinus1 may represent the maximum value of PaletteRunMinus1. In one example, PaletteMaxRunMinus1 may have a value greater than 0.
  • parameter palette_run_prefix may indicate a prefix part used for binarization of PaletteRunMinus1.
  • parameter palette_run_suffix may indicate a suffix part used for binarization of PaletteRunMinus1.
  • the value of palette_run_suffix may be inferred as 0.
  • PaletteMaxRunMinus1 if the value of PaletteMaxRunMinus1 is 0, the value of PaletteRunMinus1 may be set to 0. Alternatively, if PaletteMaxRunMinus1 is greater than 0, PaletteRunMinus1 may be set based on the value of palette_run_prefix. For example, when the value of palette_run_prefix is less than 2, the value of PaletteRunMinus1 may be set as in Equation 4 below.
  • the value of PaletteRunMinus1 may be calculated as in Equation 5 below.
  • a parameter palette_escape_val may indicate a quantized pixel value of an escape sample in a current block.
  • the parameter PaletteEscapeVal[cIdx][xC][yC] may indicate the quantized pixel value of the escape sample, in which the value of PaletteIndexMap[xC][yC] is MaxPaletteIndex and the value of palette_escape_val_present_flag is 1.
  • cIdx indicates a color component
  • xC and yC may be coordinate indicators indicating a relative position of the current sample from the upper left sample of the current picture.
  • 19 is a diagram illustrating an example of a CU having a local dual tree structure.
  • a current CU may be divided into a quadtree structure for each of a luma component and a chroma component.
  • a 16x16 luma block may be quadtree-divided to generate first to fourth luma blocks 1911 to 1914 each having a size of 8x8.
  • the 8x8 chroma block may be quadtree-divided, so that first to fourth chroma blocks 1921 to 1924 each having a size of 4x4 may be generated.
  • the first chroma block 1921 corresponds to the first luma block 1911
  • the second chroma block 1922 corresponds to the second luma block 1912
  • the third chroma block 1923 is
  • the third luma block 1913 may correspond
  • the fourth chroma block 1924 may correspond to the fourth luma block 1914.
  • the minimum size of the chroma block is limited to include 16 or more chroma samples, additional division of the first to fourth chroma blocks 1921 to 1924 may be prohibited.
  • additional division of the first to fourth luma blocks 1911 to 1914 may be allowed.
  • the third luma block 1913 is vertically binary divided, so that two luma blocks 1913-1 and 1913-2 each having a size of 4x8 may be generated.
  • the division structure of the third luma block 1913 may be referred to as a dual tree luma (DUAL_TREE_LUMA), and the division structure of the third chroma block 1923 may be referred to as a dual tree chroma (DUAL_TREE_CHROMA).
  • the partition structure of the lower CU May be referred to as a local dual tree structure. In this case, an example of a decoding process for the current CU is as shown in FIG. 20.
  • FIG. 20 is a diagram illustrating an example of a decoding process for a current CU in the example of FIG. 19.
  • the luma block and the chroma block of the lower CU having a single tree structure may be decoded based on the same prediction mode (e.g. intra prediction mode, IBC, palette mode, inter prediction mode, etc.).
  • the luma block and the chroma block of a lower CU having a dual tree structure may be individually decoded based on a combination of various prediction modes.
  • a luma block and a chroma block of a lower CU having a dual tree structure may be decoded using the same prediction mode or different prediction modes.
  • FIG. 20 in order to distinguish between a lower CU having a single tree structure and a lower CU having a dual tree structure, only a luma block is shown for a lower CU having a single tree structure, and a luma block for a lower CU having a dual tree structure. And chroma blocks are all shown.
  • a decoding process will be described based on a luma block.
  • a first luma block 1911 having a single tree structure may be decoded using an inter prediction mode.
  • the second luma block 1912 having a single tree structure may be decoded using a palette mode.
  • the fourth luma block 1914 having a single tree structure may be decoded using a palette mode.
  • the 3-1 luma block 1913-1 having a dual tree structure is decoded using the palette mode
  • the 3-2 luma block 1913-2 is decoded using the intra mode
  • the third The chroma block 1923 may be decoded using a palette mode.
  • the decoding process for the first to fourth luma blocks 1911 to 1914 may be sequentially performed.
  • the decoding process for the 3-1 luma block 1913-1 and the 3-2 luma block 1913-2 and the decoding process for the third chroma block 1923 are performed in parallel or in a predetermined order. It can be performed sequentially accordingly.
  • palette decoding for the second luma block 1912 is performed, as described above, one palette predictor including a palette entry for each of the luma component and the chroma component and a palette index for identifying the palette entry is configured. I can. In addition, the palette predictor may be updated using a palette entry applied to the second luma block 1912 for next palette decoding (S2010).
  • the palette decoding for the second luma block 1912 is completed, the palette decoding for the 3-1 luma block 1913-1 and the third chroma block 1923 is performed using the palette predictor updated in step S2010. It can be done individually.
  • the palette predictor for the 3-1 luma block 1913-1 may include only a palette entry for a luma component and a palette index for identifying the palette entry in the palette predictor updated in step S2010 (S2020). .
  • the palette predictor for the 3-1 luma block 1913-1 may be referred to as a luma palette predictor.
  • the luma palette predictor may be updated using the palette entry applied to the 3-1 luma block 1913-1 (S2030). ).
  • the palette predictor for the third chroma block 1923 may include only a palette entry for a chroma component and a palette index for identifying the palette entry in the palette predictor updated in step S2010 (S2040).
  • the palette predictor for the third chroma block 1923 may be referred to as a chroma palette predictor.
  • the chroma palette predictor may be updated using a palette entry applied to the third chroma block 1923 (S2050).
  • palette decoding may be performed on the fourth luma block 1914.
  • the palette predictor for the fourth luma block 1914 may be configured by combining the luma palette predictor updated in step S2030 and the chroma palette predictor updated in step S2050 (S2060). That is, the palette predictor for the fourth luma block 1914 includes a palette entry of a luma component for the 3-1 luma block 1913-1 and a palette entry of a chroma component for the third chroma block 1923, It may include a palette index to identify each palette entry. In this case, the size of the palette predictor for the fourth luma block 1914 (that is, the number of palette entries) may be determined based on the number of palette entries of the luma component.
  • N is an integer greater than 0
  • M is an integer greater than 0
  • the size of the palette predictor for the 4 luma block 1914 may be determined as N. Due to this characteristic, there may be a problem that the palette predictor includes an invalid palette entry or does not include a valid palette entry.
  • 21 and 22 are diagrams for explaining problems that occur when a palette mode is applied to a lower CU having a local dual tree structure in the example of FIG. 20.
  • a luma palette predictor 2110 updated as a result of palette decoding for a 3-1 luma block 1913-1 having a local dual tree structure, with respect to a luma component (eg Y component) may contain 9 palette entries (representative color values).
  • the palette decoding is performed for the fourth luma block 1914 having a single tree structure.
  • the palette predictor 2130 for the fourth luma block 1914 refers to the luma palette predictor 2110 and the chroma palette predictor 2120 based on the size of the luma palette predictor 2110. It can be configured by combining them.
  • the size of the chroma palette predictor 2120 is 2 for each chroma component (eg Cb and Cr).
  • the size of the palette predictor 2130 for the fourth luma block 1914 may be determined to be 9.
  • the palette predictor 2130 for the fourth luma block 1914 may include palette entries 2131 having 7 NULL values for each chroma component. As a result, unnecessary memory space for storing the palette entries 2131 having a NULL value is wasted, and decoding efficiency may be deteriorated.
  • a luma palette predictor 2210 updated as a result of palette decoding for a 3-1 luma block 1913-1 having a local dual tree structure, with respect to a luma component (eg Y) may include three palette entries (representative color values).
  • the palette decoding is performed for the fourth luma block 1914 having a single tree structure.
  • the palette predictor 2230 for the fourth luma block 1914 refers to the luma palette predictor 2210 and the chroma palette predictor 2220 based on the size of the luma palette predictor 2210. It can be configured by combining them.
  • the last two valid palette entries 2221 for each chroma component included in the chroma palette predictor 2220 may be discarded.
  • an optimal palette table for the fourth luma block 1914 cannot be configured, there may be a problem in that the palette decoding performance for the fourth luma block 1914 is deteriorated.
  • a palette predictor is determined based on whether a partition structure of a current block is a local dual tree structure.
  • the updating process may be skipped or the palette mode may be selectively applied.
  • a process of updating a palette predictor may be selectively performed based on a split structure of the current block.
  • FIG. 23 is a flowchart illustrating a palette encoding method according to an embodiment of the present disclosure.
  • the palette encoding method of FIG. 23 may be performed by the image encoding apparatus of FIG. 2. Specifically, steps S2310 to S2350 may be performed by the intra prediction unit 165 or by a separate functional block (e.g. palette encoding unit) different from the intra prediction unit 165.
  • steps S2310 to S2350 may be performed by the intra prediction unit 165 or by a separate functional block (e.g. palette encoding unit) different from the intra prediction unit 165.
  • Whether the palette mode is applied to the current block may be determined based on the prediction mode type of the current block. For example, if the prediction mode type of the current block is a first mode type (eg MODE_TYPE_ALL) to which all of intra prediction, intra block copy (IBC), palette mode, and inter prediction can be applied, the palette mode can be applied to the current block. have. In contrast, when the prediction mode type of the current block is a second mode type to which only intra prediction can be applied (eg MODE_TYPE_INTRA) or a third mode type to which only inter prediction can be applied (eg MODE_TYPE_INTER), the current block is a palette mode. Cannot be applied.
  • a first mode type eg MODE_TYPE_ALL
  • Whether or not the palette mode is applied to the current block may be signaled using a predetermined flag (e.g. pred_mode_plt_flag). For example, when the palette mode is not applied to the current block, a pred_mode_plt_flag having a first value (e.g. 0) may be signaled. In contrast, when the palette mode is applied to the current block, a pred_mode_plt_flag having a second value (e.g. 1) may be signaled.
  • a pred_mode_plt_flag having a first value (e.g. 0) may be signaled.
  • a pred_mode_plt_flag having a second value e.g. 1
  • the image encoding apparatus may configure a palette predictor and a palette table for the current block (S2310).
  • the palette predictor may include at least one palette entry (representative color value) and a palette index for identifying each palette entry.
  • the palette predictor may have a predetermined initial value (e.g. 0).
  • the palette predictor may include at least one palette entry used in a palette encoding process prior to the current block.
  • the image encoding apparatus may configure a palette table based on the palette predictor.
  • the palette table may include at least one palette entry selected from the palette predictor and a palette index for identifying each palette entry.
  • the palette predictor and the palette table may be variously configured according to the color format (or chroma format) of the current block.
  • the palette predictor and the palette table may include only the palette entry for the luma component of the current block.
  • the palette predictor and the palette table are the luma component of the current block and It may contain a palette entry for each chroma component.
  • the palette predictor and the palette table may be variously configured according to the partition structure of the current block. For example, when the current block has a single tree structure, the palette predictor and the palette table may have one configuration commonly applied to the luma component and the chroma component of the current block. In contrast, when the current block has a dual tree structure, the palette predictor and the palette table may have a plurality of configurations individually applied to each of the luma component and the chroma component of the current block.
  • the palette predictor for the current block may include a luma palette predictor for a luma component and a chroma palette predictor for a chroma component. In this case, the number of palette entries included in the luma palette predictor may be different from the number of palette entries included in the chroma palette predictor.
  • the image encoding apparatus may generate a palette index map for the current block based on the palette table (S2320).
  • the palette index map may mean mapping a predetermined palette index in the palette table to each sample in the current block. For example, among a plurality of samples in the current block, a palette index indicating a corresponding representative color value may be mapped to a sample having the same or similar pixel value as the representative color value defined in the palette table. Alternatively, among a plurality of samples of the current block, an escape palette index may be mapped to a sample (escape sample) having a pixel value that is similar to the representative color value defined in the palette table. In an example, whether a pixel value of each sample is similar to a representative color value defined in the palette table may be determined based on a predetermined threshold.
  • a palette index indicating the representative color value may be mapped to the corresponding sample.
  • an escape palette index may be mapped to the corresponding sample.
  • the image encoding apparatus may encode the current block based on the palette index map (S2330).
  • the encoding process of the current block may be performed by scanning the palette indices in the palette index map according to a predetermined scan method.
  • the apparatus for encoding an image may determine an encoding mode (pallet sample mode) of each of the palette indexes by scanning the palette indexes mapped to the current block according to a predetermined scan method.
  • the scanning method for palette encoding may include a horizontal traverse scan and a vertical traverse scan.
  • information about the scan method may be signaled using palette_transpose_flag.
  • a palette_transpose_flag having a first value (e.g. 0) may be signaled.
  • a palette_transpose_flag having a second value e.g. 1
  • An encoding mode for encoding each of the palette indexes mapped to the current block may be referred to as a palette sample mode.
  • the palette sample mode may include a'INDEX' mode and a'COPY_ABOVE' mode.
  • a value of a corresponding palette index may be encoded.
  • the palette sample mode is set to'COPY_ABOVE' mode, the value of the palette index is not encoded, and the palette index exists in the top (for horizontal traverse scan) or left (for vertical traverse scan).
  • Information indicating that the index has the same value may be encoded.
  • information on the palette sample mode may be signaled using copy_above_palette_indices_flag.
  • a copy_above_palette_indices_flag having a first value e.g. 0
  • a copy_above_palette_indices_flag having a second value e.g. 1
  • run-value information indicating the number of consecutively encoded palette indices using the same palette sample mode may be additionally encoded.
  • a quantized pixel value of the escape sample may be encoded.
  • whether the current block includes an escape sample may be signaled using an escape sample flag (e.g. palette_escape_val_present_flag).
  • an escape sample flag e.g. palette_escape_val_present_flag
  • a palette_escape_val_present_flag having a first value e.g. 0
  • a palette_escape_val_present_flag having a second value e.g. 1
  • the image encoding apparatus may determine whether the split structure of the current block is a local dual tree structure (S2340).
  • whether the partition structure of the current block is a local dual tree structure may be determined based on the prediction mode type of the current block. For example, as described above with reference to FIGS. 10A to 10C, when the prediction mode type of the current block is MODE_TYPE_INTRA to which only intra prediction can be applied, the partition structure of the current block may be a local dual tree structure. In contrast, when the prediction mode type of the current block is not MODE_TYPE_INTRA (e.g. MODE_TYPE_ALL), the split structure of the current block may be a single tree structure.
  • whether the current block partition structure is a local dual tree structure may be determined based on at least one of a tree type of the current block and a partition structure of the current CTU. For example, when the tree type of the current block is not a single tree (SINGLE_TREE), and the current CTU is included in a P or B slice or is divided into a single tree structure, the partition structure of the current block may be a local dual tree structure. . In contrast, when the tree type of the current block is a single tree (SINGLE_TREE), the split structure of the current block may be a single tree structure.
  • the current block is included in the I slice, and the CTU included in the slice is implicit quadtree split into a 64x64 luma sample CU, and the 64x64 luma sample CU includes a root node of a dual tree. If so, the divided structure of the current block may be a dual tree structure. Whether the partition structure of the current block is a local dual tree structure may be signaled using LocalDualTreeFlag as shown in Equation 6 below.
  • sps_qtbtt_dual_tree_intra_flag may represent a split structure of a current CTU.
  • sps_qtbtt_dual_tree_intra_flag having a first value may indicate that the current block is included in the I slice, and the CTU included in the corresponding slice is divided into a single tree structure.
  • sps_qtbtt_dual_tree_intra_flag having a second value includes the current block in the I slice, and the CTU included in the slice is implicit quadtree split into a 64x64 luma sample CU, and the 64x64 luma sample It may be indicated that the CU becomes the root node of the dual tree.
  • the value of LocalDualTreeFlag may be determined based on a tree type of the current block (treeType), a slice type (sh_slice_type), and a split structure (sps_qtbtt_dual_tree_intra_flag) of the current CTU.
  • the first value (eg 0) of LocalDualTreeFlag may indicate that the partition structure of the current block is not a local dual tree structure
  • the second value of LocalDualTreeFlag (eg 1) may indicate that the partition structure of the current block is a local dual tree structure. have.
  • the image encoding apparatus may update the palette predictor using the palette table for the current block (S2350). For example, when the current block is a luma block in a monochrome format, the image encoding apparatus may update the palette predictor. Also, when the current block is a chroma block and the split structure of the current block is not a local dual tree structure, the image encoding apparatus may update the palette predictor. In contrast, when the current block is a chroma block and the split structure of the current block is a local dual tree structure, the image encoding apparatus may not update the palette predictor.
  • the apparatus for encoding an image may update the palette predictor by adding at least one palette entry included in the palette table to the palette predictor.
  • the image encoding apparatus may update the palette predictor by replacing at least one palette entry included in the palette predictor with at least one palette entry included in the palette table.
  • the palette entry replaced in the palette predictor may be determined as the oldest palette entry or the palette entry used with the least frequency according to a first-in-first-out method (FIFO).
  • FIFO first-in-first-out method
  • the process of updating the palette predictor may be continuously performed until the palette predictor reaches a maximum size.
  • the palette predictor does not reach the maximum size, at least one palette entry in the palette predictor that is not reused in the palette table may be added as a new palette predictor. This may be referred to as pallet stuffing.
  • information on the updated palette predictor may be encoded and signaled.
  • the image encoding apparatus may skip updating the palette predictor (S2350).
  • a palette predictor applied to the current block may be applied again to a block that is palette-coded after the current block in the current CTU.
  • step S2340 the step of determining whether the split structure of the current block is a local dual tree structure (S2340) is performed after the step of encoding the current block (S2330), but the order of operations thereof is variously changed. Can be.
  • step S2340 may be performed before step S2330, or step S2340 may be performed simultaneously with step S2330.
  • FIG. 24 is a diagram for describing a palette encoding process when a palette predictor is not updated in the example of FIG. 19.
  • palette entries for the luma component are applied to the palette encoding of the 3-1 luma block 1913-1. It can be used (S2420).
  • palette entries for the chroma component may be used for palette encoding of the third chroma block 1923 (S2430).
  • a process of updating the palette predictor may be skipped.
  • the palette encoding process for the second luma block 1912 may be applied again (S2440).
  • 25 is a diagram illustrating an example of a process of selectively updating a palette predictor based on a partition structure of a current block.
  • a first mode type eg MODE_TYPE_ALL
  • the parameter CurrentPaletteSize[startComp] may represent the size of the palette table for the current block (ie, the total number of palette entries).
  • Each value of the parameters startComp, numComps, and maxNumPalettePredictorSize may be set differently according to the partition tree structure of the current block.
  • values of the parameters startComp, numComps, and maxNumPalettePredictorSize may be set as shown in Equation 7 below.
  • the first color component startComp of the palette table may be set to 0.
  • the total number of color components in the palette table numComps is set to 1 when the color format (or chroma format) of the current block is monochrome, and when the color format of the current block is 4:4:4 Can be set to 3.
  • the maximum size of the palette predictor maxNumPalettePredictorSize may be set to 63.
  • values of the parameters startComp, numComps, and maxNumPalettePredictorSize may be set as shown in Equation 8 below.
  • the first color component startComp of the palette table may be set to 0.
  • the total number of color components in the palette table numComps may be set to 1.
  • the maximum size of the palette predictor maxNumPalettePredictorSize may be set to 31.
  • values of the parameters startComp, numComps, and maxNumPalettePredictorSize may be set as shown in Equation 9 below.
  • the first color component startComp of the palette table may be set to 1. Also, the total number of color components in the palette table numComps may be set to 2. In addition, the maximum size of the palette predictor maxNumPalettePredictorSize may be set to 31.
  • cIdx may mean a color component.
  • 26 is a flowchart illustrating a method of decoding a palette according to an embodiment of the present disclosure.
  • the palette decoding method of FIG. 26 may be performed by the image decoding apparatus of FIG. 3. Specifically, steps S2610 to S2660 may be performed by the intra prediction unit 265 or by a separate functional block (e.g. a palette decoding unit) different from the intra prediction unit 265.
  • steps S2610 to S2660 may be performed by the intra prediction unit 265 or by a separate functional block (e.g. a palette decoding unit) different from the intra prediction unit 265.
  • the image decoding apparatus may obtain palette information and palette index prediction information for a current block from a bitstream (S2610).
  • the palette information may include information on a palette predictor.
  • the palette information may further include information on a new palette entry.
  • the apparatus for decoding an image may obtain information on a palette predictor by decoding PredictorPaletteEntries[cIdx][i] included in a bitstream.
  • the image decoding apparatus may obtain information on a new palette entry by decoding new_palette_entries[cIdx][i] included in the bitstream.
  • cIdx may mean a color component.
  • the palette index prediction information may include information on a palette index map for the current block.
  • the image decoding apparatus may obtain at least one palette index mapped to the current block by decoding PaletteIndexMap[xC][yC] included in the bitstream.
  • xC and yC may be coordinate indicators indicating the relative positions of the current sample from the upper left sample of the CTU (or slice) to which the current block belongs.
  • the image decoding apparatus may obtain run-value information of a palette index included in the palette index map by decoding PaletteRunMinus1 included in the bitstream.
  • the image decoding apparatus may configure a palette predictor and a palette table for the current block based on the palette information obtained from the bitstream (S2620).
  • the image decoding apparatus may configure a palette predictor for the current block based on PredictorPaletteEntries[cIdx][i] included in the bitstream.
  • the palette predictor may have a predetermined value (e.g. 0) initialized at the initial decoding time of the CTU (or slice) including the current block, for example.
  • the palette predictor may have the same configuration as the palette predictor updated in the previous palette decoding process.
  • the image decoding apparatus may configure a palette table for the current block based on the palette predictor.
  • the palette table may include at least one of a palette entry included in the palette predictor and a new palette entry obtained from a bitstream, and a palette index for identifying each palette entry.
  • the palette predictor and the palette table may be variously configured according to the color format (or chroma format) of the current block.
  • the palette predictor and the palette table may include only a palette entry for a luma component or all palette entries for each of the luma component and the chroma component according to the color format of the current block.
  • the palette predictor and the palette table may be variously configured according to the partition structure of the current block. For example, when the current block has a single tree structure, the palette predictor and the palette table may have a single configuration commonly applied to the luma component and the chroma component of the current block. In contrast, when the current block has a dual tree structure, the palette predictor and the palette table may have multiple configurations separately applied to each of the luma component and the chroma component of the current block.
  • the image decoding apparatus may generate a palette index map for the current block based on the palette index prediction information obtained from the bitstream (S2630). Specifically, the image decoding apparatus maps the palette index to each sample in the current block according to a predetermined scan method using the palette index obtained from the bitstream, the palette sample mode, and the run-value of the palette sample mode, You can create a palette index map.
  • the scanning method for pallet decoding may include a horizontal traverse scan and a vertical traverse scan.
  • the scan method for palette decoding may be determined by decoding the palette_transpose_flag included in the bitstream. For example, when palette_transpose_flag has a first value (e.g. 0), a scan method for palette decoding may be determined as a horizontal traverse scan. In contrast, when palette_transpose_flag has a second value (e.g. 1), a scan method for palette decoding may be determined as a vertical traverse scan.
  • the palette sample mode may include a'INDEX' mode and a'COPY_ABOVE' mode.
  • the value of the palette index mapped to the current sample may be obtained directly from the bitstream.
  • the value of the palette index mapped to the current sample is present above the current sample (in the case of a horizontal traverse scan) or left (in the case of a vertical traverse scan). It may be determined as a value of the palette index mapped to the surrounding samples.
  • the quantized pixel value of the current sample may be obtained directly from the bitstream.
  • An escape palette index may be mapped to the escape sample.
  • the image decoding apparatus may decode the current block based on the palette table and the palette index map for the current block (S2640). Specifically, the image decoding apparatus may generate a prediction block for the current block by inverse mapping a value of each palette index in the palette index map to a representative color value by referring to the palette table.
  • the image decoding apparatus may determine whether the current block has a local dual tree structure (S2650).
  • whether the partition structure of the current block is a local dual tree structure may be determined based on the prediction mode type of the current block. For example, as described above with reference to FIGS. 10A to 10C, when the prediction mode type of the current block is MODE_TYPE_INTRA to which only intra prediction can be applied, the partition structure of the current block may be a local dual tree structure. In contrast, when the prediction mode type of the current block is not MODE_TYPE_INTRA (e.g. MODE_TYPE_ALL), the split structure of the current block may be a single tree structure.
  • whether the split structure of the current block is a local dual tree structure may be determined based on at least one of a tree type of the current block and a split structure of a CTU (current CTU) including the current block. For example, when the tree type of the current block is not a single tree (SINGLE_TREE) and the current CTU is divided into a single tree structure, the partition structure of the current block may be a local dual tree structure. In contrast, when the tree type of the current block is a single tree (SINGLE_TREE), the split structure of the current block may be a single tree structure.
  • the current block is included in the I slice, and the CTU included in the slice is implicit quadtree split into a 64x64 luma sample CU, and the 64x64 luma sample CU includes a root node of a dual tree.
  • the divided structure of the current block may be a dual tree structure.
  • Whether the partition structure of the current block is a local dual tree structure may be determined by decoding the above-described LocalDualTreeFlag with reference to Equation 6. For example, when LocalDualTreeFlag has a first value (e.g. 0), the partition structure of the current block may be determined as a single tree structure or a dual tree structure. In contrast, when LocalDualTreeFlag has a second value (e.g. 1), the partition structure of the current block may be determined as a local dual tree structure.
  • the image decoding apparatus may update the palette predictor using the palette table for the current block (S2660). For example, when the current block is a luma block in a monochrome format, the video decoding apparatus may update the palette predictor. In addition, when the current block is a chroma block and the split structure of the current block is not a local dual tree structure, the image decoding apparatus may update the palette predictor. In contrast, when the current block is a chroma block and the split structure of the current block is a local dual tree structure, the image decoding apparatus may not update the palette predictor.
  • the image decoding apparatus may update the palette predictor by adding at least one palette entry included in the palette table to the palette predictor.
  • the image decoding apparatus may update the palette predictor by replacing at least one palette entry included in the palette predictor with at least one palette entry included in the palette table.
  • the palette entry replaced in the palette predictor may be determined as the oldest palette entry or the palette entry used with the least frequency according to a first-in-first-out method (FIFO).
  • the process of updating the palette predictor may be continuously performed until the palette predictor reaches a maximum size.
  • the palette predictor does not reach the maximum size, at least one palette entry in the palette predictor that is not reused in the palette table may be added as a new palette predictor. This may be referred to as pallet stuffing.
  • the image decoding apparatus may update the palette predictor based on update information of the palette predictor signaled from the image encoding apparatus.
  • the video decoding apparatus may skip updating the palette predictor (S2660).
  • a palette predictor applied to the current block may be reapplied to a block whose palette is decoded after the current block in the current CTU.
  • Embodiment #1 of the present disclosure described above when the partition structure of the current block is a local dual tree structure, a process of updating a palette predictor applied to the current block may be skipped. Accordingly, a problem in which the palette predictor for a block that is palette-encoded/decoded next to the current block does not include a valid palette entry applied to the current block or includes an invalid palette entry is solved. I can.
  • the palette mode in encoding/decoding a current block having a local dual tree structure, the palette mode may be selectively applied based on the split structure of the current block.
  • FIG. 27 is a flowchart illustrating a palette encoding method according to an embodiment of the present disclosure.
  • the palette encoding method of FIG. 27 may be performed by the image encoding apparatus of FIG. 2. Specifically, S2710 to S2760 may be performed by the intra prediction unit 165 or by a separate functional block (e.g. palette encoding unit) different from the intra prediction unit 165. Meanwhile, S2720 to S2750 of FIG. 27 may correspond to S2310 to S2330 and S2350 of FIG. 23, respectively. Therefore, the description of S2720 to S2750 will be briefly described.
  • the apparatus for encoding an image may determine whether a split structure of a current block is a local dual tree structure (S2710).
  • whether the partition structure of the current block is a local dual tree structure may be determined based on the prediction mode type of the current block. For example, as described above with reference to FIGS. 10A to 10C, when the prediction mode type of the current block is MODE_TYPE_INTRA to which only intra prediction can be applied, the partition structure of the current block may be a local dual tree structure. In contrast, when the prediction mode type of the current block is not MODE_TYPE_INTRA (e.g. MODE_TYPE_ALL), the split structure of the current block may be a single tree structure.
  • whether the current block partition structure is a local dual tree structure may be determined based on at least one of a tree type of the current block and a partition structure of the current CTU. For example, when the tree type of the current block is not a single tree (SINGLE_TREE), and the current CTU is included in a P or B slice or is divided into a single tree structure, the partition structure of the current block may be a local dual tree structure. . In contrast, when the tree type of the current block is a single tree (SINGLE_TREE), the split structure of the current block may be a single tree structure.
  • the current block is included in the I slice, and the CTU included in the slice is implicit quadtree split into a 64x64 luma sample CU, and the 64x64 luma sample CU includes a root node of a dual tree. If so, the divided structure of the current block may be a dual tree structure. Whether the split structure of the current block is a local dual tree structure may be signaled using LocalDualTreeFlag described above with reference to Equation 6.
  • the first value (eg 0) of LocalDualTreeFlag may indicate that the partition structure of the current block is not a local dual tree structure
  • the second value (eg 1) of LocalDualTreeFlag is the partition structure of the current block is a local dual tree structure. Can indicate that it is.
  • the video encoding apparatus determines to apply the palette mode to the current block, and constructs a palette predictor and palette table for the current block. It can be done (S2720).
  • the palette predictor may include at least one palette entry (representative color value) and a palette index for identifying each palette entry.
  • the palette predictor may have a predetermined initial value (e.g. 0).
  • the palette predictor may include at least one palette entry used in a palette encoding process prior to the current block in the current CTU.
  • the image encoding apparatus may configure a palette table based on the palette predictor.
  • the palette table may include at least one palette entry selected from the palette predictor and a palette index for identifying each palette entry.
  • the palette predictor and the palette table may be variously configured according to the color format (or chroma format) of the current block.
  • the palette predictor and the palette table may include only the palette entry for the luma component of the current block.
  • the palette predictor and the palette table are the luma component of the current block and It may contain a palette entry for each chroma component.
  • the palette predictor and the palette table may be variously configured according to the partition structure of the current block. For example, when the current block has a single tree structure, the palette predictor and the palette table may have one configuration commonly applied to the luma component and the chroma component of the current block. In contrast, when the current block has a dual tree structure, the palette predictor and the palette table may have a plurality of configurations individually applied to each of the luma component and the chroma component of the current block.
  • the image encoding apparatus may generate a palette index map for the current block based on the palette table (S2730). Specifically, the image encoding apparatus maps a palette index to each pixel in the current block, based on whether the pixel value of each pixel (sample) in the current block is the same or similar between the pixel value of each pixel (sample) in the current block and the representative color value in the palette table. You can create a map.
  • the image encoding apparatus may encode the current block based on the palette index map (S2740).
  • the encoding process of the current block may be performed by scanning the palette indices in the palette index map according to a predetermined scan method.
  • the apparatus for encoding an image may determine an encoding mode (pallet sample mode) of each of the palette indexes by scanning the palette indexes mapped to the current block according to a predetermined scan method.
  • the scanning method for palette encoding may include a horizontal traverse scan and a vertical traverse scan.
  • information about the scan method may be signaled using palette_transpose_flag.
  • the palette sample mode for encoding each of the palette indexes included in the palette index map may include a'INDEX' mode and a'COPY_ABOVE' mode.
  • a value of a corresponding palette index may be encoded.
  • the palette sample mode is set to'COPY_ABOVE' mode, the value of the palette index is not encoded, and the palette index exists in the top (for horizontal traverse scan) or left (for vertical traverse scan).
  • Information indicating that the index has the same value may be encoded.
  • information on the palette sample mode may be signaled using copy_above_palette_indices_flag.
  • run-value information indicating the number of consecutively encoded palette indices using the same palette sample mode may be additionally encoded.
  • information indicating whether the palette index map includes an escape palette index may be signaled using an escape sample flag (e.g. palette_escape_val_present_flag).
  • an escape sample flag e.g. palette_escape_val_present_flag.
  • a quantized pixel value of the sample may be encoded and signaled.
  • the image encoding apparatus may update the palette predictor by using the palette table for the current block (S2750). For example, the image encoding apparatus may update the palette predictor by adding at least one palette entry included in the palette table to the palette predictor. In addition, the image encoding apparatus may update the palette predictor by replacing at least one palette entry included in the palette predictor with at least one palette entry included in the palette table. The palette entry replaced in the palette predictor may be determined as the oldest palette entry or the least frequently used palette entry according to a first-in-first-out method (FIFO).
  • FIFO first-in-first-out method
  • the process of updating the palette predictor may be continuously performed until the palette predictor reaches the maximum palette size.
  • the pallet predictor can be updated through pallet stuffing until a maximum pallet size is reached.
  • the video encoding apparatus does not apply the palette mode to the current block, and normal prediction modes other than the palette mode (eg intra prediction mode, inter prediction mode). Mode, etc.) may be used to encode the current block (S2760). Details of the conventional prediction mode are as described above with reference to FIGS. 1 to 14.
  • palette mode flag e.g. pred_mode_plt_flag
  • FIG. 28 is a diagram illustrating a specific example of a coding_unit syntax including a palette mode flag.
  • pred_mode_plt_flag may indicate whether a palette mode is applied to a current block (or a current CU). For example, pred_mode_plt_flag having a first value (e.g. 0) may indicate that the palette mode is not applied to the current block. Unlike this, pred_mode_plt_flag having the second value (e.g. 1) may indicate that the palette mode is applied to the current block.
  • pred_mode_plt_flag may be signaled based on the prediction mode type of the current block. For example, when the prediction mode type of the current block is a first mode type (e.g. MODE_TYPE_ALL) to which all of intra prediction, intra block copy (IBC), palette mode, and inter prediction can be applied, pred_mode_plt_flag may be signaled. In contrast, when the prediction mode type of the current block is a second mode type to which only intra prediction can be applied (eg MODE_TYPE_INTRA) or a third mode type to which only inter prediction can be applied (eg MODE_TYPE_INTER), pred_mode_plt_flag may not be signaled. have.
  • a first mode type e.g. MODE_TYPE_ALL
  • 29 is a flowchart illustrating a method of decoding a palette according to an embodiment of the present disclosure.
  • the palette decoding method of FIG. 29 may be performed by the image decoding apparatus of FIG. 3. Specifically, steps S2910 to S2980 may be performed by the intra prediction unit 265 or by a separate functional block (e.g. a palette decoding unit) different from the intra prediction unit 265. Meanwhile, S2930 to S2970 of FIG. 29 may correspond to S2610 to S2640 and S2660 of FIG. 26, respectively. Therefore, the description of S2930 to S2970 will be briefly described.
  • the apparatus for decoding an image may determine whether a split structure of a current block is a local dual tree structure (S2910).
  • whether the partition structure of the current block is a local dual tree structure may be determined based on the prediction mode type of the current block. For example, as described above with reference to FIGS. 10A to 10C, when the prediction mode type of the current block is MODE_TYPE_INTRA to which only intra prediction can be applied, the partition structure of the current block may be a local dual tree structure. In contrast, when the prediction mode type of the current block is not MODE_TYPE_INTRA (e.g. MODE_TYPE_ALL), the split structure of the current block may be a single tree structure.
  • whether the current block partition structure is a local dual tree structure may be determined based on at least one of a tree type of the current block and a partition structure of the current CTU. For example, when the tree type of the current block is not a single tree (SINGLE_TREE), and the current CTU is included in a P or B slice or is divided into a single tree structure, the partition structure of the current block may be a local dual tree structure. . In contrast, when the tree type of the current block is a single tree (SINGLE_TREE), the split structure of the current block may be a single tree structure.
  • the current block is included in the I slice, and the CTU included in the slice is implicit quadtree split into a 64x64 luma sample CU, and the 64x64 luma sample CU includes a root node of a dual tree. If so, the divided structure of the current block may be a dual tree structure. Whether the split structure of the current block is a local dual tree structure may be signaled using LocalDualTreeFlag described above with reference to Equation 6.
  • the first value (eg 0) of LocalDualTreeFlag may indicate that the partition structure of the current block is not a local dual tree structure
  • the second value (eg 1) of LocalDualTreeFlag is the partition structure of the current block is a local dual tree structure. Can indicate that it is.
  • the image decoding apparatus may determine whether the palette mode is applied to the current block. In an example, the image decoding apparatus may determine whether the palette mode is applied to the current block based on the palette mode flag (e.g. pred_mode_plt_flag) obtained from the bitstream. For example, when pred_mode_plt_flag described above with reference to FIG. 28 has a first value (e.g. 0), the palette mode may not be applied to the current block. In contrast, when pred_mode_plt_flag has a second value (e.g. 1), the palette mode may be applied to the current block. Meanwhile, when pred_mode_plt_flag is not obtained from the bitstream, it may be inferred that the value of pred_mode_plt_flag has the first value.
  • pred_mode_plt_flag when pred_mode_plt_flag is not obtained from the bitstream, it may be inferred that the value of pred_mode_plt
  • the image decoding apparatus may obtain palette information and palette index prediction information for the current block from the bitstream (S2930).
  • the palette information may include information about a palette predictor and/or a new palette entry.
  • the palette index prediction information may include a palette index mapped to the current block and run-value information of the palette index.
  • the image decoding apparatus may configure a palette predictor and a palette table for the current block based on the palette information obtained from the bitstream (S2940).
  • the palette predictor may have the same configuration as the palette predictor updated in a process of decoding a palette prior to the current block.
  • the palette predictor may have a predetermined initial value (eg 0), or may have the same configuration as the palette predictor used in the previous palette decoding process. .
  • the image decoding apparatus may configure a palette table for the current block based on the palette predictor.
  • the palette table may include at least one of a palette entry included in the palette predictor and a new palette entry obtained from a bitstream, and a palette index for identifying each palette entry.
  • the palette predictor and the palette table may be variously configured according to the color format (or chroma format) of the current block.
  • the palette predictor and the palette table may be variously configured according to the partition structure of the current block.
  • the image decoding apparatus may generate a palette index map for the current block based on the palette index prediction information (S2950). Specifically, the image decoding apparatus maps the palette index to each sample in the current block according to a predetermined scan method using the palette index obtained from the bitstream, the palette sample mode, and the run-value of the palette sample mode, You can create a palette index map.
  • the scanning method for pallet decoding may include a horizontal traverse scan and a vertical traverse scan.
  • the scan method for palette decoding may be determined by decoding the palette_transpose_flag included in the bitstream. For example, when palette_transpose_flag has a first value (e.g. 0), a scan method for palette decoding may be determined as a horizontal traverse scan. In contrast, when palette_transpose_flag has a second value (e.g. 1), a scan method for palette decoding may be determined as a vertical traverse scan.
  • the palette sample mode may include a'INDEX' mode and a'COPY_ABOVE' mode.
  • the value of the palette index mapped to the current sample may be obtained directly from the bitstream.
  • the value of the palette index mapped to the current sample is present above the current sample (in the case of a horizontal traverse scan) or left (in the case of a vertical traverse scan). It may be determined as a value of the palette index mapped to the surrounding samples.
  • the quantized pixel value of the current sample may be obtained directly from the bitstream.
  • An escape palette index may be mapped to the escape sample.
  • the image decoding apparatus may decode the current block based on the palette table and the palette index map for the current block (S2960). Specifically, the image decoding apparatus may generate a prediction block for the current block by inverse mapping a value of each palette index in the palette index map to a representative color value by referring to the palette table.
  • the image decoding apparatus may update the palette predictor by using the palette table for the current block (S2970). For example, the image decoding apparatus may update the palette predictor by adding at least one palette entry included in the palette table to the palette predictor. In addition, the image decoding apparatus may update the palette predictor by replacing at least one palette entry included in the palette predictor with at least one palette entry included in the palette table.
  • the process of updating the palette predictor may be continuously performed until the palette predictor reaches the maximum palette size.
  • the pallet predictor can be updated through pallet stuffing until a maximum pallet size is reached.
  • the image decoding apparatus may update the palette predictor based on update information of the palette predictor signaled from the image encoding apparatus.
  • the video decoding apparatus does not apply the palette mode to the current block, and a normal prediction mode other than the palette mode (eg intra prediction mode, inter prediction mode). Mode, etc.) may be used to decode the current block (S2980). Details of the conventional prediction mode are as described above with reference to FIGS. 1 to 14. In this case, a palette predictor initialized to a predetermined value (e.g. 0) may be applied to a block whose palette is decoded after the current block in the current CTU, or a palette predictor applied to the current block may be applied again.
  • a predetermined value e.g. 0
  • the current block when the split structure of the current block is a local dual tree structure, the current block may be encoded/decoded using a normal prediction mode other than the palette mode. Accordingly, since the process of updating the palette predictor is also skipped, a problem in which the palette predictor does not include a valid palette entry or includes an invalid palette entry can be solved.
  • the exemplary methods of the present disclosure are expressed as a series of operations for clarity of description, this is not intended to limit the order in which steps are performed, and each step may be performed simultaneously or in a different order if necessary.
  • the exemplary steps may include additional steps, other steps may be included excluding some steps, or may include additional other steps excluding some steps.
  • an image encoding apparatus or an image decoding apparatus performing a predetermined operation may perform an operation (step) of confirming an execution condition or situation of a corresponding operation (step). For example, when it is described that a predetermined operation is performed when a predetermined condition is satisfied, the video encoding apparatus or the video decoding apparatus performs an operation to check whether the predetermined condition is satisfied, and then performs the predetermined operation. You can do it.
  • various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof.
  • one or more ASICs Application Specific Integrated Circuits
  • DSPs Digital Signal Processors
  • DSPDs Digital Signal Processing Devices
  • PLDs Programmable Logic Devices
  • FPGAs Field Programmable Gate Arrays
  • general purpose It may be implemented by a processor (general processor), a controller, a microcontroller, a microprocessor, or the like.
  • the image decoding device and the image encoding device to which the embodiment of the present disclosure is applied include a multimedia broadcasting transmission/reception device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video chat device, and a real-time communication device such as video communication , Mobile streaming devices, storage media, camcorders, video-on-demand (VoD) service providers, OTT video (Over the top video) devices, Internet streaming service providers, three-dimensional (3D) video devices, video telephony video devices, and medical use. It may be included in a video device or the like, and may be used to process a video signal or a data signal.
  • an OTT video (Over the top video) device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, and a digital video recorder (DVR).
  • FIG. 30 is a diagram illustrating a content streaming system to which an embodiment according to the present disclosure can be applied.
  • the content streaming system to which the embodiment of the present disclosure is applied may largely include an encoding server, a streaming server, a web server, a media storage device, a user device, and a multimedia input device.
  • the encoding server serves to generate a bitstream by compressing content input from multimedia input devices such as a smartphone, a camera, and a camcorder into digital data, and transmits it to the streaming server.
  • multimedia input devices such as smart phones, cameras, camcorders, etc. directly generate bitstreams
  • the encoding server may be omitted.
  • the bitstream may be generated by an image encoding method and/or an image encoding apparatus to which an embodiment of the present disclosure is applied, and the streaming server may temporarily store the bitstream while transmitting or receiving the bitstream.
  • the streaming server may transmit multimedia data to a user device based on a user request through a web server, and the web server may serve as an intermediary for notifying the user of a service.
  • the web server transmits the request to the streaming server, and the streaming server transmits multimedia data to the user.
  • the content streaming system may include a separate control server, and in this case, the control server may play a role of controlling a command/response between devices in the content streaming system.
  • the streaming server may receive content from a media storage and/or encoding server. For example, when content is received from the encoding server, the content may be received in real time. In this case, in order to provide a smooth streaming service, the streaming server may store the bitstream for a predetermined time.
  • Examples of the user device include a mobile phone, a smart phone, a laptop computer, a digital broadcasting terminal, a personal digital assistant (PDA), a portable multimedia player (PMP), a navigation system, a slate PC, and Tablet PC, ultrabook, wearable device, e.g., smartwatch, smart glass, head mounted display (HMD), digital TV, desktop There may be computers, digital signage, etc.
  • PDA personal digital assistant
  • PMP portable multimedia player
  • Tablet PC ultrabook
  • wearable device e.g., smartwatch, smart glass, head mounted display (HMD), digital TV, desktop
  • HMD head mounted display
  • digital TV desktop
  • desktop There may be computers, digital signage, etc.
  • Each server in the content streaming system may be operated as a distributed server, and in this case, data received from each server may be distributedly processed.
  • the scope of the present disclosure is software or machine-executable instructions (e.g., operating systems, applications, firmware, programs, etc.) that cause an operation according to the method of various embodiments to be executed on a device or computer, and such software or It includes a non-transitory computer-readable medium (non-transitory computer-readable medium) which stores instructions and the like and is executable on a device or a computer.
  • a non-transitory computer-readable medium non-transitory computer-readable medium
  • An embodiment according to the present disclosure may be used to encode/decode an image.

Landscapes

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

Abstract

영상 부호화/복호화 방법 및 장치가 제공된다. 본 개시에 따른 영상 복호화 방법은 현재 블록에 팔레트 모드가 적용되는 경우, 비트스트림으로부터 상기 현재 블록에 대한 팔레트 정보 및 팔레트 인덱스 예측 정보를 획득하는 단계, 상기 팔레트 정보에 기반하여 상기 현재 블록에 대한 팔레트 예측자를 구성하고, 상기 팔레트 예측자에 기반하여 상기 현재 블록에 대한 팔레트 테이블을 구성하는 단계, 상기 팔레트 인덱스 예측 정보에 기반하여, 상기 현재 블록에 대한 팔레트 인덱스 맵을 생성하는 단계, 및 상기 팔레트 테이블 및 상기 팔레트 인덱스 맵에 기반하여, 상기 현재 블록을 복호화하는 단계를 포함하고, 상기 팔레트 예측자는 상기 현재 블록의 분할 구조에 기반하여 선택적으로 업데이트될 수 있다.

Description

팔레트 모드를 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법
본 개시는 팔레트 모드를 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법에 관한 것으로서, 보다 상세하게는, 현재 블록의 분할 구조에 기반하여 팔레트 예측자를 선택적으로 업데이트하는 영상 부호화/복호화 방법, 장치 및 본 개시의 영상 부호화 방법/장치에 의해 생성된 비트스트림을 전송하는 방법에 관한 것이다.
최근 HD(High Definition) 영상 및 UHD(Ultra High Definition) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 분야에서 증가하고 있다. 영상 데이터가 고해상도, 고품질이 될수록 기존의 영상 데이터에 비해 상대적으로 전송되는 정보량 또는 비트량이 증가하게 된다. 전송되는 정보량 또는 비트량의 증가는 전송 비용과 저장 비용의 증가를 초래한다.
이에 따라, 고해상도, 고품질 영상의 정보를 효과적으로 전송하거나 저장하고, 재생하기 위한 고효율의 영상 압축 기술이 요구된다.
본 개시는 부호화/복호화 효율이 향상된 영상 부호화/복호화 방법 및 장치를 제공하는 것을 목적으로 한다.
또한, 본 개시는 팔레트 모드를 이용한 영상 부호화/복호화 방법 및 장치를 제공하는 것을 목적으로 한다.
또한, 본 개시는 현재 블록의 분할 구조에 기반하여 팔레트 예측자를 선택적으로 업데이트하는 영상 부호화/복호화 방법 및 장치를 제공하는 것을 목적으로 한다.
또한, 본 개시는 현재 블록의 분할 구조에 기반하여 팔레트 모드를 선택적으로 적용하는 영상 부호화/복호화 방법 및 장치를 제공하는 것을 목적으로 한다.
또한, 본 개시는 본 개시에 따른 영상 부호화 방법 또는 장치에 의해 생성된 비트스트림을 전송하는 방법을 제공하는 것을 목적으로 한다.
또한, 본 개시는 본 개시에 따른 영상 부호화 방법 또는 장치에 의해 생성된 비트스트림을 저장한 기록 매체를 제공하는 것을 목적으로 한다.
또한, 본 개시는 본 개시에 따른 영상 복호화 장치에 의해 수신되고 복호화되어 영상의 복원에 이용되는 비트스트림을 저장한 기록 매체를 제공하는 것을 목적으로 한다.
본 개시에서 이루고자 하는 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급하지 않은 또 다른 기술적 과제들은 아래의 기재로부터 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.
본 개시의 일 양상에 따른 영상 복호화 방법은, 현재 블록에 팔레트 모드가 적용되는 경우, 비트스트림으로부터 상기 현재 블록에 대한 팔레트 정보 및 팔레트 인덱스 예측 정보를 획득하는 단계, 상기 팔레트 정보에 기반하여, 상기 현재 블록에 대한 팔레트 예측자 및 팔레트 테이블을 구성하는 단계, 상기 팔레트 인덱스 예측 정보에 기반하여, 상기 현재 블록에 대한 팔레트 인덱스 맵을 생성하는 단계, 및 상기 팔레트 테이블 및 상기 팔레트 인덱스 맵에 기반하여, 상기 현재 블록을 복호화하는 단계를 포함하고, 상기 팔레트 예측자는 상기 현재 블록의 분할 구조에 기반하여 선택적으로 업데이트될 수 있다.
본 개시의 다른 양상에 따른 영상 복호화 장치는, 메모리 및 적어도 하나의 프로세서를 포함하며, 상기 적어도 하나의 프로세서는, 현재 블록에 팔레트 모드가 적용되는 경우, 비트스트림으로부터 상기 현재 블록에 대한 팔레트 정보 및 팔레트 인덱스 예측 정보를 획득하고, 상기 팔레트 정보에 기반하여, 상기 현재 블록에 대한 팔레트 예측자 및 팔레트 테이블을 구성하고, 상기 팔레트 인덱스 예측 정보에 기반하여, 상기 현재 블록에 대한 팔레트 인덱스 맵을 생성하고, 상기 팔레트 테이블 및 상기 팔레트 인덱스 맵에 기반하여, 상기 현재 블록을 복호화하며, 상기 팔레트 예측자는 상기 현재 블록의 분할 구조에 기반하여 선택적으로 업데이트될 수 있다.
본 개시의 또 다른 양상에 따른 영상 부호화 방법은, 현재 블록에 팔레트 모드가 적용되는 경우, 상기 현재 블록에 대한 팔레트 예측자 및 팔레트 테이블을 구성하는 단계, 상기 팔레트 테이블에 기반하여, 상기 현재 블록에 대한 팔레트 인덱스 맵을 생성하는 단계, 및 상기 팔레트 인덱스 맵에 기반하여 상기 현재 블록을 부호화하는 단계를 포함하고, 상기 팔레트 예측자는 상기 현재 블록의 분할 구조에 기반하여 선택적으로 업데이트될 수 있다.
본 개시의 또 다른 양상에 따른 전송 방법은, 본 개시의 영상 부호화 장치 또는 영상 부호화 방법에 의해 생성된 비트스트림을 전송할 수 있다.
본 개시의 또 다른 양상에 따른 컴퓨터 판독 가능한 기록 매체는, 본 개시의 영상 부호화 방법 또는 영상 부호화 장치에 의해 생성된 비트스트림을 저장할 수 있다.
본 개시에 대하여 위에서 간략하게 요약된 특징들은 후술하는 본 개시의 상세한 설명의 예시적인 양상일 뿐이며, 본 개시의 범위를 제한하는 것은 아니다.
본 개시에 따르면, 부호화/복호화 효율이 향상된 영상 부호화/복호화 방법 및 장치가 제공될 수 있다.
또한, 본 개시에 따르면, 개선된 팔레트 모드에 기반한 영상 부호화/복호화 방법 및 장치가 제공될 수 있다.
또한, 본 개시에 따르면, 현재 블록의 분할 구조에 기반하여 팔레트 모드를 선택적으로 적용하는 영상 부호화/복호화 방법 및 장치가 제공될 수 있다.
또한, 본 개시에 따르면, 본 개시에 따른 영상 부호화 방법 또는 장치에 의해 생성된 비트스트림을 전송하는 방법이 제공될 수 있다.
또한, 본 개시에 따르면, 본 개시에 따른 영상 부호화 방법 또는 장치에 의해 생성된 비트스트림을 저장한 기록 매체가 제공될 수 있다.
또한, 본 개시에 따르면, 본 개시에 따른 영상 복호화 장치에 의해 수신되고 복호화되어 영상의 복원에 이용되는 비트스트림을 저장한 기록 매체가 제공될 수 있다.
본 개시에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.
도 1은 본 개시에 따른 실시예가 적용될 수 있는 비디오 코딩 시스템을 개략적으로 나타내는 도면이다.
도 2는 본 개시에 따른 실시예가 적용될 수 있는 영상 부호화 장치를 개략적으로 나타내는 도면이다.
도 3은 본 개시에 따른 실시예가 적용될 수 있는 영상 복호화 장치를 개략적으로 나타내는 도면이다.
도 4는 일 실시예에 따른 영상의 분할 구조를 나타내는 도면이다.
도 5는 멀티타입 트리 구조에 따른 블록의 분할 타입의 일 실시예를 나타내는 도면이다.
도 6은 본 개시에 따른 멀티타입 트리를 수반하는 쿼드트리(quadtree with nested multi-type tree) 구조에서의 블록 분할 정보의 시그널링 메커니즘을 예시적으로 나타내는 도면이다.
도 7은 CTU가 다중 CU들로 분할되는 일 실시예를 나타내는 도면이다.
도 8은 리던던트 분할 패턴의 일 실시예를 나타내는 도면이다.
도 9는 4:2:0 컬러 포맷에서 루마 블록 및 크로마 블록의 일 예를 나타내는 도면이다.
도 10a 내지 도 10c는 싱글 트리 구조를 듀얼 트리 구조로 전환하기 위한 신택스의 일 예를 나타내는 도면들이다.
도 11은 인트라 예측 기반 비디오/영상 인코딩 방법을 나타내는 흐름도이다.
도 12는 본 개시에 따른 인트라 예측부의 구성을 예시적으로 나타내는 도면이다.
도 13은 인트라 예측 기반 비디오/영상 디코딩 방법을 나타내는 흐름도이다.
도 14는 본 개시에 따른 인트라 예측부의 구성을 예시적으로 나타내는 도면이다.
도 15는 팔레트 모드에서 이용될 수 있는 스캔 방식의 일 예를 나타내는 도면이다.
도 16은 현재 블록의 팔레트 부호화 과정의 일 예를 나타내는 도면이다.
도 17은 팔레트 모드를 위한 coding_unit 신택스의 일부를 나타내는 도면이다.
도 18a 내지 도 18e는 팔레트 모드를 위한 palette_coding 신택스를 나타내는 도면들이다.
도 19는 로컬 듀얼 트리 구조를 갖는 CTU의 일 예를 나타내는 도면이다.
도 20은 도 19의 예에서 각각의 CU들에 대한 복호화 과정의 일 예를 나타내는 도면이다.
도 21 및 도 22는 도 20의 복호화 과정에서 팔레트 모드 적용시 발생되는 문제들을 설명하기 위한 도면들이다.
도 23은 본 개시의 일 실시예에 따른 팔레트 부호화 방법을 나타내는 흐름도이다.
도 24는 도 19의 예에서 팔레트 예측자가 업데이트되지 않는 경우 팔레트 부호화 과정을 설명하기 위한 도면이다.
도 25는 현재 블록의 분할 구조에 기반하여 팔레트 예측자를 선택적으로 업데이트하는 과정의 일 예를 나타내는 도면이다.
도 26은 본 개시의 일 실시예에 따른 팔레트 복호화 방법을 나타내는 흐름도이다.
도 27은 본 개시의 일 실시예에 따른 팔레트 부호화 방법을 나타내는 흐름도이다.
도 28은 팔레트 모드 플래그를 포함하는 coding_unit 신택스의 구체적인 일 예는 나타내는 도면이다.
도 29는 본 개시의 일 실시예에 따른 팔레트 복호화 방법을 나타내는 흐름도이다.
도 30은 본 개시에 따른 실시예가 적용될 수 있는 컨텐츠 스트리밍 시스템을 예시적으로 나타내는 도면이다.
이하에서는 첨부한 도면을 참고로 하여 본 개시의 실시예에 대하여 본 개시가 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나, 본 개시는 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다.
본 개시의 실시예를 설명함에 있어서 공지 구성 또는 기능에 대한 구체적인 설명이 본 개시의 요지를 흐릴 수 있다고 판단되는 경우에는 그에 대한 상세한 설명은 생략한다. 그리고, 도면에서 본 개시에 대한 설명과 관계없는 부분은 생략하였으며, 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.
본 개시에 있어서, 어떤 구성요소가 다른 구성요소와 "연결", "결합" 또는 "접속"되어 있다고 할 때, 이는 직접적인 연결관계뿐만 아니라, 그 중간에 또 다른 구성요소가 존재하는 간접적인 연결관계도 포함할 수 있다. 또한 어떤 구성요소가 다른 구성요소를 "포함한다" 또는 "가진다"고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 배제하는 것이 아니라 또 다른 구성요소를 더 포함할 수 있는 것을 의미한다.
본 개시에 있어서, 제1, 제2 등의 용어는 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용되며, 특별히 언급되지 않는 한 구성요소들간의 순서 또는 중요도 등을 한정하지 않는다. 따라서, 본 개시의 범위 내에서 일 실시예에서의 제1 구성요소는 다른 실시예에서 제2 구성요소라고 칭할 수도 있고, 마찬가지로 일 실시예에서의 제2 구성요소를 다른 실시예에서 제1 구성요소라고 칭할 수도 있다.
본 개시에 있어서, 서로 구별되는 구성요소들은 각각의 특징을 명확하게 설명하기 위함이며, 구성요소들이 반드시 분리되는 것을 의미하지는 않는다. 즉, 복수의 구성요소가 통합되어 하나의 하드웨어 또는 소프트웨어 단위로 이루어질 수도 있고, 하나의 구성요소가 분산되어 복수의 하드웨어 또는 소프트웨어 단위로 이루어질 수도 있다. 따라서, 별도로 언급하지 않더라도 이와 같이 통합된 또는 분산된 실시예도 본 개시의 범위에 포함된다.
본 개시에 있어서, 다양한 실시예에서 설명하는 구성요소들이 반드시 필수적인 구성요소들은 의미하는 것은 아니며, 일부는 선택적인 구성요소일 수 있다. 따라서, 일 실시예에서 설명하는 구성요소들의 부분집합으로 구성되는 실시예도 본 개시의 범위에 포함된다. 또한, 다양한 실시예에서 설명하는 구성요소들에 추가적으로 다른 구성요소를 포함하는 실시예도 본 개시의 범위에 포함된다.
본 개시는 영상의 부호화 및 복호화에 관한 것으로서, 본 개시에서 사용되는 용어는, 본 개시에서 새롭게 정의되지 않는 한 본 개시가 속한 기술 분야에서 통용되는 통상의 의미를 가질 수 있다.
본 개시에서 "픽처(picture)"는 일반적으로 특정 시간대의 하나의 영상을 나타내는 단위를 의미하며, 슬라이스(slice)/타일(tile)은 픽처의 일부를 구성하는 부호화 단위로서, 하나의 픽처는 하나 이상의 슬라이스/타일로 구성될 수 있다. 또한, 슬라이스/타일은 하나 이상의 CTU(coding tree unit)를 포함할 수 있다.
본 개시에서 "픽셀(pixel)" 또는 "펠(pel)"은 하나의 픽처(또는 영상)를 구성하는 최소의 단위를 의미할 수 있다. 또한, 픽셀에 대응하는 용어로서 "샘플(sample)"이 사용될 수 있다. 샘플은 일반적으로 픽셀 또는 픽셀의 값을 나타낼 수 있으며, 루마(luma) 성분의 픽셀/픽셀값만을 나타낼 수도 있고, 크로마(chroma) 성분의 픽셀/픽셀값만을 나타낼 수도 있다.
본 개시에서 "유닛(unit)"은 영상 처리의 기본 단위를 나타낼 수 있다. 유닛은 픽처의 특정 영역 및 해당 영역에 관련된 정보 중 적어도 하나를 포함할 수 있다. 유닛은 경우에 따라서 "샘플 어레이", "블록(block)" 또는 "영역(area)" 등의 용어와 혼용하여 사용될 수 있다. 일반적인 경우, MxN 블록은 M개의 열과 N개의 행으로 이루어진 샘플들(또는 샘플 어레이) 또는 변환 계수(transform coefficient)들의 집합(또는 어레이)을 포함할 수 있다.
본 개시에서 "현재 블록"은 "현재 코딩 블록", "현재 코딩 유닛", "부호화 대상 블록", "복호화 대상 블록" 또는 "처리 대상 블록" 중 하나를 의미할 수 있다. 예측이 수행되는 경우, "현재 블록"은 "현재 예측 블록" 또는 "예측 대상 블록"을 의미할 수 있다. 변환(역변환)/양자화(역양자화)가 수행되는 경우, "현재 블록"은 "현재 변환 블록" 또는 "변환 대상 블록"을 의미할 수 있다. 필터링이 수행되는 경우, "현재 블록"은 "필터링 대상 블록"을 의미할 수 있다.
본 개시에서 "현재 블록"은 크로마 블록이라는 명시적인 기재가 없는 한 루마 성분 블록과 크로마 성분 블록을 모두 포함하는 블록 또는 "현재 블록의 루마 블록"을 의미할 수 있다. 현재 블록의 루마 성분 블록은 명시적으로 "루마 블록" 또는 "현재 루마 블록"과 같이 루마 성분 블록이라는 명시적인 기재를 포함하여 표현될 수 있다. 또한, 현재 블록의 크로마 성분 블록은 명시적으로 "크로마 블록" 또는 "현재 크로마 블록"과 같이 크로마 성분 블록이라는 명시적인 기재를 포함하여 표현될 수 있다.
본 개시에서 "/"와 ","는 "및/또는"으로 해석될 수 있다. 예를 들어, "A/B"와 "A, B"는 "A 및/또는 B"로 해석될 수 있다. 또한, "A/B/C"와 "A, B, C"는 "A, B 및/또는 C 중 적어도 하나"를 의미할 수 있다.
본 개시에서 "또는"은 "및/또는"으로 해석될 수 있다. 예를 들어, "A 또는 B"는, 1) "A" 만을 의미하거나 2) "B" 만을 의미하거나, 3) "A 및 B"를 의미할 수 있다. 또는, 본 개시에서 "또는"은 "추가적으로 또는 대체적으로(additionally or alternatively)"를 의미할 수 있다.
비디오 코딩 시스템 개요
도 1은 본 개시에 따른 비디오 코딩 시스템을 도시한다.
일 실시예에 따른 비디오 코딩 시스템은 부호화 장치(10) 및 복호화 장치(20)를 포함할 수 있다. 부호화 장치(10)는 부호화된 비디오(video) 및/또는 영상(image) 정보 또는 데이터를 파일 또는 스트리밍 형태로 디지털 저장매체 또는 네트워크를 통하여 복호화 장치(20)로 전달할 수 있다.
일 실시예예 따른 부호화 장치(10)는 비디오 소스 생성부(11), 부호화부(12), 전송부(13)를 포함할 수 있다. 일 실시예에 따른 복호화 장치(20)는 수신부(21), 복호화부(22) 및 렌더링부(23)를 포함할 수 있다. 상기 부호화부(12)는 비디오/영상 부호화부라고 불릴 수 있고, 상기 복호화부(22)는 비디오/영상 복호화부라고 불릴 수 있다. 전송부(13)는 부호화부(12)에 포함될 수 있다. 수신부(21)는 복호화부(22)에 포함될 수 있다. 렌더링부(23)는 디스플레이부를 포함할 수도 있고, 디스플레이부는 별개의 디바이스 또는 외부 컴포넌트로 구성될 수도 있다.
비디오 소스 생성부(11)는 비디오/영상의 캡쳐, 합성 또는 생성 과정 등을 통하여 비디오/영상을 획득할 수 있다. 비디오 소스 생성부(11)는 비디오/영상 캡쳐 디바이스 및/또는 비디오/영상 생성 디바이스를 포함할 수 있다. 비디오/영상 캡쳐 디바이스는 예를 들어, 하나 이상의 카메라, 이전에 캡쳐된 비디오/영상을 포함하는 비디오/영상 아카이브 등을 포함할 수 있다. 비디오/영상 생성 디바이스는 예를 들어 컴퓨터, 타블렛 및 스마트폰 등을 포함할 수 있으며 (전자적으로) 비디오/영상을 생성할 수 있다. 예를 들어, 컴퓨터 등을 통하여 가상의 비디오/영상이 생성될 수 있으며, 이 경우 관련 데이터가 생성되는 과정으로 비디오/영상 캡쳐 과정이 갈음될 수 있다.
부호화부(12)는 입력 비디오/영상을 부호화할 수 있다. 부호화부(12)는 압축 및 부호화 효율을 위하여 예측, 변환, 양자화 등 일련의 절차를 수행할 수 있다. 부호화부(12)는 부호화된 데이터(부호화된 비디오/영상 정보)를 비트스트림(bitstream) 형태로 출력할 수 있다.
전송부(13)는 비트스트림 형태로 출력된 부호화된 비디오/영상 정보 또는 데이터를 파일 또는 스트리밍 형태로 디지털 저장매체 또는 네트워크를 통하여 복호화 장치(20)의 수신부(21)로 전달할 수 있다. 디지털 저장 매체는 USB, SD, CD, DVD, 블루레이, HDD, SSD 등 다양한 저장 매체를 포함할 수 있다. 전송부(13)는 미리 정해진 파일 포맷을 통하여 미디어 파일을 생성하기 위한 엘리먼트를 포함할 수 있고, 방송/통신 네트워크를 통한 전송을 위한 엘리먼트를 포함할 수 있다. 수신부(21)는 상기 저장매체 또는 네트워크로부터 상기 비트스트림을 추출/수신하여 복호화부(22)로 전달할 수 있다.
복호화부(22)는 부호화부(12)의 동작에 대응하는 역양자화, 역변환, 예측 등 일련의 절차를 수행하여 비디오/영상을 복호화할 수 있다.
렌더링부(23)는 복호화된 비디오/영상을 렌더링할 수 있다. 렌더링된 비디오/영상은 디스플레이부를 통하여 디스플레이될 수 있다.
영상 부호화 장치 개요
도 2는 본 개시에 따른 실시예가 적용될 수 있는 영상 부호화 장치를 개략적으로 도시한 도면이다.
도 2에 도시된 바와 같이, 영상 부호화 장치(100)는 영상 분할부(110), 감산부(115), 변환부(120), 양자화부(130), 역양자화부(140), 역변환부(150), 가산부(155), 필터링부(160), 메모리(170), 인터 예측부(180), 인트라 예측부(185) 및 엔트로피 인코딩부(190)를 포함할 수 있다. 인터 예측부(180) 및 인트라 예측부(185)는 합쳐서 "예측부"라고 지칭될 수 있다. 변환부(120), 양자화부(130), 역양자화부(140), 역변환부(150)는 레지듀얼(residual) 처리부에 포함될 수 있다. 레지듀얼 처리부는 감산부(115)를 더 포함할 수도 있다.
영상 부호화 장치(100)를 구성하는 복수의 구성부들의 전부 또는 적어도 일부는 실시예에 따라 하나의 하드웨어 컴포넌트(예를 들어, 인코더 또는 프로세서)로 구현될 수 있다. 또한 메모리(170)는 DPB(decoded picture buffer)를 포함할 수 있고, 디지털 저장 매체에 의하여 구현될 수 있다.
영상 분할부(110)는 영상 부호화 장치(100)에 입력된 입력 영상(또는, 픽쳐, 프레임)을 하나 이상의 처리 유닛(processing unit)으로 분할할 수 있다. 일 예로, 상기 처리 유닛은 코딩 유닛(coding unit, CU)이라고 불릴 수 있다. 코딩 유닛은 코딩 트리 유닛(coding tree unit, CTU) 또는 최대 코딩 유닛(largest coding unit, LCU)을 QT/BT/TT (Quad-tree/binary-tree/ternary-tree) 구조에 따라 재귀적으로(recursively) 분할함으로써 획득될 수 있다. 예를 들어, 하나의 코딩 유닛은 쿼드 트리 구조, 바이너리 트리 구조 및/또는 터너리 트리 구조를 기반으로 하위(deeper) 뎁스의 복수의 코딩 유닛들로 분할될 수 있다. 코딩 유닛의 분할을 위해, 쿼드 트리 구조가 먼저 적용되고 바이너리 트리 구조 및/또는 터너리 트리 구조가 나중에 적용될 수 있다. 더 이상 분할되지 않는 최종 코딩 유닛을 기반으로 본 개시에 따른 코딩 절차가 수행될 수 있다. 최대 코딩 유닛이 바로 최종 코딩 유닛으로 사용될 수 있고, 최대 코딩 유닛을 분할하여 획득한 하위 뎁스의 코딩 유닛이 최종 코닛 유닛으로 사용될 수도 있다. 여기서 코딩 절차라 함은 후술하는 예측, 변환 및/또는 복원 등의 절차를 포함할 수 있다. 다른 예로, 상기 코딩 절차의 처리 유닛은 예측 유닛(PU: Prediction Unit) 또는 변환 유닛(TU: Transform Unit)일 수 있다. 상기 예측 유닛 및 상기 변환 유닛은 각각 상기 최종 코딩 유닛으로부터 분할 또는 파티셔닝될 수 있다. 상기 예측 유닛은 샘플 예측의 단위일 수 있고, 상기 변환 유닛은 변환 계수를 유도하는 단위 및/또는 변환 계수로부터 레지듀얼 신호(residual signal)를 유도하는 단위일 수 있다.
예측부(인터 예측부(180) 또는 인트라 예측부(185))는 처리 대상 블록(현재 블록)에 대한 예측을 수행하고, 상기 현재 블록에 대한 예측 샘플들을 포함하는 예측된 블록(predicted block)을 생성할 수 있다. 예측부는 현재 블록 또는 CU 단위로 인트라 예측이 적용되는지 또는 인터 예측이 적용되는지 결정할 수 있다. 예측부는 현재 블록의 예측에 관한 다양한 정보를 생성하여 엔트로피 인코딩부(190)로 전달할 수 있다. 예측에 관한 정보는 엔트로피 인코딩부(190)에서 인코딩되어 비트스트림 형태로 출력될 수 있다.
인트라 예측부(185)는 현재 픽처 내의 샘플들을 참조하여 현재 블록을 예측할 수 있다. 상기 참조되는 샘플들은 인트라 예측 모드 및/또는 인트라 예측 기법에 따라 상기 현재 블록의 주변(neighbor)에 위치할 수 있고, 또는 떨어져서 위치할 수도 있다. 인트라 예측 모드들은 복수의 비방향성 모드와 복수의 방향성 모드를 포함할 수 있다. 비방향성 모드는 예를 들어 DC 모드 및 플래너 모드(Planar 모드)를 포함할 수 있다. 방향성 모드는 예측 방향의 세밀한 정도에 따라, 예를 들어 33개의 방향성 예측 모드 또는 65개의 방향성 예측 모드를 포함할 수 있다. 다만, 이는 예시로서 설정에 따라 그 이상 또는 그 이하의 개수의 방향성 예측 모드들이 사용될 수 있다. 인트라 예측부(185)는 주변 블록에 적용된 예측 모드를 이용하여, 현재 블록에 적용되는 예측 모드를 결정할 수도 있다.
인터 예측부(180)는 참조 픽처 상에서 움직임 벡터에 의해 특정되는 참조 블록(참조 샘플 어레이)을 기반으로, 현재 블록에 대한 예측된 블록을 유도할 수 있다. 이때, 인터 예측 모드에서 전송되는 움직임 정보의 양을 줄이기 위해 주변 블록과 현재 블록 간의 움직임 정보의 상관성에 기반하여 움직임 정보를 블록, 서브블록 또는 샘플 단위로 예측할 수 있다. 상기 움직임 정보는 움직임 벡터 및 참조 픽처 인덱스를 포함할 수 있다. 상기 움직임 정보는 인터 예측 방향(L0 예측, L1 예측, Bi 예측 등) 정보를 더 포함할 수 있다. 인터 예측의 경우, 주변 블록은 현재 픽처 내에 존재하는 공간적 주변 블록(spatial neighboring block)과 참조 픽처에 존재하는 시간적 주변 블록(temporal neighboring block)을 포함할 수 있다. 상기 참조 블록을 포함하는 참조 픽처와 상기 시간적 주변 블록을 포함하는 참조 픽처는 동일할 수도 있고, 서로 다를 수도 있다. 상기 시간적 주변 블록은 동일 위치 참조 블록(collocated reference block), 동일 위치 CU(colCU) 등의 이름으로 불릴 수 있다. 상기 시간적 주변 블록을 포함하는 참조 픽처는 동일 위치 픽처(collocated picture, colPic)라고 불릴 수 있다. 예를 들어, 인터 예측부(180)는 주변 블록들을 기반으로 움직임 정보 후보 리스트를 구성하고, 상기 현재 블록의 움직임 벡터 및/또는 참조 픽처 인덱스를 도출하기 위하여 어떤 후보가 사용되는지를 지시하는 정보를 생성할 수 있다. 다양한 예측 모드를 기반으로 인터 예측이 수행될 수 있으며, 예를 들어 스킵 모드와 머지 모드의 경우에, 인터 예측부(180)는 주변 블록의 움직임 정보를 현재 블록의 움직임 정보로 이용할 수 있다. 스킵 모드의 경우, 머지 모드와 달리 레지듀얼 신호가 전송되지 않을 수 있다. 움직임 정보 예측(motion vector prediction, MVP) 모드의 경우, 주변 블록의 움직임 벡터를 움직임 벡터 예측자(motion vector predictor)로 이용하고, 움직임 벡터 차분(motion vector difference) 및 움직임 벡터 예측자에 대한 지시자(indicator)를 부호화함으로써 현재 블록의 움직임 벡터를 시그널링할 수 있다. 움직임 벡터 차분은 현재 블록의 움직임 벡터와 움직임 벡터 예측자 간의 차이를 의미할 수 있다.
예측부는 후술하는 다양한 예측 방법 및/또는 예측 기법을 기반으로 예측 신호를 생성할 수 있다. 예를 들어, 예측부는 현재 블록의 예측을 위해 인트라 예측 또는 인터 예측을 적용할 수 있을 뿐 아니라, 인트라 예측과 인터 예측을 동시에 적용할 수 있다. 현재 블록의 예측을 위해 인트라 예측과 인터 예측을 동시에 적용하는 예측 방법은 combined inter and intra prediction (CIIP)라고 불릴 수 있다. 또한, 예측부는 현재 블록의 예측을 위해 인트라 블록 카피(intra block copy, IBC)를 수행할 수도 있다. 인트라 블록 카피는 예를 들어 SCC(screen content coding) 등과 같이 게임 등의 컨텐츠 영상/동영상 코딩을 위하여 사용될 수 있다. IBC는 현재 블록으로부터 소정의 거리만큼 떨어진 위치의 현재 픽처 내 기복원된 참조 블록을 이용하여 현재 블록을 예측하는 방법이다. IBC가 적용되는 경우, 현재 픽처 내 참조 블록의 위치는 상기 소정의 거리에 해당하는 벡터(블록 벡터)로서 부호화될 수 있다. IBC는 기본적으로 현재 픽처 내에서 예측을 수행하나, 현재 픽처 내에서 참조 블록을 도출하는 점에서, 인터 예측과 유사하게 수행될 수 있다. 즉 IBC는 본 개시에서 설명되는 인터 예측 기법들 중 적어도 하나를 이용할 수 있다.
예측부를 통해 생성된 예측 신호는 복원 신호를 생성하기 위해 이용되거나 레지듀얼 신호를 생성하기 위해 이용될 수 있다. 감산부(115)는 입력 영상 신호(원본 블록, 원본 샘플 어레이)로부터 예측부에서 출력된 예측 신호(예측된 블록, 예측 샘플 어레이)를 감산하여 레지듀얼 신호(residual signal, 잔여 블록, 잔여 샘플 어레이)를 생성할 수 있다. 생성된 레지듀얼 신호는 변환부(120)로 전송될 수 있다.
변환부(120)는 레지듀얼 신호에 변환 기법을 적용하여 변환 계수들(transform coefficients)을 생성할 수 있다. 예를 들어, 변환 기법은 DCT(Discrete Cosine Transform), DST(Discrete Sine Transform), KLT(Karhunen-Loeve Transform), GBT(Graph-Based Transform), 또는 CNT(Conditionally Non-linear Transform) 중 적어도 하나를 포함할 수 있다. 여기서, GBT는 픽셀 간의 관계 정보를 그래프로 표현한다고 할 때 이 그래프로부터 얻어진 변환을 의미한다. CNT는 이전에 복원된 모든 픽셀(all previously reconstructed pixel)을 이용하여 예측 신호를 생성하고 그에 기반하여 획득되는 변환을 의미한다. 변환 과정은 정사각형의 동일한 크기를 갖는 픽셀 블록에 적용될 수도 있고, 정사각형이 아닌 가변 크기의 블록에도 적용될 수 있다.
양자화부(130)는 변환 계수들을 양자화하여 엔트로피 인코딩부(190)로 전송할 수 있다. 엔트로피 인코딩부(190)는 양자화된 신호(양자화된 변환 계수들에 관한 정보)를 인코딩하여 비트스트림으로 출력할 수 있다. 상기 양자화된 변환 계수들에 관한 정보는 레지듀얼 정보라고 불릴 수 있다. 양자화부(130)는 계수 스캔 순서(scan order)를 기반으로 블록 형태의 양자화된 변환 계수들을 1차원 벡터 형태로 재정렬할 수 있고, 상기 1차원 벡터 형태의 양자화된 변환 계수들을 기반으로 상기 양자화된 변환 계수들에 관한 정보를 생성할 수도 있다.
엔트로피 인코딩부(190)는 예를 들어 지수 골롬(exponential Golomb), CAVLC(context-adaptive variable length coding), CABAC(context-adaptive binary arithmetic coding) 등과 같은 다양한 인코딩 방법을 수행할 수 있다. 엔트로피 인코딩부(190)는 양자화된 변환 계수들 외 비디오/이미지 복원에 필요한 정보들(예를 들어 신택스 요소들(syntax elements)의 값 등)을 함께 또는 별도로 인코딩할 수도 있다. 인코딩된 정보(ex. 인코딩된 비디오/영상 정보)는 비트스트림 형태로 NAL(network abstraction layer) 유닛 단위로 전송 또는 저장될 수 있다. 상기 비디오/영상 정보는 어댑테이션 파라미터 세트(APS), 픽처 파라미터 세트(PPS), 시퀀스 파라미터 세트(SPS) 또는 비디오 파라미터 세트(VPS) 등 다양한 파라미터 세트에 관한 정보를 더 포함할 수 있다. 또한 상기 비디오/영상 정보는 일반 제한 정보(general constraint information)를 더 포함할 수 있다. 본 개시에서 언급된 시그널링 정보, 전송되는 정보 및/또는 신택스 요소들은 상술한 인코딩 절차를 통하여 인코딩되어 상기 비트스트림에 포함될 수 있다.
상기 비트스트림은 네트워크를 통하여 전송될 수 있고, 또는 디지털 저장매체에 저장될 수 있다. 여기서 네트워크는 방송망 및/또는 통신망 등을 포함할 수 있고, 디지털 저장매체는 USB, SD, CD, DVD, 블루레이, HDD, SSD 등 다양한 저장매체를 포함할 수 있다. 엔트로피 인코딩부(190)로부터 출력된 신호를 전송하는 전송부(미도시) 및/또는 저장하는 저장부(미도시)가 영상 부호화 장치(100)의 내/외부 엘리먼트로서 구비될 수 있고, 또는 전송부는 엔트로피 인코딩부(190)의 구성요소로서 구비될 수도 있다.
양자화부(130)로부터 출력된 양자화된 변환 계수들은 레지듀얼 신호를 생성하기 위해 이용될 수 있다. 예를 들어, 양자화된 변환 계수들에 역양자화부(140) 및 역변환부(150)를 통해 역양자화 및 역변환을 적용함으로써 레지듀얼 신호(레지듀얼 블록 or 레지듀얼 샘플들)를 복원할 수 있다.
가산부(155)는 복원된 레지듀얼 신호를 인터 예측부(180) 또는 인트라 예측부(185)로부터 출력된 예측 신호에 더함으로써 복원(reconstructed) 신호(복원 픽처, 복원 블록, 복원 샘플 어레이)를 생성할 수 있다. 스킵 모드가 적용된 경우와 같이 처리 대상 블록에 대한 레지듀얼이 없는 경우, 예측된 블록이 복원 블록으로 사용될 수 있다. 가산부(155)는 복원부 또는 복원 블록 생성부라고 불릴 수 있다. 생성된 복원 신호는 현재 픽처 내 다음 처리 대상 블록의 인트라 예측을 위하여 사용될 수 있고, 후술하는 바와 같이 필터링을 거쳐서 다음 픽처의 인터 예측을 위하여 사용될 수도 있다.
필터링부(160)는 복원 신호에 필터링을 적용하여 주관적/객관적 화질을 향상시킬 수 있다. 예를 들어 필터링부(160)는 복원 픽처에 다양한 필터링 방법을 적용하여 수정된(modified) 복원 픽처를 생성할 수 있고, 상기 수정된 복원 픽처를 메모리(170), 구체적으로 메모리(170)의 DPB에 저장할 수 있다. 상기 다양한 필터링 방법은 예를 들어, 디블록킹 필터링, 샘플 적응적 오프셋(sample adaptive offset), 적응적 루프 필터(adaptive loop filter), 양방향 필터(bilateral filter) 등을 포함할 수 있다. 필터링부(160)는 각 필터링 방법에 대한 설명에서 후술하는 바와 같이 필터링에 관한 다양한 정보를 생성하여 엔트로피 인코딩부(190)로 전달할 수 있다. 필터링에 관한 정보는 엔트로피 인코딩부(190)에서 인코딩되어 비트스트림 형태로 출력될 수 있다.
메모리(170)에 전송된 수정된 복원 픽처는 인터 예측부(180)에서 참조 픽처로 사용될 수 있다. 영상 부호화 장치(100)는 이를 통하여 인터 예측이 적용되는 경우, 영상 부호화 장치(100)와 영상 복호화 장치에서의 예측 미스매치를 피할 수 있고, 부호화 효율도 향상시킬 수 있다.
메모리(170) 내 DPB는 인터 예측부(180)에서의 참조 픽처로 사용하기 위해 수정된 복원 픽처를 저장할 수 있다. 메모리(170)는 현재 픽처 내 움직임 정보가 도출된(또는 인코딩된) 블록의 움직임 정보 및/또는 이미 복원된 픽처 내 블록들의 움직임 정보를 저장할 수 있다. 상기 저장된 움직임 정보는 공간적 주변 블록의 움직임 정보 또는 시간적 주변 블록의 움직임 정보로 활용하기 위하여 인터 예측부(180)에 전달될 수 있다. 메모리(170)는 현재 픽처 내 복원된 블록들의 복원 샘플들을 저장할 수 있고, 인트라 예측부(185)에 전달할 수 있다.
영상 복호화 장치 개요
도 3은 본 개시에 따른 실시예가 적용될 수 있는 영상 복호화 장치를 개략적으로 도시한 도면이다.
도 3에 도시된 바와 같이, 영상 복호화 장치(200)는 엔트로피 디코딩부(210), 역양자화부(220), 역변환부(230), 가산부(235), 필터링부(240), 메모리(250), 인터 예측부(260) 및 인트라 예측부(265)를 포함하여 구성될 수 있다. 인터 예측부(260) 및 인트라 예측부(265)를 합쳐서 "예측부"라고 지칭될 수 있다. 역양자화부(220), 역변환부(230)는 레지듀얼 처리부에 포함될 수 있다.
영상 복호화 장치(200)를 구성하는 복수의 구성부들의 전부 또는 적어도 일부는 실시예에 따라 하나의 하드웨어 컴포넌트(예를 들어 디코더 또는 프로세서)로 구현될 수 있다. 또한 메모리(170)는 DPB를 포함할 수 있고, 디지털 저장 매체에 의하여 구현될 수 있다.
비디오/영상 정보를 포함하는 비트스트림을 수신한 영상 복호화 장치(200)는 도 2의 영상 부호화 장치(100)에서 수행된 프로세스에 대응하는 프로세스를 수행하여 영상을 복원할 수 있다. 예를 들어, 영상 복호화 장치(200)는 영상 부호화 장치에서 적용된 처리 유닛을 이용하여 디코딩을 수행할 수 있다. 따라서 디코딩의 처리 유닛은 예를 들어 코딩 유닛일 수 있다. 코딩 유닛은 코딩 트리 유닛이거나 또는 최대 코딩 유닛을 분할하여 획득될 수 있다. 그리고, 영상 복호화 장치(200)를 통해 디코딩 및 출력된 복원 영상 신호는 재생 장치(미도시)를 통해 재생될 수 있다.
영상 복호화 장치(200)는 도 2의 영상 부호화 장치로부터 출력된 신호를 비트스트림 형태로 수신할 수 있다. 수신된 신호는 엔트로피 디코딩부(210)를 통해 디코딩될 수 있다. 예를 들어, 엔트로피 디코딩부(210)는 상기 비트스트림을 파싱하여 영상 복원(또는 픽처 복원)에 필요한 정보(예를 들어, 비디오/영상 정보)를 도출할 수 있다. 상기 비디오/영상 정보는 어댑테이션 파라미터 세트(APS), 픽처 파라미터 세트(PPS), 시퀀스 파라미터 세트(SPS) 또는 비디오 파라미터 세트(VPS) 등 다양한 파라미터 세트에 관한 정보를 더 포함할 수 있다. 또한 상기 비디오/영상 정보는 일반 제한 정보(general constraint information)를 더 포함할 수 있다. 영상 복호화 장치는 영상을 디코딩하기 위해 상기 파라미터 세트에 관한 정보 및/또는 상기 일반 제한 정보를 추가적으로 이용할 수 있다. 본 개시에서 언급된 시그널링 정보, 수신되는 정보 및/또는 신택스 요소들은 상기 디코딩 절차를 통하여 디코딩됨으로써 상기 비트스트림으로부터 획득될 수 있다. 예를 들어, 엔트로피 디코딩부(210)는 지수 골롬 부호화, CAVLC 또는 CABAC 등의 코딩 방법을 기초로 비트스트림 내 정보를 디코딩하고, 영상 복원에 필요한 신택스 엘리먼트의 값, 레지듀얼에 관한 변환 계수의 양자화된 값들을 출력할 수 있다. 보다 상세하게, CABAC 엔트로피 디코딩 방법은, 비트스트림에서 각 구문 요소에 해당하는 빈을 수신하고, 디코딩 대상 구문 요소 정보와 주변 블록 및 디코딩 대상 블록의 디코딩 정보 혹은 이전 단계에서 디코딩된 심볼/빈의 정보를 이용하여 문맥(context) 모델을 결정하고, 결정된 문맥 모델에 따라 빈(bin)의 발생 확률을 예측하여 빈의 산술 디코딩(arithmetic decoding)을 수행하여 각 구문 요소의 값에 해당하는 심볼을 생성할 수 있다. 이때, CABAC 엔트로피 디코딩 방법은 문맥 모델 결정 후 다음 심볼/빈의 문맥 모델을 위해 디코딩된 심볼/빈의 정보를 이용하여 문맥 모델을 업데이트할 수 있다. 엔트로피 디코딩부(210)에서 디코딩된 정보 중 예측에 관한 정보는 예측부(인터 예측부(260) 및 인트라 예측부(265))로 제공되고, 엔트로피 디코딩부(210)에서 엔트로피 디코딩이 수행된 레지듀얼 값, 즉 양자화된 변환 계수들 및 관련 파라미터 정보는 역양자화부(220)로 입력될 수 있다. 또한, 엔트로피 디코딩부(210)에서 디코딩된 정보 중 필터링에 관한 정보는 필터링부(240)로 제공될 수 있다. 한편, 영상 부호화 장치로부터 출력된 신호를 수신하는 수신부(미도시)가 영상 복호화 장치(200)의 내/외부 엘리먼트로서 추가적으로 구비될 수 있고, 또는 수신부는 엔트로피 디코딩부(210)의 구성요소로서 구비될 수도 있다.
한편, 본 개시에 따른 영상 복호화 장치는 비디오/영상/픽처 복호화 장치라고 불릴 수 있다. 상기 영상 복호화 장치는 정보 디코더(비디오/영상/픽처 정보 디코더) 및/또는 샘플 디코더(비디오/영상/픽처 샘플 디코더)를 포함할 수도 있다. 상기 정보 디코더는 엔트로피 디코딩부(210)를 포함할 수 있고, 상기 샘플 디코더는 역양자화부(220), 역변환부(230), 가산부(235), 필터링부(240), 메모리(250), 인터 예측부(260) 및 인트라 예측부(265) 중 적어도 하나를 포함할 수 있다.
역양자화부(220)에서는 양자화된 변환 계수들을 역양자화하여 변환 계수들을 출력할 수 있다. 역양자화부(220)는 양자화된 변환 계수들을 2차원의 블록 형태로 재정렬할 수 있다. 이 경우 상기 재정렬은 영상 부호화 장치에서 수행된 계수 스캔 순서에 기반하여 수행될 수 있다. 역양자화부(220)는 양자화 파라미터(예를 들어 양자화 스텝 사이즈 정보)를 이용하여 양자화된 변환 계수들에 대한 역양자화를 수행하고, 변환 계수들(transform coefficient)을 획득할 수 있다.
역변환부(230)에서는 변환 계수들를 역변환하여 레지듀얼 신호(레지듀얼 블록, 레지듀얼 샘플 어레이)를 획득할 수 있다.
예측부는 현재 블록에 대한 예측을 수행하고, 상기 현재 블록에 대한 예측 샘플들을 포함하는 예측된 블록(predicted block)을 생성할 수 있다. 예측부는 엔트로피 디코딩부(210)로부터 출력된 상기 예측에 관한 정보를 기반으로 상기 현재 블록에 인트라 예측이 적용되는지 또는 인터 예측이 적용되는지 결정할 수 있고, 구체적인 인트라/인터 예측 모드(예측 기법)를 결정할 수 있다.
예측부가 후술하는 다양한 예측 방법(기법)을 기반으로 예측 신호를 생성할 수 있음은 영상 부호화 장치(100)의 예측부에 대한 설명에서 언급된 바와 동일하다.
인트라 예측부(265)는 현재 픽처 내의 샘플들을 참조하여 현재 블록을 예측할 수 있다. 인트라 예측부(185)에 대한 설명은 인트라 예측부(265)에 대해서도 동일하게 적용될 수 있다.
인터 예측부(260)는 참조 픽처 상에서 움직임 벡터에 의해 특정되는 참조 블록(참조 샘플 어레이)을 기반으로, 현재 블록에 대한 예측된 블록을 유도할 수 있다. 이때, 인터 예측 모드에서 전송되는 움직임 정보의 양을 줄이기 위해 주변 블록과 현재 블록 간의 움직임 정보의 상관성에 기반하여 움직임 정보를 블록, 서브블록 또는 샘플 단위로 예측할 수 있다. 상기 움직임 정보는 움직임 벡터 및 참조 픽처 인덱스를 포함할 수 있다. 상기 움직임 정보는 인터 예측 방향(L0 예측, L1 예측, Bi 예측 등) 정보를 더 포함할 수 있다. 인터 예측의 경우에, 주변 블록은 현재 픽처 내에 존재하는 공간적 주변 블록(spatial neighboring block)과 참조 픽처에 존재하는 시간적 주변 블록(temporal neighboring block)을 포함할 수 있다. 예를 들어, 인터 예측부(260)는 주변 블록들을 기반으로 움직임 정보 후보 리스트를 구성하고, 수신한 후보 선택 정보를 기반으로 상기 현재 블록의 움직임 벡터 및/또는 참조 픽처 인덱스를 도출할 수 있다. 다양한 예측 모드(기법)를 기반으로 인터 예측이 수행될 수 있으며, 상기 예측에 관한 정보는 상기 현재 블록에 대한 인터 예측의 모드(기법)를 지시하는 정보를 포함할 수 있다.
가산부(235)는 획득된 레지듀얼 신호를 예측부(인터 예측부(260) 및/또는 인트라 예측부(265) 포함)로부터 출력된 예측 신호(예측된 블록, 예측 샘플 어레이)에 더함으로써 복원 신호(복원 픽처, 복원 블록, 복원 샘플 어레이)를 생성할 수 있다. 스킵 모드가 적용된 경우와 같이 처리 대상 블록에 대한 레지듀얼이 없는 경우, 예측된 블록이 복원 블록으로 사용될 수 있다. 가산부(155)에 대한 설명은 가산부(235)에 대해서도 동일하게 적용될 수 있다. 가산부(235)는 복원부 또는 복원 블록 생성부라고 불릴 수 있다. 생성된 복원 신호는 현재 픽처 내 다음 처리 대상 블록의 인트라 예측을 위하여 사용될 수 있고, 후술하는 바와 같이 필터링을 거쳐서 다음 픽처의 인터 예측을 위하여 사용될 수도 있다.
필터링부(240)는 복원 신호에 필터링을 적용하여 주관적/객관적 화질을 향상시킬 수 있다. 예를 들어 필터링부(240)는 복원 픽처에 다양한 필터링 방법을 적용하여 수정된(modified) 복원 픽처를 생성할 수 있고, 상기 수정된 복원 픽처를 메모리(250), 구체적으로 메모리(250)의 DPB에 저장할 수 있다. 상기 다양한 필터링 방법은 예를 들어, 디블록킹 필터링, 샘플 적응적 오프셋(sample adaptive offset), 적응적 루프 필터(adaptive loop filter), 양방향 필터(bilateral filter) 등을 포함할 수 있다.
메모리(250)의 DPB에 저장된 (수정된) 복원 픽처는 인터 예측부(260)에서 참조 픽쳐로 사용될 수 있다. 메모리(250)는 현재 픽처 내 움직임 정보가 도출된(또는 디코딩된) 블록의 움직임 정보 및/또는 이미 복원된 픽처 내 블록들의 움직임 정보를 저장할 수 있다. 상기 저장된 움직임 정보는 공간적 주변 블록의 움직임 정보 또는 시간적 주변 블록의 움직임 정보로 활용하기 위하여 인터 예측부(260)에 전달할 수 있다. 메모리(250)는 현재 픽처 내 복원된 블록들의 복원 샘플들을 저장할 수 있고, 인트라 예측부(265)에 전달할 수 있다.
본 명세서에서, 영상 부호화 장치(100)의 필터링부(160), 인터 예측부(180) 및 인트라 예측부(185)에서 설명된 실시예들은 각각 영상 복호화 장치(200)의 필터링부(240), 인터 예측부(260) 및 인트라 예측부(265)에도 동일 또는 대응되도록 적용될 수 있다.
영상 분할 개요
본 개시에 따른 비디오/영상 코딩 방법은 다음과 같은 영상의 분할 구조에 기반하여 수행될 수 있다. 구체적으로 후술하는 예측, 레지듀얼 처리((역)변환, (역)양자화 등), 신택스 요소 코딩, 필터링 등의 절차는 상기 영상의 분할 구조에 기반하여 도출된 CTU, CU(및/또는 TU, PU)에 기반하여 수행될 수 있다. 영상은 블록 단위로 분할될 수 있으며, 블록 분할 절차는 상술한 부호화 장치의 영상 분할부(110)에서 수행될 수 있다. 분할 관련 정보는 엔트로피 인코딩부(190)에서 부호화되어 비트스트림 형태로 복호화 장치로 전달될 수 있다. 복호화 장치의 엔트로피 디코딩부(210)는 상기 비트스트림으로부터 획득한 상기 분할 관련 정보를 기반으로 현재 픽처의 블록 분할 구조를 도출하고, 이를 기반으로 영상 디코딩을 위한 일련의 절차(ex. 예측, 레지듀얼 처리, 블록/픽처 복원, 인루프 필터링 등)를 수행할 수 있다.
픽처들은 코딩 트리 유닛들(coding tree units, CTUs)의 시퀀스로 분할될 수 있다. 도 4는 픽처가 CTU들로 분할되는 예를 나타낸다. CTU는 코딩 트리 블록(CTB)에 대응될 수 있다. 혹은 CTU는 루마 샘플들의 코딩 트리 블록과, 대응하는 크로마 샘플들의 두 개의 코딩 트리 블록들을 포함할 수 있다. 예를 들어, 세가지 샘플 어레이를 포함하는 픽처에 대하여, CTU는 루마 샘플들의 NxN 블록과 크로마 샘플들의 두 개의 대응 블록들을 포함할 수 있다.
CTU의 분할 개요
전술한 바와 같이, 코딩 유닛은 코딩 트리 유닛(CTU) 또는 최대 코딩 유닛(LCU)을 QT/BT/TT(Quad-tree/binary-tree/ternary-tree) 구조에 따라 재귀적으로 분할함으로써 획득될 수 있다. 예를 들어, CTU는 먼저 쿼드트리 구조로 분할될 수 있다. 이후 쿼드트리 구조의 리프 노드들은 멀티타입 트리 구조에 의하여 더 분할될 수 있다.
쿼드트리에 따른 분할은 현재 CU(또는 CTU)를 4등분하는 분할을 의미한다. 쿼드트리에 따른 분할에 의해, 현재 CU는 동일한 너비와 동일한 높이를 갖는 4개의 CU로 분할될 수 있다. 현재 CU가 더 이상 쿼드트리 구조로 분할되지 않는 경우, 현재 CU는 쿼드트리 구조의 리프 노드에 해당한다. 쿼드트리 구조의 리프 노드에 해당하는 CU는 더 이상 분할되지 않고 전술한 최종 코딩 유닛으로 사용될 수 있다. 또는, 쿼드트리 구조의 리프 노드에 해당하는 CU는 멀티타입 트리 구조에 의하여 더 분할될 수 있다.
도 5는 멀티타입 트리 구조에 따른 블록의 분할 타입을 도시한 도면이다. 멀티타입 트리 구조에 따른 분할은 바이너리 트리 구조에 따른 2개의 분할과 터너리 트리 구조에 따른 2개의 분할을 포함할 수 있다.
바이너리 트리 구조에 따른 2개의 분할은 수직 바이너리 분할(vertical binary splitting, SPLIT_BT_VER)과 수평 바이너리 분할(hotizontal binary splitting, SPLIT_BT_HOR)을 포함할 수 있다. 수직 바이너리 분할(SPLIT_BT_VER)은 현재 CU를 수직 방향으로 2등분하는 분할을 의미한다. 도 5에 도시된 바와 같이, 수직 바이너리 분할에 의해 현재 CU의 높이와 동일한 높이를 갖고 현재 CU의 너비의 절반의 너비를 갖는 2개의 CU가 생성될 수 있다. 수평 바이너리 분할(SPLIT_BT_HOR)은 현재 CU를 수평 방향으로 2등분하는 분할을 의미한다. 도 5에 도시된 바와 같이, 수평 바이너리 분할에 의해 현재 CU의 높이의 절반의 높이를 갖고 현재 CU의 너비와 동일한 너비를 갖는 2개의 CU가 생성될 수 있다.
터너리 트리 구조에 따른 2개의 분할은 수직 터너리 분할(vertical ternary splitting, SPLIT_TT_VER)과 수평 터너리 분할(hotizontal ternary splitting, SPLIT_TT_HOR)을 포함할 수 있다. 수직 터너리 분할(SPLIT_TT_VER)은 현재 CU를 수직 방향으로 1:2:1의 비율로 분할한다. 도 5에 도시된 바와 같이, 수직 터너리 분할에 의해 현재 CU의 높이와 동일한 높이를 갖고 현재 CU의 너비의 1/4의 너비를 갖는 2개의 CU와 현재 CU의 높이와 동일한 높이를 갖고 현재 CU의 너비의 절반의 너비를 갖는 CU가 생성될 수 있다. 수평 터너리 분할(SPLIT_TT_HOR)은 현재 CU를 수평 방향으로 1:2:1의 비율로 분할한다. 도 4에 도시된 바와 같이, 수평 터너리 분할에 의해 현재 CU의 높이의 1/4의 높이를 갖고 현재 CU의 너비와 동일한 너비를 갖는 2개의 CU와 현재 CU의 높이의 절반의 높이를 갖고 현재 CU의 너비와 동일한 너비를 갖는 1개의 CU가 생성될 수 있다.
도 6은 본 개시에 따른 멀티타입 트리를 수반하는 쿼드트리(quadtree with nested multi-type tree) 구조에서의 블록 분할 정보의 시그널링 메커니즘을 예시한 도면이다.
여기서, CTU는 쿼드트리의 루트(root) 노드로 취급되며, CTU는 쿼드트리 구조로 처음으로 분할된다. 현재 CU(CTU 또는 쿼드트리의 노드(QT_node))에 대해 쿼드트리 분할을 수행할 지 여부를 지시하는 정보(예를 들어, qt_split_flag)가 시그널링될 수 있다. 예를 들어, qt_split_flag가 제1 값(예를 들어, "1")이면, 현재 CU는 쿼드트리 분할될 수 있다. 또한, qt_split_flag가 제2 값(예를 들어, "0")이면, 현재 CU는 쿼드트리 분할되지 않고, 쿼드트리의 리프 노드(QT_leaf_node)가 된다. 각 쿼드트리의 리프 노드는 이후 멀티타입 트리 구조로 더 분할될 수 있다. 즉, 쿼드트리의 리프 노드는 멀티타입 트리의 노드(MTT_node)가 될 수 있다. 멀티타입 트리 구조에서, 현재 노드가 추가적으로 분할되는지를 지시하기 위하여 제1 플래그(a first flag, ex. mtt_split_cu_flag)가 시그널링될 수 있다. 만약 해당 노드가 추가적으로 분할되는 경우(예를 들어, 제1 플래그가 1인 경우), 분할 방향(splitting direction)을 지시하기 위하여 제2 플래그(a second flag, e.g. mtt_split_cu_verticla_flag)가 시그널링될 수 있다. 예를 들어, 제2 플래그가 1인 경우, 분할 방향은 수직 방향이고, 제2 플래그가 0인 경우, 분할 방향은 수평 방향일 수 있다. 그 후 분할 타입이 바이너리 분할 타입인지 터너리 분할 타입인지 여부를 지시하기 위하여 제3 플래그(a third flag, ex. mtt_split_cu_binary_flag)가 시그널링될 수 있다. 예를 들어, 제3 플래그가 1인 경우, 분할 타입은 바이너리 분할 타입이고, 제3 플래그가 0인 경우, 분할 타입은 터너리 분할 타입일 수 있다. 바이너리 분할 또는 터너리 분할에 의해 획득된 멀티타입 트리의 노드는 멀티타입 트리 구조로 더 파티셔닝될 수 있다. 그러나, 멀티타입 트리의 노드는 쿼드트리 구조로 파티셔닝될 수는 없다. 상기 제1 플래그가 0인 경우, 멀티타입 트리의 해당 노드는 더 이상 분할되지 않고, 멀티타입 트리의 리프 노드(MTT_leaf_node)가 된다. 멀티타입 트리의 리프 노드에 해당하는 CU는 전술한 최종 코딩 유닛으로 사용될 수 있다.
전술한 mtt_split_cu_vertical_flag 및 mtt_split_cu_binary_flag를 기반으로, CU의 멀티타입 트리 분할 모드(multi-type tree splitting mode, MttSplitMode)가 표 1과 같이 도출될 수 있다. 이하의 설명에서, 멀티트리 분할 모드는 멀티트리 분할 타입 또는 분할 타입으로 줄여서 지칭될 수 있다.
Figure PCTKR2020012898-appb-T000001
도 7은 CTU가 쿼드트리의 적용 이후 멀티타입트리가 적용됨으로써 다중 CU들로 분할되는 예를 도시한다. 도 7에서 굵은 블록 엣지(bold block edge)(710)은 쿼드트리 분할을 나타내고, 나머지 엣지들(720)은 멀티타입 트리 분할을 나타낸다. CU는 코딩 블록(CB)에 대응될 수 있다. 일 실시예에서, CU는 루마 샘플들의 코딩 블록과, 루마 샘플들에 대응하는 크로마 샘플들의 두 개의 코딩 블록들을 포함할 수 있다.
크로마 성분(샘플) CB 또는 TB 사이즈는 픽처/영상의 컬러 포맷(크로마 포맷, ex. 4:4:4, 4:2:2, 4:2:0 등)에 따른 성분비에 따라 루마 성분(샘플) CB 또는 TB 사이즈를 기반으로 도출될 수 있다. 컬러 포맷이 4:4:4인 경우, 크로마 성분 CB/TB 사이즈는 루마 성분 CB/TB 사이즈와 동일하게 설정될 수 있다. 컬러 포맷이 4:2:2인 경우, 크로마 성분 CB/TB의 너비는 루마 성분 CB/TB 너비의 절반으로, 크로마 성분 CB/TB의 높이는 루마 성분 CB/TB 높이로 설정될 수 있다. 컬러 포맷이 4:2:0인 경우, 크로마 성분 CB/TB의 너비는 루마 성분 CB/TB 너비의 절반으로, 크로마 성분 CB/TB의 높이는 루마 성분 CB/TB 높이의 절반으로 설정될 수 있다.
일 실시예에서, 루마 샘플 단위를 기준으로 CTU의 크기가 128일때, CU의 사이즈는 CTU와 같은 크기인 128 x 128에서 4 x 4 까지의 크기를 가질 수 있다. 일 실시예에서, 4:2:0 컬러 포맷(or 크로마 포맷)인 경우, 크로마 CB 사이즈는 64x64에서 2x2 까지의 크기를 가질 수 있다
한편, 일 실시예에서, CU 사이즈와 TU 사이즈가 같을 수 있다. 또는, CU 영역 내에 복수의 TU가 존재할 수도 있다. TU 사이즈라 함은 일반적으로 루마 성분(샘플) TB(Transform Block) 사이즈를 나타낼 수 있다.
상기 TU 사이즈는 미리 설정된 값인 최대 허용 TB 사이즈(maxTbSize)를 기반으로 도출될 수 있다. 예를 들어, 상기 CU 사이즈가 상기 maxTbSize보다 큰 경우, 상기 CU로부터 상기 maxTbSize를 가진 복수의 TU(TB)들이 도출되고, 상기 TU(TB) 단위로 변환/역변환이 수행될 수 있다. 예를 들어, 최대 허용 루마 TB 사이즈는 64x64이고, 최대 허용 크로마 TB 사이즈는 32x32일 수 있다. 만약 상기 트리 구조에 따라 분할된 CB의 너비 또는 높이가 최대 변환 너비 또는 높이보다 큰 경우, 해당 CB는 자동적으로(또는 묵시적으로) 수평 및 수직 방향의 TB 사이즈 제한을 만족할 때까지 분할될 수 있다.
또한, 예를 들어 인트라 예측이 적용되는 경우, 인트라 예측 모드/타입은 상기 CU(or CB) 단위로 도출되고, 주변 참조 샘플 도출 및 예측 샘플 생성 절차는 TU(or TB) 단위로 수행될 수 있다. 이 경우 하나의 CU(or CB) 영역 내에 하나 또는 복수의 TU(or TB)들이 존재할 수 있으며, 이 경우 상기 복수의 TU(or TB)들은 동일한 인트라 예측 모드/타입을 공유할 수 있다.
한편, 멀티타입 트리를 수반한 쿼드트리 코딩 트리 스킴을 위하여, 다음 파라미터들이 SPS 신택스 요소로 부호화 장치에서 복호화 장치로 시그널링 될 수 있다. 예를 들어, 쿼드트리 트리의 루트 노드의 크기를 나타내는 파라미터인 CTU size, 쿼드트리 리프 노드의 최소 가용 크기를 나타내는 파라미터인 MinQTSize, 바이너리 트리 루트 노드의 최대 가용 크기를 나타내는 파라미터인 MaxBTSize, 터너리 트리 루트 노드의 최대 가용 크기를 나타내는 파라미터인 MaxTTSize, 쿼드트리 리프 노드로부터 분할되는 멀티타입 트리의 최대 가용 계층 깊이(maximum allowed hierarchy depth)를 나타내는 파라미터인 MaxMttDepth, 바이너리 트리의 최소 가용 리프 노드 사이즈를 나타내는 파라미터인 MinBtSize, 터너리 트리의 최소 가용 리프 노드 사이즈를 나타내는 파라미터인 MinTtSize 중 적어도 하나가 시그널링될 수 있다.
4:2:0 크로마 포맷을 이용하는 일 실시예에서, CTU 사이즈는 128x128 루마 블록 및 루마 블록에 대응하는 두 개의 64x64 크로마 블록으로 설정될 수 있다. 이 경우, MinQTSize는 16x16으로 설정되고, MaxBtSize는 128x128로 설정되고, MaxTtSzie는 64x64로 설정되고, MinBtSize 및 MinTtSize는 4x4로, 그리고 MaxMttDepth는 4로 설정될 수 있다. 쿼트트리 파티셔닝은 CTU에 적용되어 쿼드트리 리프 노드들을 생성할 수 있다. 쿼드트리 리프 노드는 리프 QT 노드라고 불릴 수 있다. 쿼드트리 리프 노드들은 16x16 사이즈 (e.g. the MinQTSize)로부터 128x128 사이즈(e.g. the CTU size)를 가질 수 있다. 만약 리프 QT 노드가 128x128인 경우, 추가적으로 바이너리 트리/터너리 트리로 분할되지 않을 수 있다. 이는 이 경우 분할되더라도 MaxBtsize 및 MaxTtszie (i.e. 64x64)를 초과하기 때문이다. 이 외의 경우, 리프 QT 노드는 멀티타입 트리로 추가적으로 분할될 수 있다. 그러므로, 리프 QT 노드는 멀티타입 트리에 대한 루트 노드(root node)이고, 리프 QT 노드는 멀티타입 트리 뎁스(mttDepth) 0 값을 가질 수 있다. 만약, 멀티타입 트리 뎁스가 MaxMttdepth (ex. 4)에 도달한 경우, 더 이상 추가 분할은 고려되지 않을 수 있다. 만약, 멀티타입 트리 노드의 너비가 MinBtSize와 같고, 2xMinTtSize보다 작거나 같을 때, 더 이상 추가적인 수평 분할은 고려되지 않을 수 있다. 만약, 멀티타입 트리 노드의 높이가 MinBtSize와 같고, 2xMinTtSize보다 작거나 같을 때, 더 이상 추가적인 수직 분할은 고려되지 않을 수 있다. 이와 같이 분할이 고려되지 않는 경우, 부호화 장치는 분할 정보의 시그널링을 생략할 수 있다. 이러한 경우 복호화 장치는 소정의 값으로 분할 정보를 유도할 수 있다.
한편, 하나의 CTU는 루마 샘플들의 코딩 블록(이하, "루마 블록"이라 함)과 이에 대응하는 크로마 샘플들의 두 개의 코딩 블록(이하, "크로마 블록"이라 함)들을 포함할 수 있다. 전술한 코딩 트리 스킴은 현재 CU의 루마 블록 및 크로마 블록에 대해 동일하게 적용될 수도 있고, 개별적(separate)으로 적용될 수도 있다. 구체적으로, 하나의 CTU 내 루마 블록 및 크로마 블록이 동일 블록 트리 구조로 분할될 수 있으며, 이 경우의 트리 구조는 싱글 트리(SINGLE_TREE)라고 나타낼 수 있다. 또는, 하나의 CTU 내 루마 블록 및 크로마 블록은 개별적 블록 트리 구조로 분할될 수 있으며, 이 경우의 트리 구조는 듀얼 트리(DUAL_TREE)라고 나타낼 수 있다. 즉, CTU가 듀얼 트리로 분할되는 경우, 루마 블록에 대한 블록 트리 구조와 크로마 블록에 대한 블록 트리 구조가 별개로 존재할 수 있다. 이 때, 루마 블록에 대한 블록 트리 구조는 듀얼 트리 루마(DUAL_TREE_LUMA)라고 불릴 수 있고, 크로마 블록에 대한 블록 트리 구조는 듀얼 트리 크로마(DUAL_TREE_CHROMA)라고 불릴 수 있다. P 및 B 슬라이스/타일 그룹들에 대하여, 하나의 CTU 내 루마 블록 및 크로마 블록들은 동일한 코딩 트리 구조를 갖도록 제한될 수 있다. 그러나, I 슬라이스/타일 그룹들에 대하여, 루마 블록 및 크로마 블록들은 서로 개별적 블록 트리 구조를 가질 수 있다. 만약 개별적 블록 트리 구조가 적용되는 경우, 루마 CTB(Coding Tree Block)는 특정 코딩 트리 구조를 기반으로 CU들로 분할되고, 크로마 CTB는 다른 코딩 트리 구조를 기반으로 크로마 CU들로 분할될 수 있다. 즉, 개별적 블록 트리 구조가 적용되는 I 슬라이스/타일 그룹 내 CU는 루마 성분의 코딩 블록 또는 두 크로마 성분들의 코딩 블록들로 구성되고, P 또는 B 슬라이스/타일 그룹의 CU는 세가지 컬러 성분(루마 성분 및 두 개의 크로마 성분)의 블록들로 구성될 수 있음을 의미할 수 있다.
상기에서 멀티타입 트리를 수반한 쿼드트리 코딩 트리 구조에 대하여 설명하였으나, CU가 분할되는 구조는 이에 한정되지 않는다. 예를 들어, BT 구조 및 TT 구조는 다수 분할 트리 (Multiple Partitioning Tree, MPT) 구조에 포함되는 개념으로 해석될 수 있고, CU는 QT 구조 및 MPT 구조를 통해 분할된다고 해석할 수 있다. QT 구조 및 MPT 구조를 통해 CU가 분할되는 일 예에서, QT 구조의 리프 노드가 몇 개의 블록으로 분할되는지에 관한 정보를 포함하는 신택스 요소(예를 들어, MPT_split_type) 및 QT 구조의 리프 노드가 수직과 수평 중 어느 방향으로 분할되는지에 관한 정보를 포함하는 신택스 요소(예를 들어, MPT_split_mode)가 시그널링됨으로써 분할 구조가 결정될 수 있다.
또 다른 예에서, CU는 QT 구조, BT 구조 또는 TT 구조와 다른 방법으로 분할될 수 있다. 즉, QT 구조에 따라 하위 뎁스의 CU가 상위 뎁스의 CU의 1/4 크기로 분할되거나, BT 구조에 따라 하위 뎁스의 CU가 상위 뎁스의 CU의 1/2 크기로 분할되거나, TT 구조에 따라 하위 뎁스의 CU가 상위 뎁스의 CU의 1/4 또는 1/2 크기로 분할되는 것과 달리, 하위 뎁스의 CU는 경우에 따라 상위 뎁스의 CU의 1/5, 1/3, 3/8, 3/5, 2/3 또는 5/8 크기로 분할될 수 있으며, CU가 분할되는 방법은 이에 한정되지 않는다.
이와 같이, 상기 멀티타입 트리를 수반한 쿼드트리 코딩 블록 구조는 매우 유연한 블록 분할 구조를 제공할 수 있다. 한편, 멀티타입 트리에 지원되는 분할 타입들 때문에, 경우에 따라서 다른 분할 패턴들이 잠재적으로 동일한 코딩 블록 구조 결과를 도출할 수 있다. 부호화 장치와 복호화 장치는 이러한 리던던트(redundant)한 분할 패턴들의 발생을 제한함으로써 분할 정보의 데이터량을 줄일 수 있다.
예를 들어, 도 8은 바이너리 트리 분할 및 터너리 트리 분할에서 발생할 수 있는 리던던트 분할 패턴들을 예시적으로 나타낸다. 도 8에 도시된 바와 같이, 2단계 레벨의 한 방향에 대한 연속적인 바이너리 분할 810과 820은, 터너리 분할 이후 센터 파티션에 대한 바이너리 분할과 동일한 코딩 블록 구조를 갖는다. 이러한 경우, 터너리 트리 분할의 센터 블록(830, 840)에 대한 바이너리 트리 분할은 금지될 수 있다. 이러한 금지는 모든 픽처들의 CU들에 대하여 적용될 수 있다. 이러한 특정 분할이 금지되는 경우, 대응하는 신택스 요소들의 시그널링은 이러한 금지되는 경우를 반영하여 수정될 수 있고, 이를 통하여 분할을 위하여 시그널링되는 비트수를 줄일 수 있다. 예를 들어, 도 8에 도시된 예와 같이, CU의 센터 블록에 대한 바이너리 트리 분할이 금지되는 경우, 분할이 바이너리 분할인지 터너리 분할인지 여부를 가리키는 mtt_split_cu_binary_flag 신택스 요소는 시그널링되지 않고, 그 값은 복호화 장치에 의하여 0으로 유도될 수 있다.
크로마 포맷 개요
소스 또는 코딩된 픽처/영상은 루마 성분(Y) 블록과 두 개의 크로마 성분(cb, cr) 블록을 포함할 수 있다. 즉, 픽처/영상의 하나의 픽셀은 루마 샘플 및 두 개의 크로마 샘플들(cb, cr)을 포함할 수 있다. 크로마 포맷은 루마 샘플과 크로마 샘플(cb, cr)의 구성 포맷을 나타낼 수 있으며, 컬러 포맷이라고 불릴 수도 있다. 크로마 포맷은 미리 정해질 수도 있고, 또는 적응적으로 시그널링될 수도 있다. 예를 들어, 상기 크로마 포맷은 표 2와 같이 chroma_format_idc 및 separate_colour_plane_flag 중 적어도 하나를 기반으로 시그널링될 수 있다. chroma_format_idc 및 separate_colour_plane_flag 중 적어도 하나는 DPS, VPS, SPS 또는 PPS등 상위 레벨 신택스를 통해 시그널링될 수 있다. 예를 들어, chroma_format_idc 및 separate_colour_plane_flag는 SPS 신택스에 포함될 수 있다.
Figure PCTKR2020012898-appb-T000002
표 2를 참조하면, chroma_format_idc는 루마 샘플과 이에 대응하는 크로마 샘플의 포맷을 나타낼 수 있고, separate_colour_plane_flag는 4:4:4 크로마 포맷에서 3개의 색 성분(Y, Cb, Cr)이 별도로 부호화되는지 여부를 나타낼 수 있다.
chroma_format_idc가 0인 경우, 크로마 포맷은 모노크롬(monochrome) 포맷에 해당하며, 현재 블록은 크로마 성분 블록을 포함하지 않고 루마 성분 블록만을 포함할 수 있다.
또는, chroma_format_idc가 1인 경우, 크로마 포맷은 4:2:0 크로마 포맷에 해당하며, 크로마 성분 블록의 너비 및 높이는 각각 루마 성분 블록의 너비 및 높이의 절반에 해당할 수 있다.
또는, chroma_format_idc가 2인 경우, 크로마 포맷은 4:2:2 크로마 포맷에 해당하며, 크로마 성분 블록의 너비는 루마 성분 블록의 너비의 절반에 해당하고, 크로마 성분 블록의 높이는 루마 성분 블록의 높이와 동일할 수 있다.
또는, chroma_format_idc가 3인 경우, 크로마 포맷은 4:4:4 크로마 포맷에 해당하며, 크로마 성분 블록의 너비 및 높이는 각각 루마 성분 블록의 너비 및 높이와 동일할 수 있다.
SubWidthC와 SubHeightC는 루마 샘플과 크로마 샘플 사이의 비율을 나타낼 수 있다. 예를 들어, 루마 성분 블록의 너비 및 높이가 각각 CbWidth 및 CbHeight인 경우, 크로마 성분 블록의 너비 및 높이는 각각 (CbWidth/SubwidthC) 및 (CbHeight/SubHeightC)로 유도될 수 있다.
크로마 블록의 최소 크기 제한
영상 부호화/복호화 과정에서, 크로마 블록의 크기는 스루풋(throughput)에 큰 영향을 미칠 수 있다. 예를 들어, 소정의 크기 이하의 크로마 블록이 과도하게 생성되는 경우, 영상 부호화/복호화 과정의 스루풋은 현저하게 저하될 수 있다. 이러한 문제를 해결하기 위하여, CU 분할은 소정의 크기 이하의 크로마 블록이 생성되지 않도록 제한될 수 있다.
영상 부호화/복호화 장치는 크로마 블록의 최소 크기를 설정할 수 있다. 일 예에서, 크로마 블록은 최소 16개 이상의 크로마 샘플들을 포함하도록 제한될 수 있다. 예를 들어, 2x2, 2x4 또는 4x2 크로마 블록이 생성되지 않도록, 루마 블록 또는 크로마 블록의 분할은 제한될 수 있다. 그 결과, 듀얼 트리 구조에서, 2x8, 4x4 또는 8x2 크로마 블록에 대한 쿼드트리 분할 및/또는 바이너리 분할이 제한될 수 있다. 또한, 듀얼 트리 구조에서, 2x8, 2x16, 4x4, 4x8, 8x2 또는 8x4 크로마 블록에 대한 터너리 분할이 제한될 수 있다.
구체적으로, 아래의 조건 1-1 내지 조건 1-4 중 어느 하나가 충족되는 경우, 현재 블록에 대한 쿼드트리 분할은 제한될 수 있다.
(조건 1-1) 현재 블록의 분할 구조가 싱글 트리 또는 듀얼 트리 루마이고, 루마 블록의 크기가 쿼드트리 분할이 가능한 최소 크기 이하인 경우
(조건 1-2) 현재 블록의 분할 구조가 듀얼 트리 크로마이고, 크로마 블록의 크기가 쿼드트리 분할이 가능한 최소 크기 이하인 경우
(조건 1-3) 현재 블록의 분할 구조가 듀얼 트리 크로마이고, 크로마 블록의 크기가 4 이하인 경우
(조건 1-4) 현재 블록의 분할 구조가 듀얼 트리 크로마이고, 현재 블록의 예측 모드 타입이 MODE_TYPE_INTRA인 경우
또는, 아래의 조건 2-1 및 조건 2-2 중 어느 하나가 충족되는 경우, 현재 블록에 대한 바이너리 분할이 제한될 수 있다.
(조건 2-1) 현재 블록의 분할 구조가 듀얼 트리 크로마이고, 크로마 블록의 너비와 높이의 곱이 16 이하인 경우
(조건 2-2) 현재 블록의 분할 구조가 듀얼 트리 크로마이고, 현재 블록의 예측 모드 타입이 MODE_TYPE_INTRA인 경우
또는, 아래의 조건 3-1 및 조건 3-2 중 어느 하나가 충족되는 경우, 현재 블록에 대한 터너리 분할이 제한될 수 있다.
(조건 3-1) 현재 블록의 분할 구조가 듀얼 트리 크로마이고, 크로마 블록의 너비와 높이의 곱이 32 이하인 경우
(조건 3-2) 현재 블록의 분할 구조가 듀얼 트리 크로마이고, 현재 블록의 예측 모드 타입이 MODE_TYPE_INTRA인 경우
싱글 트리 구조에서 듀얼 트리 구조로의 전환
싱글 트리 구조에서, 루마 블록 및 상기 루마 블록에 대응하는 크로마 블록은 동일한 방식으로 분할될 수 있다. 예를 들어, 루마 블록이 수직 터너리 분할되는 경우, 상기 루마 블록에 대응하는 크로마 블록 역시 수직 터너리 분할될 수 있다. 이 경우, CU의 분할 여부는 상기 CU에 포함되는 루마 블록의 크기를 기준으로 결정될 수 있다. 그리고, 상기 루마 블록에 대응하는 크로마 블록의 크기는, 표 2를 참조하여 전술한 바와 같이, 상기 루마 블록의 크기 및 컬러 포맷(color format)에 기반하여 결정될 수 있다.
도 9는 4:2:0 컬러 포맷에서 루마 블록 및 크로마 블록의 일 예를 나타내는 도면이다. 도 10a 내지 도 10c는 현재 CTU를 로컬 듀얼 트리로 분할하기 위한 신택스의 일 예를 나타내는 도면들이다.
먼저 도 9를 참조하면, 4:2:0 컬러 포맷에서 루마 블록의 크기가 16x8인 경우, 상기 루마 블록에 대응하는 크로마 블록의 크기는 8x4로 결정될 수 있다. 이 경우, 8x4 크로마 블록을 수직 터너리 분할하면, 2x4 크로마 블록이 생성될 수 있다. 크로마 블록이 최소 16개 이상의 크로마 샘플들을 포함하도록 제한된 경우, 2x4 크로마 블록은 상기 최소 크기 제한을 충족시킬 수 없다. 따라서, 4:2:0 컬러 포맷에서 8x4 크로마 블록의 추가적인 분할은 금지될 수 있다.
크로마 블록의 추가적인 분할이 금지된 경우라도, 루마 블록의 추가적인 분할은 허용될 수 있다. 이에 따라, 루마 블록에 대해서만 추가적인 분할이 수행되는 경우, 현재 CTU 내에서 싱글 트리 구조로 분할되던 루마 블록 및 크로마 블록은 듀얼 트리 구조로 전환될 수 있다. 이 경우, 듀얼 트리 구조로 분할된 루마 블록 및 크로마 블록의 분할 구조를 로컬 듀얼 트리 구조라고 지칭할 수 있다.
도 10a 내지 도 10c는 싱글 트리 구조를 듀얼 트리 구조로 전환하기 위한 신택스의 일 예를 나타내는 도면들이다. 도 10a 내지 도 10c는 하나의 coding_tree 신택스를 편의상 세 개의 도면으로 분할하여 나타낸다.
도 10a 내지 도 10c를 참조하면, coding_tree 신택스 내의 modeTypeCondition 파라미터에 기반하여 현재 CTU로부터 생성되는 CU들 각각의 예측 모드 타입이 결정될 수 있다. 여기서, modeTypeCondition은 상기 CU들 각각의 예측 모드 특성을 나타낼 수 있다. 또한, modeType은 상기 CU들 각각의 예측 모드 타입을 나타낼 수 있다. 일 예에서, modeType은 인트라 예측, IBC, 팔레트 모드, 인터 예측 등과 같은 모든 예측 모드가 가용함을 나타내는 MODE_TYPE_ALL, 인트라 예측, IBC 및 팔레트 모드만이 가용함을 나타내는 MODE_TYPE_INTRA, 및 인터 예측 모드만이 가용함을 나타내는 MODE_TYPE_INTER 중 어느 하나의 값을 가질 수 있다.
현재 CU의 modeTypeCondition은 소정의 조건에 따라 제1 값(e.g. 0) 내지 제3 값(e.g. 2) 중 어느 하나를 가질 수 있다.
구체적으로, 아래의 조건 4-1 내지 조건 4-4 중 적어도 하나가 충족되는 경우, modeTypeCondition은 제1 값(e.g. 0)을 가질 수 있다.
(조건 4-1) 현재 CU가 I 슬라이스에 포함되고, 해당 슬라이스에 포함되는 CTU가 64x64 루마 샘플 CU로 암묵적 쿼드트리 분할(implicit quadtree split)되고, 상기 64x64 CU는 듀얼 트리의 루트 노드(root node)가 되는 경우
(조건 4-2) modeTypeCurr가 MODE_TYPE_ALL이 아닌 경우
(조건 4-3) 현재 블록의 컬러 포맷(크로마 포맷)이 모노크롬(monochrome)인 경우
(조건 4-4) 현재 블록의 컬러 포맷이 4:4:4 포맷인 경우
상술한 조건들이 전부 충족되지 않고, 아래의 조건 5-1 내지 조건 5-3 중 적어도 하나가 충족되는 경우, modeTypeCondition은 제2 값(e.g. 1)을 가질 수 있다. 조건 5-1 내지 조건 5-3에 있어서, 현재 CU는 현재 CU의 루마 성분 블록을 의미할 수 있다.
(조건 5-1) 현재 CU의 너비와 높이의 곱이 64이고, 현재 CU가 쿼드트리 분할되는 경우
(조건 5-2) 현재 CU의 너비와 높이의 곱이 64이고, 현재 CU가 수평 터너리 분할 또는 수직 터너리 분할되는 경우
(조건 5-3) 현재 CU의 너비와 높이의 곱이 32이고, 현재 CU가 수평 바이너리 분할 또는 수직 바이너리 분할되는 경우
상술한 조건들이 전부 충족되지 않고, 아래의 조건 6-1 내지 조건 6-4 중 적어도 하나가 충족되는 경우, modeTypeCondition은 현재 CU가 I 슬라이스에 포함되는지 여부에 따라 제2 값(e.g. 1) 또는 제3 값(e.g. 2)을 가질 수 있다. 예를 들어, 조건 6-1 내지 조건 6-4 중 적어도 하나가 충족되는 경우로서, 현재 CU가 I 슬라이스에 포함되면 modeTypeCondition은 제2 값을 갖고, 현재 CU가 I 슬라이스에 포함되지 않으면 modeTypeCondition은 제3 값을 가질 수 있다. 조건 6-1 내지 조건 6-4에 있어서, 현재 CU는 현재 CU의 루마 성분 블록을 의미할 수 있다.
(조건 6-1) 현재 CU의 너비와 높이의 곱이 64이고, 현재 CU가 수평 바이너리 분할 또는 수직 바이너리 분할되며, 현재 CU의 컬러 포맷이 4:2:0 포맷인 경우
(조건 6-2) 현재 CU에 포함되는 루마 블록의 너비와 높이의 곱이 128이고, 현재 CU가 수평 터너리 분할 또는 수직 터너리 분할되며, 현재 CU의 컬러 포맷이 4:2:0 포맷인 경우
(조건 6-3) 현재 CU의 너비가 8이고, 현재 CU가 수평 바이너리 분할되는 경우
(조건 6-4) 현재 CTU의 너비가 16이고, 현재 CU가 수직 터너리 분할되는 경우
상술한 조건들이 전부 충족되지 않는 경우, modeTypeCondition은 제1 값(e.g. 0)을 가질 수 있다.
그리고, modeTypeCondition의 값에 기반하여 현재 CU의 modeType이 결정될 수 있다.
구체적으로, 도 10a를 참조하면, modeTypeCondition이 제2 값(e.g. 1)을 갖는 경우(1010), modeType은 MODE_TYPE_INTRA로 결정될 수 있다(1020).
또는, modeTypeCondition이 제3 값(e.g. 2)을 갖는 경우(1030), modeType은 mode_constraint_flag의 값에 기반하여 결정될 수 있다. 여기서, mode_constraint_flag는 현재 CU에 인터 예측 모드가 적용될 수 있는지 여부를 나타낼 수 있다. 예를 들어, mode_constraint_flag의 제1 값(e.g. 0)은, 현재 CU에 인터 예측 모드만이 적용될 수 있음을 나타낼 수 있다. 그리고, 이 경우, 현재 CU의 modeType은 MODE_TYPE_INTER로 결정될 수 있다. 이와 달리, mode_constraint_flag의 제2 값(e.g. 1)은, 현재 CU에 인터 예측 모드가 적용될 수 없음을 나타낼 수 있다. 그리고, 이 경우, modeType은 MODE_TYPE_INTRA로 결정될 수 있다(1040).
또는, modeTypeCondition이 제2 값(e.g. 1) 및 제3 값(e.g. 2) 이외의 값을 갖는 경우(예를 들어, modeTypeCondition이 제1 값(e.g. 0)을 갖는 경우), modeType은 modeTypeCurr와 동일한 값으로 결정될 수 있다(1050). 여기서, modeTypeCurr는 coding_tree 신택스의 호출 입력값으로서, 현재 CU의 예측 모드 타입을 의미할 수 있다. 일 예에서, 현재 CU가 분할 트리의 루트 노드인 경우, modeTypeCurr는 MODE_TYPE_ALL일 수 있다.
modeTypeCondition의 값에 기반하여 결정된 modeType은, 현재 CU를 분할하여 획득되는 하위 CU를 호출하기 위한 coding_tree 신택스의 호출 입력값으로 이용될 수 있다.
그리고, 현재 CU의 modeType의 값에 기반하여, 현재 CU를 분할하여 생성되는 하위 CU의 분할 구조(treeType)가 결정될 수 있다(1060). 예를 들어, 현재 CU의 modeType이 MODE_TYPE_INTRA인 경우, 하위 CU의 분할 구조는 듀얼 트리 루마(DUAL_TREE_LUMA)로 결정될 수 있다. 이와 달리, modeType이 MODE_TYPE_INTRA가 아닌 경우, 하위 CU의 분할 구조는 현재 CU의 분할 구조(treeTypeCurr)와 같을 수 있다.
하위 CU의 분할 구조에 관한 정보는 파라미터 treeType에 저장될 수 있다. treeType 및 modeType은 현재 CU를 추가적으로 분할하여 하위 CU들을 호출하기 위한 coding_tree 신택스의 입력값으로 이용될 수 있다.
하위 CU의 modeType이 MODE_TYPE_INTRA인 경우, 현재 CU는 듀얼 트리 구조로 추가적으로 분할될 수 있다. 구체적으로, 도 10b를 참조하면, 하위 CU의 modeType이 MODE_TYPE_INTRA인 경우, 하위 CU는 듀얼 트리 루마(DUAL_TREE_LUMA)의 트리 구조를 가질 수 있다. 즉, 현재 CU의 루마 성분과 크로마 성분은 별개의 트리 구조로 분할될 수 있다(1070). 또한, 도 10c를 참조하면, 현재 CU의 modeTypeCurr가 MODE_TYPE_ALL이고, 하위 CU의 modeType이 MODE_TYPE_INTRA인 경우, 현재 CU의 크로마 성분은 분할되지 않고, 하위 CU는 듀얼 트리 크로마(DUAL_TREE_CHROMA)의 트리 구조를 가질 수 있다(1080).
이와 같이, 하위 CU의 modeType은 modeTypeCondition에 기반하여 결정될 수 있다. 또한, 하위 CU의 modeType이 MODE_TYPE_INTRA인 경우, 하위 CU의 루마 성분은 듀얼 트리 루마의 트리 구조를 갖고, 하위 CU의 크로마 성분은 듀얼 트리 크로마의 트리 구조를 가질 수 있다. 즉, 하위 CU는 현재 CTU 내에서 부분적으로 듀얼 트리 구조를 갖게 되며, 이와 같은 분할 구조를 로컬 듀얼 트리 구조라고 지칭할 수 있다.
이하, 인트라 예측 모드 및 크로마 블록의 인트라 예측에 대해 설명한다.
인트라 예측 모드의 개요
인트라 예측은 현재 블록이 속하는 픽처(이하, 현재 픽처) 내의 참조 샘플들을 기반으로 현재 블록에 대한 예측 샘플들을 생성하는 예측을 나타낼 수 있다. 현재 블록에 인트라 예측이 적용되는 경우, 현재 블록의 인트라 예측에 사용할 주변 참조 샘플들이 도출될 수 있다. 상기 현재 블록의 주변 참조 샘플들은 nWxnH 크기의 현재 블록의 좌측(left) 경계에 인접한 샘플 및 좌하측(bottom-left)에 이웃하는 총 2xnH 개의 샘플들, 현재 블록의 상측(top) 경계에 인접한 샘플 및 우상측(top-right)에 이웃하는 총 2xnW 개의 샘플들 및 현재 블록의 좌상측(top-left)에 이웃하는 1개의 샘플을 포함할 수 있다. 또는, 상기 현재 블록의 주변 참조 샘플들은 복수열의 상측 주변 샘플들 및 복수행의 좌측 주변 샘플들을 포함할 수도 있다. 또한, 상기 현재 블록의 주변 참조 샘플들은 nWxnH 크기의 현재 블록의 우측(right) 경계에 인접한 총 nH 개의 샘플들, 현재 블록의 하측(bottom) 경계에 인접한 총 nW 개의 샘플들 및 현재 블록의 우하측(bottom-right)에 이웃하는 1개의 샘플을 포함할 수도 있다.
다만, 현재 블록의 주변 참조 샘플들 중 일부는 아직 디코딩되지 않았거나, 이용 가능하지 않을 수 있다. 이 경우, 디코더는 이용 가능한 샘플들로 이용 가능하지 않은 샘플들을 대체(substitution)하여 예측에 사용할 주변 참조 샘플들을 구성할 수 있다. 또는, 이용 가능한 샘플들의 보간(interpolation)을 통하여 예측에 사용할 주변 참조 샘플들을 구성할 수 있다.
주변 참조 샘플들이 도출된 경우, (i) 현재 블록의 주변(neighboring) 참조 샘플들의 평균(average) 혹은 인터폴레이션(interpolation)을 기반으로 예측 샘플을 유도할 수 있고, (ii) 현재 블록의 주변 참조 샘플들 중 예측 샘플에 대하여 특정 (예측) 방향에 존재하는 참조 샘플을 기반으로 상기 예측 샘플을 유도할 수도 있다. (i)의 경우는 비방향성 모드 또는 비각도 모드, (ii)의 경우는 방향성(directional) 모드 또는 각도(angular) 모드라고 불릴 수 있다.
또한, 상기 주변 참조 샘플들 중 상기 현재 블록의 예측 대상 샘플을 기준으로 상기 현재 블록의 인트라 예측 모드의 예측 방향에 위치하는 제1 주변 샘플과 그 반대 방향에 위치하는 제2 주변 샘플과의 보간을 통하여 상기 예측 샘플이 생성될 수도 있다. 상술한 경우는 선형 보간 인트라 예측(Linear interpolation intra prediction, LIP) 이라고 불릴 수 있다.
또한, 선형 모델(linear model)을 이용하여 루마 샘플들을 기반으로 크로마 예측 샘플들이 생성될 수도 있다. 이 경우는 LM(Linear Model) 모드라고 불릴 수 있다.
또한, 필터링된 주변 참조 샘플들을 기반으로 상기 현재 블록의 임시 예측 샘플을 도출하고, 상기 기존의 주변 참조 샘플들, 즉, 필터링되지 않은 주변 참조 샘플들 중 상기 인트라 예측 모드에 따라 도출된 적어도 하나의 참조 샘플과 상기 임시 예측 샘플을 가중합(weighted sum)하여 상기 현재 블록의 예측 샘플을 도출할 수도 있다. 이 경우는 PDPC(Position dependent intra prediction) 라고 불릴 수 있다.
또한, 현재 블록의 주변 다중 참조 샘플 라인 중 가장 예측 정확도가 높은 참조 샘플 라인을 선택하여 해당 라인에서 예측 방향에 위치하는 참조 샘플을 이용하여 예측 샘플을 도출할 수 있다. 이 때, 사용된 참조 샘플 라인에 관한 정보(예를 들어, intra_luma_ref_idx)는 비트스트림에 부호화되어 시그널링될 수 있다. 이 경우는 multi-reference line intra prediction (MRL) 또는 MRL 기반 인트라 예측이라고 불릴 수 있다.
또한, 현재 블록을 수직 또는 수평의 서브파티션들로 분할하고, 각 서브파티션에 대해 동일한 인트라 예측 모드를 기반으로 인트라 예측을 수행할 수 있다. 이 때, 인트라 예측의 주변 참조 샘플들은 각 서브파티션 단위로 도출될 수 있다. 즉, 부호화/복호화 순서 상 이전 서브파티션의 복원된 샘플이 현재 서브파티션의 주변 참조 샘플로서 이용될 수 있다. 이 경우 현재 블록에 대한 인트라 예측 모드가 상기 서브파티션들에 동일하게 적용되되, 상기 서브파티션 단위로 주변 참조 샘플을 도출하여 이용함으로써 경우에 따라 인트라 예측 성능을 높일 수 있다. 이러한 예측 방법은 intra sub-partitions(ISP) 또는 ISP 기반 인트라 예측이라고 불릴 수 있다.
전술한 인트라 예측 기법들은 방향성 또는 비방향성의 인트라 예측 모드와 구분하여 인트라 예측 타입 또는 부가 인트라 예측 모드 등 다양한 용어로 불릴 수 있다. 예를 들어 상기 인트라 예측 기법(인트라 예측 타입 또는 부가 인트라 예측 모드 등)은 상술한 LIP, LM, PDPC, MRL, ISP 중 적어도 하나를 포함할 수 있다. 한편, 필요에 따라서 도출된 예측 샘플에 대한 후처리 필터링이 수행될 수도 있다.
구체적으로, 인트라 예측 절차는 인트라 예측 모드/타입 결정 단계, 주변 참조 샘플 도출 단계, 인트라 예측 모드/타입 기반 예측 샘플 도출 단계를 포함할 수 있다. 또한, 필요에 따라서 도출된 예측 샘플에 대한 후처리 필터링(post-filtering) 단계가 수행될 수도 있다.
도 11은 인트라 예측 기반 비디오/영상 인코딩 방법을 나타내는 흐름도이다.
도 11의 인코딩 방법은 도 2의 영상 부호화 장치에 의해 수행될 수 있다. 구체적으로, 단계 S1110은 인트라 예측부(185)에 의하여 수행될 수 있고, 단계 S1120은 레지듀얼 처리부에 의하여 수행될 수 있다. 구체적으로 단계 S1120은 감산부(115)에 의하여 수행될 수 있다. 단계 S1130은 엔트로피 인코딩부(190)에 의하여 수행될 수 있다. 단계 S1130의 예측 정보는 인트라 예측부(185)에 의하여 도출되고, 단계 S1130의 레지듀얼 정보는 레지듀얼 처리부에 의하여 도출될 수 있다. 상기 레지듀얼 정보는 상기 레지듀얼 샘플들에 관한 정보이다. 상기 레지듀얼 정보는 상기 레지듀얼 샘플들에 대한 양자화된 변환 계수들에 관한 정보를 포함할 수 있다. 전술한 바와 같이 상기 레지듀얼 샘플들은 영상 부호화 장치의 변환부(120)를 통하여 변환 계수들로 도출되고, 상기 변환 계수들은 양자화부(130)를 통하여 양자화된 변환 계수들로 도출될 수 있다. 상기 양자화된 변환 계수들에 관한 정보가 레지듀얼 코딩 절차를 통하여 엔트로피 인코딩부(190)에서 인코딩될 수 있다.
영상 부호화 장치는 현재 블록에 대한 인트라 예측을 수행할 수 있다(S1110). 영상 부호화 장치는 현재 블록에 대한 인트라 예측 모드/타입을 결정하고, 현재 블록의 주변 참조 샘플들을 도출한 후, 상기 인트라 예측 모드/타입 및 상기 주변 참조 샘플들을 기반으로 상기 현재 블록 내 예측 샘플들을 생성할 수 있다. 여기서 인트라 예측 모드/타입 결정, 주변 참조 샘플들 도출 및 예측 샘플들 생성 절차는 동시에 수행될 수도 있고, 어느 한 절차가 다른 절차보다 먼저 수행될 수도 있다.
도 12는 본 개시에 따른 인트라 예측부의 구성을 예시적으로 나타내는 도면이다.
도 12에 도시된 바와 같이, 영상 부호화 장치의 인트라 예측부(185)는 인트라 예측 모드/타입 결정부(186), 참조 샘플 도출부(187) 및/또는 예측 샘플 도출부(188)를 포함할 수 있다. 인트라 예측 모드/타입 결정부(186)는 상기 현재 블록에 대한 인트라 예측 모드/타입을 결정할 수 있다. 참조 샘플 도출부(187)는 상기 현재 블록의 주변 참조 샘플들을 도출할 수 있다. 예측 샘플 도출부(188)는 상기 현재 블록의 예측 샘플들을 도출할 수 있다. 한편, 비록 도시되지는 않았지만, 후술하는 예측 샘플 필터링 절차가 수행되는 경우, 인트라 예측부(185)는 예측 샘플 필터부(미도시)를 더 포함할 수도 있다.
영상 부호화 장치는 복수의 인트라 예측 모드/타입들 중 상기 현재 블록에 대하여 적용되는 모드/타입을 결정할 수 있다. 영상 부호화 장치는 상기 인트라 예측 모드/타입들에 대한 율왜곡 비용(RD cost)을 비교하고 상기 현재 블록에 대한 최적의 인트라 예측 모드/타입을 결정할 수 있다.
한편, 영상 부호화 장치는 예측 샘플 필터링 절차를 수행할 수도 있다. 예측 샘플 필터링은 포스트 필터링이라 불릴 수 있다. 상기 예측 샘플 필터링 절차에 의하여 상기 예측 샘플들 중 일부 또는 전부가 필터링될 수 있다. 경우에 따라 상기 예측 샘플 필터링 절차는 생략될 수 있다.
다시 도 11을 참조하면, 영상 부호화 장치는 예측 샘플들 또는 필터링된 예측 샘플들을 기반으로 상기 현재 블록에 대한 레지듀얼 샘플들을 생성할 수 있다(S1120). 영상 부호화 장치는 현재 블록의 원본 샘플들로부터 상기 예측 샘플들을 감산하여 상기 레지듀얼 샘플들을 도출할 수 있다. 즉, 영상 부호화 장치는 원본 샘플값으로부터 대응하는 예측 샘플값을 감산함으로써, 레지듀얼 샘플값을 도출할 수 있다.
영상 부호화 장치는 상기 인트라 예측에 관한 정보(예측 정보) 및 상기 레지듀얼 샘플들에 관한 레지듀얼 정보를 포함하는 영상 정보를 인코딩할 수 있다(S1130). 상기 예측 정보는 인트라 예측 모드 정보 및/또는 인트라 예측 기법 정보를 포함할 수 있다. 영상 부호화 장치는 인코딩된 영상 정보를 비트스트림 형태로 출력할 수 있다. 출력된 비트스트림은 저장 매체 또는 네트워크를 통하여 영상 복호화 장치로 전달될 수 있다.
상기 레지듀얼 정보는 후술하는 레지듀얼 코딩 신택스를 포함할 수 있다. 영상 부호화 장치는 상기 레지듀얼 샘플들을 변환/양자화하여 양자화된 변환 계수들을 도출할 수 있다. 상기 레지듀얼 정보는 상기 양자화된 변환 계수들에 대한 정보를 포함할 수 있다.
한편, 전술한 바와 같이 영상 부호화 장치는 복원 픽처(복원 샘플들 및 복원 블록 포함)를 생성할 수 있다. 이를 위하여 영상 부호화 장치는 상기 양자화된 변환 계수들을 다시 역양자화/역변환 처리하여 (수정된) 레지듀얼 샘플들을 도출할 수 있다. 이와 같이 레지듀얼 샘플들을 변환/양자화 후 다시 역양자화/역변환을 수행하는 이유는 영상 복호화 장치에서 도출되는 레지듀얼 샘플들과 동일한 레지듀얼 샘플들을 도출하기 위함이다. 영상 부호화 장치는 상기 예측 샘플들과 상기 (수정된) 레지듀얼 샘플들을 기반으로 상기 현재 블록에 대한 복원 샘플들을 포함하는 복원 블록을 생성할 수 있다. 상기 복원 블록을 기반으로 상기 현재 픽처에 대한 복원 픽처가 생성될 수 있다. 상기 복원 픽처에 인루프 필터링 절차 등이 더 적용될 수 있음은 전술한 바와 같다.
도 13은 인트라 예측 기반 비디오/영상 디코딩 방법을 나타내는 흐름도이다.
영상 복호화 장치는 상기 영상 부호화 장치에서 수행된 동작과 대응되는 동작을 수행할 수 있다.
도 13의 디코딩 방법은 도 3의 영상 복호화 장치에 의해 수행될 수 있다. 단계 S1310 내지 S1330은 인트라 예측부(265)에 의하여 수행될 수 있고, 단계 S1310의 예측 정보 및 단계 S1440의 레지듀얼 정보는 엔트로피 디코딩부(210)에 의하여 비트스트림으로부터 획득될 수 있다. 영상 복호화 장치의 레지듀얼 처리부는 상기 레지듀얼 정보를 기반으로 현재 블록에 대한 레지듀얼 샘플들을 도출할 수 있다(S1340). 구체적으로 상기 레지듀얼 처리부의 역양자화부(220)는 상기 레지듀얼 정보를 기반으로 도출된 양자화된 변환 계수들을 기반으로, 역양자화를 수행하여 변환 계수들을 도출하고, 상기 레지듀얼 처리부의 역변환부(230)는 상기 변환 계수들에 대한 역변환을 수행하여 상기 현재 블록에 대한 레지듀얼 샘플들을 도출할 수 있다. 단계 S1350은 가산부(235) 또는 복원부에 의하여 수행될 수 있다.
구체적으로 영상 복호화 장치는 수신된 예측 정보(인트라 예측 모드/타입 정보)를 기반으로 현재 블록에 대한 인트라 예측 모드/타입을 도출할 수 있다(S1310). 또한, 영상 복호화 장치는 상기 현재 블록의 주변 참조 샘플들을 도출할 수 있다(S1320). 영상 복호화 장치는 상기 인트라 예측 모드/타입 및 상기 주변 참조 샘플들을 기반으로 상기 현재 블록 내 예측 샘플들을 생성할 수 있다(S1330). 이 경우 영상 복호화 장치는 예측 샘플 필터링 절차를 수행할 수 있다. 예측 샘플 필터링은 포스트 필터링이라 불릴 수 있다. 상기 예측 샘플 필터링 절차에 의하여 상기 예측 샘플들 중 일부 또는 전부가 필터링될 수 있다. 경우에 따라 예측 샘플 필터링 절차는 생략될 수 있다.
영상 복호화 장치는 수신된 레지듀얼 정보를 기반으로 상기 현재 블록에 대한 레지듀얼 샘플들을 생성할 수 있다(S1340). 영상 복호화 장치는 상기 예측 샘플들 및 상기 레지듀얼 샘플들을 기반으로 상기 현재 블록에 대한 복원 샘플들을 생성하고, 상기 복원 샘플들을 포함하는 복원 블록을 도출할 수 있다(S1350). 상기 복원 블록을 기반으로 상기 현재 픽처에 대한 복원 픽처가 생성될 수 있다. 상기 복원 픽처에 인루프 필터링 절차 등이 더 적용될 수 있음은 전술한 바와 같다.
도 14는 본 개시에 따른 인트라 예측부의 구성을 예시적으로 나타내는 도면이다.
도 14에 도시된 바와 같이, 영상 복호화 장치의 인트라 예측부(265)는 인트라 예측 모드/타입 결정부(266), 참조 샘플 도출부(267), 예측 샘플 도출부(268)를 포함할 수 있다. 인트라 예측 모드/타입 결정부(266)는 영상 부호화 장치의 인트라 예측 모드/타입 결정부(186)에서 생성되어 시그널링된 인트라 예측 모드/타입 정보를 기반으로 상기 현재 블록에 대한 인트라 예측 모드/타입을 결정하고, 참조 샘플 도출부(266)는 현재 픽처 내 복원된 참조 영역으로부터 상기 현재 블록의 주변 참조 샘플들을 도출할 수 있다. 예측 샘플 도출부(268)는 상기 현재 블록의 예측 샘플들을 도출할 수 있다. 한편, 비록 도시되지는 않았지만, 전술한 예측 샘플 필터링 절차가 수행되는 경우, 인트라 예측부(265)는 예측 샘플 필터부(미도시)를 더 포함할 수도 있다.
상기 인트라 예측 모드 정보는 예를 들어 MPM(most probable mode)가 상기 현재 블록에 적용되는지 아니면 리메이닝 모드(remaining mode)가 적용되는지 여부를 나타내는 플래그 정보(e.g. intra_luma_mpm_flag 및/또는 intra_chroma_mpm_flag)를 포함할 수 있고, 상기 MPM이 상기 현재 블록에 적용되는 경우 상기 인트라 예측 모드 정보는 인트라 예측 모드 후보들(MPM 후보들) 중 하나를 지시하는 인덱스 정보(e.g. intra_luma_mpm_idx 및/또는 intra_chroma_mpm_idx)를 더 포함할 수 있다. 상기 인트라 예측 모드 후보들(MPM 후보들)은 MPM 후보 리스트 또는 MPM 리스트로 구성될 수 있다. 또한, 상기 MPM이 상기 현재 블록에 적용되지 않는 경우, 상기 인트라 예측 모드 정보는 상기 인트라 예측 모드 후보들(MPM 후보들)을 제외한 나머지 인트라 예측 모드들 중 하나를 지시하는 리메이닝 모드 정보(e.g. intra_luma_mpm_remainder 및/또는 intra_chroma_mpm_remainder)를 더 포함할 수 있다. 영상 복호화 장치는 상기 인트라 예측 모드 정보를 기반으로 상기 현재 블록의 인트라 예측 모드를 결정할 수 있다. MPM 후보 모드들은 현재 블록의 주변 블록(e.g. 좌측 주변 블록 및/또는 상측 주변 블록)의 인트라 예측 모드 및 추가적인 후보 모드들을 포함할 수 있다.
일 예에서, 인트라 예측 모드는 2개의 비방향성 인트라 예측 모드들과 33개의 방향성 인트라 예측 모드들을 포함할 수 있다. 상기 비방향성 인트라 예측 모드들은 플래너(planar) 모드 및 DC 모드를 포함할 수 있고, 상기 방향성 인트라 예측 모드들은 2번 내지 34번 인트라 예측 모드들을 포함할 수 있다. 상기 플래너 인트라 예측 모드는 플래너 모드라고 불릴 수 있고, 상기 DC 인트라 예측 모드는 DC 모드라고 불릴 수 있다.
또는, 자연 영상(natural video)에서 제시된 임의의 에지 방향(edge direction)을 캡쳐하기 위하여, 인트라 예측 모드는 2개의 비방향성 인트라 예측 모드들과 65개의 확장된 방향성 인트라 예측 모드들을 포함할 수 있다. 상기 비방향성 인트라 예측 모드들은 플래너 모드 및 DC 모드를 포함할 수 있고, 상기 확장된 방향성 인트라 예측 모드들은 2번 내지 66번 인트라 예측 모드들을 포함할 수 있다. 상기 인트라 예측 모드는 모든 사이즈의 블록들에 적용될 수 있고, 루마 성분(루마 블록) 및 크로마 성분(크로마 블록) 모두에 적용될 수 있다.
또는, 상기 인트라 예측 모드는 2개의 비방향성 인트라 예측 모드들과 129개의 방향성 인트라 예측 모드들을 포함할 수 있다. 상기 비방향성 인트라 예측 모드들은 플래너 모드 및 DC 모드를 포함할 수 있고, 상기 방향성 인트라 예측 모드들은 2번 내지 130번 인트라 예측 모드들을 포함할 수 있다.
한편, 상기 인트라 예측 모드는 전술한 인트라 예측 모드들 외에도 크로마 샘플을 위한 CCLM(cross-component linear model) 모드를 더 포함할 수 있다. CCLM 모드는 LM 파라미터 도출을 위하여 좌측 샘플들을 고려하는지, 상측 샘플들을 고려하는지, 둘 다를 고려하는지에 따라 L_CCLM, T_CCLM, LT_CCLM으로 나누어질 수 있으며, 크로마 성분에 대하여만 적용될 수 있다.
다른 예에서, 인트라 예측 모드는 자연 영상(natural video)에서 제시된 임의의 에지 방향(edge direction)을 캡쳐하기 위하여, 2개의 비방향성 인트라 예측 모드와 함께 93개의 방향성 인트라 예측 모드를 포함할 수 있다. 비방향성 인트라 예측 모드들은 플래너 모드 및 DC 모드를 포함할 수 있다. 상기 플래너 모드는 INTRA_PLANAR로 표기될 수 있고, DC 모드는 INTRA_DC로 표기될 수 있다. 그리고, 방향성 인트라 예측 모드는 INTRA_ANGULAR-14 내지 INTRA_ANGULAR-1, 및 INTRA_ANGULAR2 내지 INTRA_ANGULAR80으로 표기될 수 있다.
한편, 상기 인트라 예측 기법 정보는 다양한 형태로 구현될 수 있다. 일 예로, 상기 인트라 예측 기법 정보는 복수의 인트라 예측 기법들 중 하나를 지시하는 인트라 예측 기법 인덱스 정보를 포함할 수 있다. 다른 예로, 상기 인트라 예측 기법 정보는 상기 MRL이 상기 현재 블록에 적용되는지 및 적용되는 경우에는 몇번째 참조 샘플 라인이 이용되는지 여부를 나타내는 참조 샘플 라인 정보(e.g. intra_luma_ref_idx), 상기 ISP가 상기 현재 블록에 적용되는지를 나타내는 ISP 플래그 정보(e.g. intra_subpartitions_mode_flag), 상기 ISP가 적용되는 경우에 서브파티션들의 분할 타입을 지시하는 ISP 타입 정보(e.g. intra_subpartitions_split_flag), PDPC의 적용 여부를 나타내는 플래그 정보 또는 LIP의 적용 여부를 나타내는 플래그 정보 중 적어도 하나를 포함할 수 있다. 본 개시에서 ISP 플래그 정보는 ISP 적용 지시자로 불릴 수 있다.
상기 인트라 예측 모드 정보 및/또는 상기 인트라 예측 기법 정보는 본 개시에서 설명된 코딩 방법을 이용하여 부호화/복호화될 수 있다. 예를 들어, 상기 인트라 예측 모드 정보 및/또는 상기 인트라 예측 기법 정보는 truncated (rice) binary code를 기반으로 엔트로피 코딩(e.g. CABAC, CAVLC)을 통하여 부호화/복호화될 수 있다.
크로마 블록의 인트라 예측
현재 블록에 인트라 예측이 수행되는 경우, 현재 블록의 루마 성분 블록(루마 블록)에 대한 예측 및 크로마 성분 블록(크로마 블록)에 대한 예측이 수행될 수 있으며, 이 경우 크로마 블록에 대한 인트라 예측 모드는 루마 블록에 대한 인트라 예측 모드와 개별적으로 설정될 수 있다.
예를 들어, 크로마 블록에 대한 인트라 예측 모드는 인트라 크로마 예측 모드 정보를 기반으로 지시될 수 있으며, 상기 인트라 크로마 예측 모드 정보는 intra_chroma_pred_mode 신택스 요소의 형태로 시그널링될 수 있다. 일 예로, 상기 인트라 크로마 예측 모드 정보는 플래너(Planar) 모드, DC 모드, 수직(vertical) 모드, 수평(horizontal) 모드, DM(Derived Mode), CCLM(Cross-component linear model) 모드들 중 하나를 가리킬 수 있다. 여기서, 상기 플래너 모드는 0번 인트라 예측 모드, 상기 DC 모드는 1번 인트라 예측 모드, 상기 수직 모드는 26번 인트라 예측 모드, 상기 수평 모드는 10번 인트라 예측 모드를 나타낼 수 있다. DM은 direct mode라고 불릴 수도 있다. 또한, CCLM은 LM(linear model)이라고 불릴 수도 있다.
DM과 CCLM은 루마 블록의 정보를 이용하여 크로마 블록을 예측하는 종속적인 인트라 예측 모드이다. 상기 DM은 상기 루마 성분에 대한 인트라 예측 모드와 동일한 인트라 예측 모드가 상기 크로마 성분에 대한 인트라 예측 모드로 적용되는 모드를 나타낼 수 있다. 또한, 상기 CCLM은 크로마 블록에 대한 예측 블록을 생성하는 과정에서 루마 블록의 복원된 샘플들을 서브샘플링한 후, 서브샘플링된 샘플들에 CCLM 파라미터인 α 및 β를 적용하여 수학식 1과 같이 도출되는 샘플들을 상기 크로마 블록의 예측 샘플들로 사용하는 인트라 예측 모드를 나타낼 수 있다.
Figure PCTKR2020012898-appb-M000001
여기서, predc(i,j) 는 현재 CU 내 상기 현재 크로마 블록의 (i,j) 좌표의 예측 샘플을 나타낼 수 있다. recL'(i,j)는 상기 CU 내 상기 현재 루마 블록의 (i,j) 좌표의 복원 샘플을 나타낼 수 있다. 예를 들어, 상기 recL'(i,j)는 상기 현재 루마 블록의 다운 샘플링(down-sampled)된 복원 샘플을 나타낼 수 있다. 선형 모델 계수 α와 β는 시그널링될 수도 있지만, 주변 샘플로부터 유도될 수도 있다.
크로마 블록이 DM으로 예측된 경우, 크로마 블록의 인트라 예측 모드는 대응 루마 블록의 인트라 예측 모드로 도출될 수 있다. 예를 들어, 대응 루마 블록의 소정 위치의 인트라 예측 모드를 크로마 블록의 인트라 예측 모드로 사용할 수 있다.
한편, 크로마 블록의 인트라 예측은 다중 DM(Multiple Direct Modes: MDM)을 이용하여 수행될 수도 있다. 다중 DM은 상술한 단일의 DM을 복수의 모드로 확장하여 사용하는 모드로서, 크로마 블록의 화면 내 예측 모드를 유도하기 위해 복수의 DM 후보들을 포함하는 DM 후보 리스트를 구성하고, DM 후보 리스트에 포함된 후보들 중 하나를 크로마 블록의 인트라 예측 모드로 도출할 수 있다. 다중 DM이 적용되는 경우, DM 후보 리스트는 아래의 복수의 DM 후보들 중 적어도 하나를 포함할 수 있다.
- 대응 루마 블록의 CR, TL, TR, BL, BR 위치의 인트라 예측 모드
- 크로마 블록의 주변 블록인 L, A, BL, AR, AL 위치의 인트라 예측 모드
- 플래너(Planar) 모드 및 DC 모드
- 이미 포함된 방향성 모드에 소정의 오프셋(e.g. 1)을 가감하여 도출되는 방향성 모드
- 디폴트 DM 후보 모드: 수직 모드, 수평 모드, 2, 34, 66, 10, 26번 모드(65개 방향성 모드의 경우)
- 4개의 디폴트 DM 후보(PLANAR 모드, DC 모드, 수직 모드 및 수평 모드)가 DM 후보 리스트에 포함되지 않은 경우, 포함되지 않은 디폴트 DM 후보로 리스트에 이미 포함된 DM 후보 대체
크로마 블록의 인트라 예측 모드는 인트라 크로마 예측 모드 정보(intra_chroma_pred_mode) 및/또는 대응 루마 블록의 인트라 예측 모드에 기반하여 도출될 수 있다. 예를 들어, 인트라 크로마 예측 모드 정보가 DM을 나타내는 경우, 크로마 블록의 인트라 예측 모드는 대응 루마 블록의 인트라 예측 모드와 동일하게 결정될 수 있다.
전술한 인트라 예측 방법에 따르면, 루마 블록에 대한 인트라 예측은 MPM 리스트에 기반하여 수행되고, 크로마 블록에 대한 인트라 예측은 소정의 디폴트 모드 및/또는 DM에 기반하여 수행될 수 있다. 상기 디폴트 인트라 예측 모드는 플래너 모드, DC 모드, 수직 모드(vertical mode) 및 수평 모드(horizontal mode)를 포함할 수 있다.
이하, 팔레트 모드(Palette mode)에 대해 설명한다.
팔레트 모드의 개요
팔레트 모드는 소정의 대표 컬러값 세트를 포함하는 팔레트(또는, 팔레트 테이블)에 기반하여 현재 블록을 부호화/복호화하는 예측 모드를 나타낼 수 있다. 팔레트 모드에서, 현재 블록 내의 각각의 샘플은 소정의 대표 컬러값을 지시하는 팔레트 인덱스로 표현될 수 있다. 본 개시에서, 팔레트 모드를 이용한 부호화/복호화를 팔레트 부호화/복호화라고 지칭할 수 있다.
팔레트 모드는 특정 영상의 부호화/복호화 효율을 향상시키기 위하여 이용될 수 있다. 예를 들어, 상당한 양의 텍스트와 그래픽을 포함하고 컴퓨터나 스마트폰 등과 같은 전자기기에 의해 생성되는 영상인 스크린 컨텐츠는 샤프 엣지로 분리되는 로컬 영역을 포함하며, 상기 로컬 영역은 상대적으로 적은 개수의 픽셀값들로 표현될 수 있다. 따라서, 현재 블록 내의 대부분의 픽셀값들을 상대적으로 적은 개수의 인덱스들로 표현하는 팔레트 모드는, 다른 예측 모드들(e.g. 인트라 예측 모드, 인터 예측 모드 등)에 비해 스크린 컨텐츠의 부호화/복호화에 효과적일 수 있다.
팔레트 모드는 전술한 인트라 예측 모드의 일종이며, 팔레트 부호화 모드, 인트라 팔레트 모드, 인트라 팔레트 부호화 모드 등으로 불릴 수 있다. 다만, 현재 블록에 팔레트 모드가 적용되는 경우, 인트라 예측 모드의 경우와 달리 현재 블록에 대한 레지듀얼 값은 별도로 시그널링되지 않을 수 있다. 이 점에서, 팔레트 모드는 전술한 스킵 모드와 유사할 수 있다.
현재 블록이 싱글 트리 구조를 갖는 경우, 팔레트 모드는 현재 블록의 루마 성분 및 크로마 성분 모두에 대하여 함께 적용될 수 있다. 예를 들어, 싱글 트리 구조를 갖는 현재 블록의 루마 성분에 팔레트 모드가 적용되는 경우, 현재 블록의 크로마 성분에는 팔레트 모드가 적용될 수 있다. 이와 달리, 현재 블록이 듀얼 트리 구조를 갖는 경우, 팔레트 모드는 현재 블록의 루마 성분 및 크로마 성분에 대하여 개별적으로 적용될 수 있다. 예를 들어, 듀얼 트리 구조를 갖는 현재 블록의 루마 성분에 팔레트 모드가 적용되는 경우, 현재 블록의 크로마 성분에는 팔레트 모드가 적용될 수도 있고, 또는 다른 예측 모드들(e.g. 인트라 예측 모드, 인터 예측 모드 등) 중 하나가 적용될 수도 있다.
현재 블록에 팔레트 모드가 적용되는 경우, 팔레트 예측자에 기반하여 현재 블록에 대한 팔레트 테이블이 구성될 수 있다.
팔레트 예측자는 하나 이상의 팔레트 엔트리들(대표 컬러값들)과 상기 팔레트 엔트리들 각각을 식별하기 위한 하나 이상의 팔레트 인덱스들을 포함할 수 있다. 일 예에서, 팔레트 예측자는 현재 블록을 포함하는 CTU(또는, 슬라이스)의 최초 부호화/복호화 시점에 소정의 값(e.g. 0)으로 초기화될 수 있다. 그리고, 팔레트 예측자는 팔레트 부호화/복호화에 이용된 적어도 하나의 팔레트 엔트리를 이용하여 업데이트될 수 있다. 일 예에서, 팔레트 예측자의 크기가 소정의 최대 크기에 도달할 때까지(즉, 팔레트 예측자가 허용된 최대 개수의 팔레트 엔트리들을 포함할 때까지), 현재 팔레트 테이블에 포함되지 않은 이전 팔레트 예측자의 팔레트 엔트리가 다음 팔레트 부호화를 위해 팔레트 예측자의 마지막 위치(인덱스)에 부가될 수 있다. 이를 팔레트 충전(palette stuffing)이라고 지칭할 수 있다.
팔레트 테이블은 팔레트 예측자에 포함된 적어도 하나의 팔레트 엔트리와, 상기 팔레트 엔트리를 식별하기 위한 적어도 하나의 팔레트 인덱스를 포함할 수 있다. 팔레트 예측자에 포함된 각각의 팔레트 엔트리에 대하여, 상기 팔레트 엔트리가 팔레트 테이블에 포함되는지 여부를 나타내는 재사용 플래그(reuse flag)가 비트스트림을 통해 시그널링될 수 있다. 이 경우, 제1 값(e.g. 0)을 갖는 재사용 플래그는 해당 팔레트 엔트리가 팔레트 테이블에 포함되지 않음을 나타낼 수 있다. 이와 달리, 제2 값(e.g. 1)을 갖는 재사용 플래그는 해당 팔레트 엔트리가 팔레트 테이블에 포함됨을 나타낼 수 있다. 재사용 플래그는 예를 들어, 0 값에 대한 런-길이(run-length) 코딩을 이용하여 부호화될 수 있다.
또한, 팔레트 테이블은 팔레트 예측자에 포함되지 않은 적어도 하나의 새로운 팔레트 엔트리와, 상기 새로운 팔레트 엔트리를 식별하기 위한 적어도 하나의 팔레트 인덱스를 포함할 수 있다. 새로운 팔레트 엔트리에 관한 정보(e.g. 총 개수, 컴포넌트 값 등)는 예를 들어, 0차 지수 골롬 코드를 이용하여 부호화되어 비트스트림을 통해 시그널링될 수 있다.
팔레트 테이블에 기반하여, 부호화 대상인 현재 블록에 대한 팔레트 인덱스 맵이 생성될 수 있다. 구체적으로, 현재 블록 내의 복수의 샘플들 각각의 픽셀값과 대표 컬러값 사이의 유사성에 기반하여, 상기 복수의 샘플들 각각에 팔레트 테이블 내의 소정의 팔레트 인덱스를 매핑함으로써, 현재 블록에 대한 팔레트 인덱스 맵이 생성될 수 있다. 이 경우, 현재 블록 내의 복수의 샘플들 중에서, 팔레트 테이블에서 정의된 대표 컬러값(팔레트 엔트리)과 비유사한 픽셀값을 갖는 샘플(탈출(escape) 샘플)에 대해서는, 탈출 팔레트 인덱스가 매핑될 수 있다. 탈출 팔레트 인덱스는 탈출 샘플(탈출 심볼)을 지시하며, 팔레트 테이블 내에서 가장 큰 값을 가질 수 있다. 일 예에서, 현재 블록이 탈출 샘플을 포함하는지 여부는 탈출 샘플 플래그(e.g. palette_escape_val_present_flag)를 이용하여 시그널링될 수 있다. 예를 들어, 제1 값(e.g. 0)을 갖는 palette_escape_val_present_flag는 현재 블록이 탈출 샘플을 포함하지 않음을 나타낼 수 있다. 이와 달리, 제2 값(e.g. 1)을 갖는 palette_escape_val_present_flag는 현재 블록이 탈출 샘플을 포함함을 나타낼 수 있다.
팔레트 인덱스 맵에 관한 팔레트 인덱스 예측 정보는 비트스트림을 통해 시그널링될 수 있다. 팔레트 인덱스 예측 정보는 현재 블록에 매핑된 적어도 하나의 팔레트 인덱스 및 팔레트 인덱스의 런-값 정보를 포함할 수 있다. 팔레트 인덱스의 런-값은 현재 블록에 동일한 값으로 연속적으로 매핑된 팔레트 인덱스들의 개수에서 1을 차감한 값을 나타낼 수 있다. 예를 들어, 현재 블록이 소정의 스캔 방향(e.g. 수평 방향)을 따라 연속적으로 존재하는 제1 내지 제4 샘플들을 포함하고, 상기 제1 내지 제3 샘플들 각각에는 제1 팔레트 인덱스(e.g. 0)가 매핑되며 상기 제4 샘플에는 제2 팔레트 인덱스(e.g. 1)가 매핑된 경우, 상기 제1 팔레트 인덱스의 런-값은 2이고, 상기 제2 팔레트 인덱스의 런-값은 0일 수 있다. 현재 블록이 탈출 샘플(탈출 심볼)을 포함하는 경우(e.g. palette_escape_val_present_flag=1), 팔레트 인덱스 예측 정보는 탈출 샘플에 매핑된 탈출 팔레트 인덱스의 런-값 정보를 포함할 수 있다.
팔레트 인덱스 예측 정보에 기반하여, 복호화 대상인 현재 블록에 대한 팔레트 인덱스 맵이 생성될 수 있다. 예를 들어, 팔레트 인덱스 예측 정보로부터 획득되는 하나 이상의 팔레트 인덱스들 각각을 현재 블록 내의 복수의 샘플들 각각에 매핑함으로써, 현재 블록에 대한 팔레트 인덱스 맵이 생성될 수 있다. 일 예에서, 팔레트 인덱스 예측 정보로부터 획득되는 하나 이상의 팔레트 인덱스들 중에서 (매핑 순서상) 마지막 팔레트 인덱스에 기반하여, 상기 하나 이상의 팔레트 인덱스들 각각의 값은 조정될 수 있다. 예를 들어, 팔레트 인덱스 예측 정보로부터 획득되는 마지막 팔레트 인덱스가 탈출 팔레트 인덱스인 경우, 팔레트 인덱스 예측 정보로부터 획득되는 하나 이상의 팔레트 엔트리들은 소정의 크기(e.g. 1) 만큼 증가된 값으로 현재 블록에 매핑될 수 있다.
현재 블록은 팔레트 인덱스 맵에 기반하여 부호화/복호화될 수 있다. 현재 블록 내의 복수의 샘플들 중에서, 팔레트 테이블에 정의된 대표 컬러값과 동일 또는 유사한 픽셀값을 갖는 샘플에 대해서는, 해당 대표 컬러값을 지시하는 팔레트 인덱스의 값이 비트스트림을 통해 시그널링될 수 있다. 이와 달리, 현재 블록 내의 복수의 샘플들 중에서, 팔레트 테이블에 정의된 대표 컬러값과 비유사한 픽셀값을 갖는 샘플에 대해서는, 해당 샘플의 양자화된 픽셀값이 비트스트림을 통해 직접 시그널링될 수 있다.
현재 블록에 매핑된 팔레트 인덱스들을 부호화하기 위하여, 소정의 스캔 방식을 이용하여 팔레트 인덱스 맵을 스캔할 수 있다. 또한, 비트스트림으로부터 획득된 팔레트 인덱스들을 이용하여 팔레트 인덱스 맵을 구성하기 위하여, 소정의 스캔 방식을 이용하여 현재 블록을 스캔할 수 있다.
도 15는 팔레트 모드에서 이용될 수 있는 스캔 방식의 일 예를 나타내는 도면이다.
도 15를 참조하면, 팔레트 모드에서 이용될 수 있는 스캔 방식은 수평 트래버스 스캔(horizontal traverse scan) 및 수직 트래버스 스캔(vertical traverse scan)을 포함할 수 있다. 수평 트래버스 스캔은 현재 블록(또는, 팔레트 인덱스 맵)의 홀수 번째 행(row)은 왼쪽에서 오른쪽으로 스캔하고, 현재 블록의 짝수 번째 행은 오른쪽에서 왼쪽으로 스캔하는 방식을 의미할 수 있다. 또한, 수직 트래버스 스캔은 현재 블록의 홀수 번째 열(column)은 위쪽에서 아래쪽으로 스캔하고, 현재 블록의 짝수 번째 열은 아래쪽에서 위쪽으로 스캔하는 방식을 의미할 수 있다.
팔레트 모드에서 이용될 수 있는 스캔 방식에 관한 정보는 소정의 플래그(e.g. palette_transpose_flag)를 이용하여 시그널링될 수 있다. 예를 들어, 현재 블록의 팔레트 부호화를 위하여 수평 트래버스 스캔이 이용된 경우, 제1 값(e.g. 0)을 갖는 palette_transpose_flag가 비트스트림을 통해 시그널링될 수 있다. 이와 달리, 현재 블록의 팔레트 부호화를 위하여 수직 트래버스 스캔이 이용된 경우, 제2 값(e.g. 1)을 갖는 palette_transpose_flag가 비트스트림을 통해 시그널링될 수 있다.
현재 블록 내의 각각의 샘플에 매핑된 팔레트 인덱스들은 'INDEX' 모드와 'COPY_ABOVE' 모드를 이용하여 부호화될 수 있다. 본 개시에서, 'INDEX' 모드와 'COPY_ABOVE' 모드를 팔레트 샘플 모드라고 지칭할 수 있다.
수평 트래버스 스캔에서 현재 블록의 가장 위쪽의 행, 수직 트래버스 스캔에서 현재 블록의 가장 왼쪽의 열, 및 직전 팔레트 샘플 모드가 'COPY_ABOVE'인 경우를 제외하고, 팔레트 샘플 모드에 대한 정보는 소정의 플래그(e.g. copy_above_palette_indices_flag)를 이용하여 시그널링될 수 있다. 예를 들어, 제1 값(e.g. 0)을 갖는 copy_above_palette_indices_flag는 현재 블록에 매핑된 소정의 팔레트 인덱스가 'INDEX' 모드를 이용하여 부호화됨을 나타낼 수 있다. 이와 달리, 제2 값(e.g. 1)을 갖는 copy_above_palette_indices_flag는 현재 블록에 매핑된 소정의 팔레트 인덱스가 'COPY_ABOVE' 모드를 이용하여 부호화됨을 나타낼 수 있다.
‘INDEX' 모드에서, 팔레트 인덱스의 값은 명시적으로 비트스트림을 통해 시그널링될 수 있다. 'INDEX' 모드와 'COPY_ABOVE' 모드에서, 동일한 팔레트 샘플 모드를 이용하여 연속적으로 부호화된 샘플들의 개수를 나타내는 런-값 정보가 비트스트림을 통해 시그널링될 수 있다.
팔레트 인덱스 맵에 포함된 팔레트 인덱스들은 다음과 같은 순서로 부호화될 수 있다.
먼저, 현재 블록(또는, 현재 CU)에 매핑된 팔레트 인덱스들의 개수가 시그널링될 수 있다. 다음으로, 고정 길이 코딩(fixed length coding)을 이용하여 상기 팔레트 인덱스들 각각의 값이 시그널링될 수 있다. 일 예에서, 팔레트 인덱스들의 개수 및 팔레트 인덱스들 각각의 값은 바이패스 모드를 이용하여 부호화될 수 있다. 이를 통해, 팔레트 인덱스와 관련된 바이패스 빈들이 그룹핑될 수 있다. 그리고, 팔레트 샘플 모드에 관한 정보(e.g. copy_above_palette_indices_flag) 및 팔레트 샘플 모드의 런-값 정보가 인터리빙 방식으로 시그널링될 수 있다. 마지막으로, 현재 블록 내의 탈출 샘플에 대응되는 컴포넌트 탈출 값이 그룹핑되어 바이패스 모드로 부호화될 수 있다. 일 예에서, 팔레트 인덱스들 각각의 값이 시그널링된 이후에, 적어도 하나의 부가적인 신택스 요소(e.g. last_run_type_flag)가 추가적으로 시그널링될 수 있다. 이 경우, 팔레트 인덱스들의 개수 및 부가적인 신택스 요소에 기반하여, 현재 블록 내 마지막 런에 대응되는 런-값에 대한 시그널링 과정은 스킵될 수 있다.
도 16은 현재 블록의 팔레트 부호화 과정의 일 예를 나타내는 도면이다.
도 16을 참조하면, 현재 블록 내의 복수의 픽셀들(샘플들)은 총 3개의 컬러값들을 이용하여 표현될 수 있다(S1610). 예를 들어, 제1 픽셀들(PX1)은 제1 컬러값을 갖고, 제2 픽셀들(PX2)은 제2 컬러값을 가지며, 제3 픽셀들(PX3)은 제3 컬러값을 가질 수 있다.
현재 블록에 팔레트 모드가 적용되는 경우, 현재 블록에 대한 팔레트 테이블이 구성될 수 있다(S1620). 팔레트 테이블은 각각의 컬러 컴포넌트(e.g. (G, B, R), (Y, Cb, Cr) 등)에 대한 팔레트 엔트리들(대표 컬러값)과 각각의 팔레트 엔트리를 식별하기 위한 팔레트 인덱스(e.g. 0, 1)를 포함할 수 있다. 또한, 팔레트 테이블은 탈출(escape) 팔레트 인덱스(e.g. 2)를 더 포함할 수 있다. 탈출 팔레트 인덱스는 현재 블록 내의 복수의 픽셀들 중에서 팔레트 테이블에 정의된 대표 컬러값과 비유사한 픽셀값을 갖는 탈출 샘플(또는, 탈출 심볼)에 매핑될 수 있다. 탈출 팔레트 인덱스가 매핑된 탈출 샘플에 대해서는, 탈출 샘플의 양자화된 픽셀값이 시그널링될 수 있다.
현재 블록 내의 복수의 샘플들 각각의 픽셀값과 대표 컬러값 사이의 유사성에 기반하여, 상기 복수의 샘플들 각각에 팔레트 테이블 내의 소정의 팔레트 인덱스를 매핑함으로써, 현재 블록에 대한 팔레트 인덱스 맵이 생성될 수 있다(S1630). 예를 들어, 제1 픽셀들(PX1) 각각에 대해서는 제1 팔레트 인덱스(e.g. 0)를 매핑하고, 제2 픽셀들(PX2) 각각에 대해서는 제2 팔레트 인덱스(e.g. 1)를 매핑하며, 탈출 샘플인 제3 픽셀(PX3)에 대해서는 탈출 팔레트 인덱스(e.g. 2)를 매핑함으로써, 현재 블록에 대한 팔레트 인덱스 맵이 생성될 수 있다.
팔레트 인덱스 맵을 부호화하기 위하여, 소정의 스캔 방식에 따라 팔레트 인덱스 맵에 포함된 팔레트 인덱스들을 스캔함으로써, 현재 블록 내의 복수의 샘플들 각각의 팔레트 샘플 모드 및 팔레트 샘플 모드의 런-값을 도출할 수 있다(S1640, S1650). 예를 들어, 수평 트래버스 스캔에서, 팔레트 인덱스 맵의 3번째 행에 연속적으로 매핑된 팔레트 인덱스들 '1, 0, 1, 1, 1'은, 팔레트 인덱스 맵의 2번째 행의 동일한 위치에 존재하는 팔레트 인덱스들과 동일한 인덱스 값을 가지므로 'COPY_ABOVE' 모드로 부호화될 수 있으며, 상기 'COPY_ABOVE' 모드의 런-값은 4일 수 있다(S1640). 또한, 수평 트래버스 스캔에서, 팔레트 인덱스 맵의 2번째 행에 연속적으로 매핑된 팔레트 인덱스들 '1, 1, 1'은, 팔레트 인덱스 맵의 첫번째 행의 동일한 위치에 존재하는 팔레트 인덱스들과 상이한 인덱스 값을 가지므로 'INDEX' 모드로 부호화될 수 있으며, 상기 'INDEX' 모드의 런-값은 2일 수 있다(S1650). 한편, 탈출 샘플인 제3 픽셀(PX3)에 매핑된 탈출 팔레트 인덱스(e.g. 2)는 'INDEX' 모드로 부호화될 수 있다.
이와 같이, 현재 블록에 팔레트 모드가 적용되는 경우, 현재 블록 내의 복수의 샘플들 각각에는 팔레트 테이블 내의 소정의 팔레트 인덱스가 매핑되어 팔레트 인덱스 맵이 생성되며, 팔레트 인덱스 맵에 포함된 팔레트 인덱스는 소정의 스캔 방식에 따라 'INDEX' 모드 또는 'COPY_ABOVE' 모드로 부호화될 수 있다.
이하, 팔레트 모드를 위한 신택스 요소들을 설명한다.
도 17은 팔레트 모드를 위한 coding_unit 신택스의 일부를 나타내는 도면이고, 도 18a 내지 도 18e는 팔레트 모드를 위한 palette_coding 신택스를 나타내는 도면들이다. 팔레트 모드를 위한 신택스 요소는 도 17, 및 도 18a 내지 도 18e와 같이 부호화되어 비트스트림을 통해 시그널링될 수 있다.
먼저 도 17을 참조하면, 팔레트 모드 플래그 pred_mode_plt_flag는 현재 블록(또는, 현재 CU)에 대해 팔레트 모드가 적용되는지 여부를 나타낼 수 있다. 예를 들어, pred_mode_plt_flag의 제1 값(e.g. 0)은 현재 블록에 대해 팔레트 모드가 적용되지 않음을 나타낼 수 있다. 이와 달리, pred_mode_plt_flag의 제2 값(e.g. 1)은 현재 블록에 대해 팔레트 모드가 적용됨을 나타낼 수 있다. pred_mode_plt_flag가 비트스트림으로부터 획득되지 않는 경우, pred_mode_plt_flag의 값은 제1 값으로 결정될 수 있다.
도 18a를 참조하면, 파라미터 PredictorPaletteSize[startComp]는 현재 블록에 대한 팔레트 테이블(현재 팔레트 테이블)의 첫번째 컬러 컴포넌트 startComp를 위한 팔레트 예측자의 크기를 나타낼 수 있다.
또한, 파라미터 PalettePredictorEntryReuseFlags[i]는 팔레트 예측자 내의 i번째 팔레트 엔트리가 현재 팔레트 테이블에 포함되는지 여부(즉, 재사용 여부)를 나타낼 수 있다. 예를 들어, 제1 값(e.g. 0)을 갖는 PalettePredictorEntryReuseFlags[i]는 팔레트 예측자의 i번째 팔레트 엔트리가 현재 팔레트 테이블에서 재사용되지 않음을 나타낼 수 있다. 이와 달리, 제2 값(e.g. 1)을 갖는 PalettePredictorEntryReuseFlags[i]는 팔레트 예측자의 i번째 팔레트 엔트리가 현재 팔레트 테이블에서 재사용됨을 나타낼 수 있다. 일 예에서, PalettePredictorEntryReuseFlags[i]의 초기값은 0으로 설정될 수 있다.
또한, 파라미터 palette_predictor_run은 PalettePredictorEntryReuseFlags 배열에서 0이 아닌 팔레트 엔트리보다 앞서 존재하는 0의 개수를 나타낼 수 있다.
또한, 파라미터 num_signalled_palette_entries는 현재 팔레트 테이블의 첫번째 컬러 컴포넌트 startComp를 위하여 명시적으로 시그널링되는 현재 팔레트 테이블 내의 팔레트 엔트리의 개수를 나타낼 수 있다. num_signalled_palette_entries가 비트스트림으로부터 획득되지 않는 경우, num_signalled_palette_entries의 값은 0으로 추론될 수 있다.
도 18b를 참조하면, 파라미터 CurrentPaletteSize[startComp]는 현재 팔레트 테이블의 첫번째 컬러 컴포넌트 startComp를 위한 현재 팔레트 테이블의 크기를 나타낼 수 있다. CurrentPaletteSize[startComp]의 값은 아래의 수학식 2와 같이 산출될 수 있다. 일 예에서, CurrentPaletteSize[startComp]는 0에서 palette_max_size 사이의 값을 가질 수 있다.
Figure PCTKR2020012898-appb-M000002
또한, 파라미터 new_palette_entries[cIdx][i]는 컬러 컴포넌트 cIdx에 대하여 i번째로 시그널링되는 새로운 팔레트 엔트리의 값을 나타낼 수 있다.
또한, 파라미터 PredictorPaletteEntries[cIdx][i]는 컬러 컴포넌트 cIdx에 대한 팔레트 예측자에 있어서 i번째 팔레트 엔트리를 나타낼 수 있다.
또한, 파라미터 CurrentPaletteEntries[cIdx][i]는 컬러 컴포넌트 cIdx에 대한 현재 팔레트 테이블에 있어서 i번째 팔레트 엔트리를 나타낼 수 있다.
또한, 파라미터 palette_escape_val_present_flag는 탈출 샘플(탈출 심볼)의 존재 여부를 나타낼 수 있다. 예를 들어, 제1 값(e.g. 0)을 갖는 palette_escape_val_present_flag는 현재 블록이 탈출 샘플을 포함하지 않음을 나타낼 수 있다. 이와 달리, 제2 값(e.g. 1)을 갖는 palette_escape_val_present_flag는 현재 블록이 적어도 하나의 탈출 샘플을 포함함을 나타낼 수 있다. palette_escape_val_present_flag가 비트스트림으로부터 획득되지 않는 경우, palette_escape_val_present_flag의 값은 1로 추론될 수 있다.
또한, 파라미터 MaxPaletteIndex는 현재 팔레트 테이블에서 팔레트 인덱스의 최대값을 나타낼 수 있다. MaxPaletteIndex의 값은 아래의 수학식 3과 같이 산출될 수 있다.
Figure PCTKR2020012898-appb-M000003
또한, 파라미터 num_palette_indices_minus1은 현재 블록의 팔레트 부호화 과정에서 시그널링되는 팔레트 인덱스들의 개수에서 1을 차감한 값을 나타낼 수 있다. num_palette_indices_minus1이 비트스트림으로부터 획득되지 않는 경우, num_palette_indices_minus1의 값은 0으로 추론될 수 있다.
또한, 파라미터 palette_idx_idc는 현재 팔레트 테이블 CurrentPaletteEntries에 대한 팔레트 인덱스의 지시자일 수 있다. palette_idx_idc는 해당 블록의 첫번째 팔레트 인덱스에 대하여 0에서 MaxPaletteIndex 사이의 값을 가질 수 있고, 해당 블록의 나머지 팔레트 인덱스들에 대하여 0에서 MaxPaletteIndex-1 사이의 값을 가질 수 있다. palette_idx_idc의 값이 비트스트림으로부터 획득되지 않는 경우, palette_idx_idc의 값은 0으로 추론될 수 있다.
또한, 파라미터 PaletteIndexIdc[i]는 i번째 palette_idx_idc를 나타낼 수 있다. 일 예에서, 배열 PaletteIndexIdc의 모든 값들은 0으로 초기화될 수 있다.
또한, 파라미터 copy_above_indices_for_final_run_flag는 현재 블록 내 마지막 위치의 팔레트 인덱스가 이전의 팔레트 인덱스로부터 복사된 것인지 여부를 나타낼 수 있다. 예를 들어, 제1 값(e.g. 0)을 갖는 copy_above_indices_for_final_run_flag는 현재 블록 내 마지막 위치의 팔레트 인덱스가 PaletteIndexIdc[ num_palette_indices_minus1 ]로부터 복사된 것임을 나타낼 수 있다. 이와 달리, 제2 값(e.g 1)을 갖는 copy_above_indices_for_final_run_flag는 현재 블록 내 마지막 위치의 팔레트 인덱스가 주변 샘플의 팔레트 인덱스로부터 복사된 것임을 나타낼 수 있다. 수직 트래버스 스캔이 이용되는 경우, 주변 샘플은 현재 샘플의 왼쪽 열(column)에서 현재 샘플과 동일한 위치에 존재하는 샘플일 수 있다. 수평 트래버스 스캔이 이용되는 경우, 주변 샘플은 현재 샘플의 위쪽 행(row)에서 현재 샘플과 동일한 위치에 존재하는 샘플일 수 있다. copy_above_indices_for_final_run_flag가 비트스트림으로부터 획득되지 않는 경우, copy_above_indices_for_final_run_flag의 값은 0으로 추론될 수 있다.
또한, 파라미터 palette_transpose_flag는 현재 블록(또는, 팔레트 인덱스 맵)의 스캔 방식을 나타낼 수 있다. 예를 들어, 제1 값(e.g. 0)을 갖는 palette_transpose_flag는 현재 블록에 대하여 수평 트래버스 스캔이 적용됨을 나타낼 수 있다. 이와 달리, 제2 값(e.g. 1)을 갖는 palette_transpose_flag는 현재 블록에 대하여 수직 트래버스 스캔이 적용됨을 나타낼 수 있다. palette_transpose_flag이 비트스트림에서 획득되지 않는 경우, palette_transpose_flag의 값은 0으로 추론될 수 있다.
도 18c를 참조하면, 파라미터 copy_above_palette_indices_flag는 현재 블록 내의 현재 샘플에 대한 부호화 모드(팔레트 샘플 모드)를 나타낼 수 있다. 예를 들어, 제1 값(e.g. 0)을 갖는 copy_above_palette_indices_flag는 현재 샘플에 매핑된 팔레트 인덱스가 'INDEX' 모드로 부호화됨을 나타낼 수 있다. 이와 달리, 제2 값(e.g. 1)을 갖는 copy_above_palette_indices_flag는 현재 샘플에 매핑된 팔레트 인덱스가 'COPY_ABOVE' 모드로 부호화됨을 나타낼 수 있다.
또한, 파라미터 CopyAboveIndicesFlag[xC][yC]는 현재 블록 내의 복수의 샘플들 각각에 대한 부호화 모드를 나타낼 수 있다. 즉, CopyAboveIndicesFlag는 현재 블록 내의 복수의 샘플들 각각에 대한 copy_above_palette_indices_flag의 배열일 수 있다. 여기서, xC 및 yC는 현재 픽처의 좌상단 샘플로부터의 현재 샘플의 상대적 위치를 나타내는 좌표 지시자일 수 있다.
CopyAboveIndicesFlag[xC][yC]가 제1 값(e.g. 0)을 갖는 경우, PaletteRunMinus1은 'COPY_ABOVE' 모드를 이용하여 연속적으로 부호화된 팔레트 인덱스들의 개수에서 1을 차감한 값을 나타낼 수 있다. 이와 달리, CopyAboveIndicesFlag[xC][yC]가 제2 값(e.g. 1)을 갖는 경우, PaletteRunMinus1은 'INDEX' 모드를 이용하여 연속적으로 부호화된 팔레트 인덱스들의 개수에서 1을 차감한 값을 나타낼 수 있다.
도 18d를 참조하면, 파라미터 PaletteIndexMap[xC][yC]은 현재 블록에 대한 팔레트 인덱스 맵을 나타낼 수 있다. 즉, PaletteIndexMap은 현재 블록 내의 복수의 샘플들 각각에 대한 CurrentPaletteEntries의 배열일 수 있다. 여기서, xC 및 yC는 현재 픽처의 좌상단 샘플로부터의 현재 샘플의 상대적 위치를 나타내는 좌표 지시자일 수 있다. 일 예에서, PaletteIndexMap[xC][yC]는 0에서 (MaxPaletteIndex - 1) 사이의 값을 가질 수 있다.
또한, 파라미터 PaletteMaxRunMinus1은 PaletteRunMinus1의 최대값을 나타낼 수 있다. 일 예에서, PaletteMaxRunMinus1은 0 보다 큰 값을 가질 수 있다.
또한, 파라미터 palette_run_prefix는 PaletteRunMinus1의 이진화에 사용되는 프리픽스 부분을 나타낼 수 있다.
또한, 파라미터 palette_run_suffix는 PaletteRunMinus1의 이진화에 사용되는 서픽스 부분을 나타낼 수 있다. palette_run_suffix가 비트스트림으로부터 획득되지 않는 경우, palette_run_suffix의 값은 0으로 추론될 수 있다.
일 예에서, PaletteMaxRunMinus1의 값이 0이면, PaletteRunMinus1의 값은 0으로 설정될 수 있다. 이와 달리, PaletteMaxRunMinus1이 0보다 크면, PaletteRunMinus1은 palette_run_prefix의 값에 기반하여 설정될 수 있다. 예를 들어, palette_run_prefix의 값이 2보다 작은 경우, PaletteRunMinus1의 값은 아래의 수학식 4와 같이 설정될 수 있다.
Figure PCTKR2020012898-appb-M000004
palette_run_prefix의 값이 2 이상인 경우, PaletteRunMinus1의 값은 아래의 수학식 5와 같이 산출될 수 있다.
Figure PCTKR2020012898-appb-M000005
도 18e를 참조하면, 파라미터 palette_escape_val은 현재 블록 내의 탈출 샘플의 양자화된 픽셀값을 나타낼 수 있다.
또한, 파라미터 PaletteEscapeVal[cIdx][xC][yC]는, PaletteIndexMap[xC][yC]의 값이 MaxPaletteIndex이고 palette_escape_val_present_flag의 값이 1인, 탈출 샘플의 양자화된 픽셀값을 나타낼 수 있다. 여기서, cIdx는 컬러 컴포넌트를 나타내고, xC 및 yC는 현재 픽처의 좌상단 샘플로부터의 현재 샘플의 상대적인 위치를 나타내는 좌표 지시자일 수 있다.
이하, 로컬 듀얼 트리 구조를 갖는 현재 블록에 대하여 팔레트 모드를 적용하는 방법에 대해 설명한다.
로컬 듀얼 트리 구조를 갖는 현재 블록에 대한 팔레트 모드 적용
도 19는 로컬 듀얼 트리 구조를 갖는 CU의 일 예를 나타내는 도면이다.
도 19를 참조하면, 현재 CU는 루마 성분 및 크로마 성분 각각에 대해 쿼드트리 구조로 분할될 수 있다. 예를 들어, 4:2:0 컬러 포맷을 갖는 현재 CU에서, 16x16 루마 블록이 쿼드트리 분할되어, 각각 8x8 크기를 갖는 제1 내지 제4 루마 블록들(1911 내지 1914)이 생성될 수 있다. 또한, 8x8 크로마 블록이 쿼드트리 분할되어, 각각 4x4 크기를 갖는 제1 내지 제4 크로마 블록들(1921 내지 1924)이 생성될 수 있다. 이 경우, 제1 크로마 블록(1921)은 제1 루마 블록(1911)에 대응하고, 제2 크로마 블록(1922)은 제2 루마 블록(1912)에 대응하며, 제3 크로마 블록(1923)은 제3 루마 블록(1913)에 대응하고, 제4 크로마 블록(1924)은 제4 루마 블록(1914)에 대응할 수 있다.
크로마 블록의 최소 크기가 16개 이상의 크로마 샘플들을 포함하도록 제한된 경우, 제1 내지 제4 크로마 블록들(1921 내지 1924)에 대한 추가적인 분할은 금지될 수 있다. 이에 반해, 부호화 효율을 향상시키기 위하여, 제1 내지 제4 루마 블록들(1911 내지 1914)에 대한 추가적인 분할은 허용될 수 있다. 이에 따라, 제3 루마 블록(1913)이 수직 바이너리 분할되어, 각각 4x8 크기를 갖는 두 개의 루마 블록들(1913-1, 1913-2)이 생성될 수 있다. 이 경우, 제3 루마 블록(1913)의 분할 구조를 듀얼 트리 루마(DUAL_TREE_LUMA)라고 지칭할 수 있고, 제3 크로마 블록(1923)의 분할 구조를 듀얼 트리 크로마(DUAL_TREE_CHROMA)라고 지칭할 수 있다. 또한, 현재 CU를 분할하여 생성되는 복수의 하위 CU들 중에서, 제3 루마 블록(1913) 및 제3 크로마 블록(1923)을 포함하는 하위 CU만이 듀얼 트리 구조를 갖게 되므로, 상기 하위 CU의 분할 구조를 로컬 듀얼 트리 구조라고 지칭할 수 있다. 이 경우, 현재 CU에 대한 복호화 과정의 일 예는 도 20에 도시된 바와 같다.
도 20은 도 19의 예에서 현재 CU에 대한 복호화 과정의 일 예를 나타내는 도면이다.
싱글 트리 구조를 갖는 하위 CU의 루마 블록 및 크로마 블록은 동일한 예측 모드(e.g. 인트라 예측 모드, IBC, 팔레트 모드, 인터 예측 모드 등)에 기반하여 복호화될 수 있다. 이에 반해, 듀얼 트리 구조를 갖는 하위 CU의 루마 블록 및 크로마 블록은 다양한 예측 모드의 조합에 기반하여 개별적으로 복호화될 수 있다. 예를 들어, 듀얼 트리 구조를 갖는 하위 CU의 루마 블록 및 크로마 블록은 동일한 예측 모드를 이용하여 복호화될 수도 있고, 또는 서로 다른 예측 모드를 이용하여 복호화될 수도 있다.
도 20에서는, 싱글 트리 구조를 갖는 하위 CU와 듀얼 트리 구조를 갖는 하위 CU를 구별하기 위하여, 싱글 트리 구조를 갖는 하위 CU에 대해서는 루마 블록만을 도시하고, 듀얼 트리 구조를 갖는 하위 CU에 대해서는 루마 블록 및 크로마 블록을 모두 도시한다. 또한, 싱글 트리 구조를 갖는 하위 CU에 대해서는, 루마 블록을 기준으로 복호화 과정을 설명하기로 한다.
도 20을 참조하면, 싱글 트리 구조를 갖는 제1 루마 블록(1911)은 인터 예측 모드를 이용하여 복호화될 수 있다. 또한, 싱글 트리 구조를 갖는 제2 루마 블록(1912)은 팔레트 모드를 이용하여 복호화될 수 있다. 또한, 싱글 트리 구조를 갖는 제4 루마 블록(1914)은 팔레트 모드를 이용하여 복호화될 수 있다. 이와 달리, 듀얼 트리 구조를 갖는 제3-1 루마 블록(1913-1)은 팔레트 모드를 이용하여 복호화되고, 제3-2 루마 블록(1913-2)은 인트라 모드를 이용하여 복호화되며, 제3 크로마 블록(1923)은 팔레트 모드를 이용하여 복호화될 수 있다.
제1 내지 제4 루마 블록들(1911 내지 1914)에 대한 복호화 과정은 순차적으로 수행될 수 있다. 또한, 제3-1 루마 블록(1913-1) 및 제3-2 루마 블록(1913-2)에 대한 복호화 과정과 제3 크로마 블록(1923)에 대한 복호화 과정은 병렬적으로 또는 소정의 순서에 따라 순차적으로 수행될 수 있다.
제2 루마 블록(1912)에 대한 팔레트 복호화가 수행되는 경우, 전술한 바와 같이 루마 성분 및 크로마 성분 각각에 대한 팔레트 엔트리와 상기 팔레트 엔트리를 식별하기 위한 팔레트 인덱스를 포함하는 하나의 팔레트 예측자가 구성될 수 있다. 그리고, 팔레트 예측자는 다음 팔레트 복호화를 위하여 제2 루마 블록(1912)에 적용된 팔레트 엔트리를 이용하여 업데이트될 수 있다(S2010)
제2 루마 블록(1912)에 대한 팔레트 복호화가 완료된 경우, 단계 S2010에서 업데이트된 팔레트 예측자를 이용하여, 제3-1 루마 블록(1913-1) 및 제3 크로마 블록(1923)에 대한 팔레트 복호화가 개별적으로 수행될 수 있다.
제3-1 루마 블록(1913-1)에 대한 팔레트 예측자는, 단계 S2010에서 업데이트된 팔레트 예측자에서 루마 성분에 대한 팔레트 엔트리 및 상기 팔레트 엔트리를 식별하기 위한 팔레트 인덱스만을 포함할 수 있다(S2020). 제3-1 루마 블록(1913-1)에 대한 팔레트 예측자를 루마 팔레트 예측자라고 지칭할 수 있다. 그리고, 제3-1 루마 블록(1913-1)에 대한 팔레트 복호화가 완료된 경우, 상기 루마 팔레트 예측자는 제3-1 루마 블록(1913-1)에 적용된 팔레트 엔트리를 이용하여 업데이트될 수 있다(S2030).
제3 크로마 블록(1923)에 대한 팔레트 예측자는, 단계 S2010에서 업데이트된 팔레트 예측자에서 크로마 성분에 대한 팔레트 엔트리 및 상기 팔레트 엔트리를 식별하기 위한 팔레트 인덱스만을 포함할 수 있다(S2040). 제3 크로마 블록(1923)에 대한 팔레트 예측자를 크로마 팔레트 예측자라고 지칭할 수 있다. 그리고, 제3 크로마 블록(1923)에 대한 팔레트 복호화가 완료된 경우, 상기 크로마 팔레트 예측자는 제3 크로마 블록(1923)에 적용된 팔레트 엔트리를 이용하여 업데이트될 수 있다(S2050).
제3-2 루마 블록(1913-2)에 대한 복호화가 수행된 이후에, 제4 루마 블록(1914)에 대한 팔레트 복호화가 수행될 수 있다.
제4 루마 블록(1914)에 대한 팔레트 예측자는, 단계 S2030에서 업데이트된 루마 팔레트 예측자 및 단계 S2050에서 업데이트된 크로마 팔레트 예측자를 결합함으로써 구성될 수 있다(S2060). 즉, 제4 루마 블록(1914)에 대한 팔레트 예측자는, 제3-1 루마 블록(1913-1)에 대한 루마 성분의 팔레트 엔트리 및 제3 크로마 블록(1923)에 대한 크로마 성분의 팔레트 엔트리와, 각각의 팔레트 엔트리를 식별하기 위한 팔레트 인덱스를 포함할 수 있다. 이 경우, 제4 루마 블록(1914)에 대한 팔레트 예측자의 크기(즉, 팔레트 엔트리의 개수)는 루마 성분의 팔레트 엔트리의 개수를 기준으로 결정될 수 있다. 예를 들어, 단계 S2030에서 업데이트된 루마 팔레트 예측자의 크기가 N이고(N은 0 보다 큰 정수), 단계 S2050에서 업데이트된 크로마 팔레트 예측자의 크기가 M인 경우(M은 0 보다 큰 정수), 제4 루마 블록(1914)에 대한 팔레트 예측자의 크기는 N으로 결정될 수 있다. 이러한 특성으로 인하여, 팔레트 예측자는 유효하지 않은(invalid) 팔레트 엔트리를 포함하게 되거나, 또는 유효한(valid) 팔레트 엔트리를 포함하지 못하게 되는 문제가 발생할 수 있다. 도 21 및 도 22는 도 20의 예에서 로컬 듀얼 트리 구조를 갖는 하위 CU에 팔레트 모드를 적용할 경우 발생되는 문제들을 설명하기 위한 도면들이다.
먼저 도 21을 참조하면, 로컬 듀얼 트리 구조를 갖는 제3-1 루마 블록(1913-1)에 대한 팔레트 복호화 결과로서 업데이트된 루마 팔레트 예측자(2110)는, 루마 성분(e.g. Y 성분)에 대하여, 예를 들어 9개의 팔레트 엔트리들(대표 컬러값들)을 포함할 수 있다. 또한, 듀얼 트리 구조를 갖는 제3 크로마 블록(1923)에 대한 팔레트 복호화 결과로서 업데이트된 크로마 팔레트 예측자(2120)는, 크로마 성분(e.g. Cb 성분 및 Cr 성분) 각각에 대하여, 예를 들어 2개의 팔레트 엔트리들을 포함할 수 있다.
그리고, 제3-1 루마 블록(1913-1) 및 제3 크로마 블록(1923)에 대한 개별적인 팔레트 복호화가 수행된 이후에, 싱글 트리 구조를 갖는 제4 루마 블록(1914)에 대한 팔레트 복호화가 수행될 수 있다. 이 경우, 제4 루마 블록(1914)에 대한 팔레트 예측자(2130)는, 상기 루마 팔레트 예측자(2110) 및 상기 크로마 팔레트 예측자(2120)를 상기 루마 팔레트 예측자(2110)의 크기를 기준으로 결합함으로써 구성될 수 있다. 구체적으로, 상기 루마 팔레트 예측자(2110)의 크기는 9이고(e.g. PredictorPaletteSize[0]=9), 상기 크로마 팔레트 예측자(2120)의 크기는 각각의 크로마 성분(e.g. Cb 및 Cr)에 대하여 2이므로(e.g. PredictorPaletteSize[1]=2, PredictorPaletteSize[2]=2), 제4 루마 블록(1914)에 대한 팔레트 예측자(2130)의 크기는 9로 결정될 수 있다. 이와 같이 결정된 크기를 만족시키기 위하여, 제4 루마 블록(1914)에 대한 팔레트 예측자(2130)는 각각의 크로마 성분에 대하여 7개의 NULL 값을 갖는 팔레트 엔트리들(2131)을 포함할 수 있다. 그 결과, NULL 값을 갖는 팔레트 엔트리들(2131)을 저장하기 위한 불필요한 메모리 공간이 낭비되고 복호화 효율이 저하되는 문제가 발생할 수 있다.
다음으로 도 22를 참조하면, 로컬 듀얼 트리 구조를 갖는 제3-1 루마 블록(1913-1)에 대한 팔레트 복호화 결과로서 업데이트된 루마 팔레트 예측자(2210)는, 루마 성분(e.g. Y)에 대하여, 예를 들어 3개의 팔레트 엔트리들(대표 컬러값들)을 포함할 수 있다. 또한, 로컬 듀얼 트리 구조를 갖는 제3 크로마 블록(1923)에 대한 팔레트 복호화 결과로서 업데이트된 크로마 팔레트 예측자(2220)는, 각각의 크로마 성분(e.g. Cb 및 Cr)에 대하여, 예를 들어 5개의 팔레트 엔트리들을 포함할 수 있다.
그리고, 제3-1 루마 블록(1913-1) 및 제3 크로마 블록(1923)에 대한 개별적인 팔레트 복호화가 수행된 이후에, 싱글 트리 구조를 갖는 제4 루마 블록(1914)에 대한 팔레트 복호화가 수행될 수 있다. 이 경우, 제4 루마 블록(1914)에 대한 팔레트 예측자(2230)는, 상기 루마 팔레트 예측자(2210) 및 상기 크로마 팔레트 예측자(2220)를 상기 루마 팔레트 예측자(2210)의 크기를 기준으로 결합함으로써 구성될 수 있다. 구체적으로, 상기 루마 팔레트 예측자의 크기는 3이고(e.g. PredictorPaletteSize[0]=3), 상기 크로마 팔레트 예측자(2220)의 크기는 각각의 크로마 성분(e.g. Cb 및 Cr)에 대하여 5이므로(e.g. PredictorPaletteSize[1]=5, PredictorPaletteSize[2]=5), 제4 루마 블록(1914)에 대한 팔레트 예측자(2230)의 크기는 3으로 결정될 수 있다. 이와 같이 결정된 크기를 만족시키기 위하여, 상기 크로마 팔레트 예측자(2220)에 포함된 각각의 크로마 성분에 대한 마지막 2개의 유효한 팔레트 엔트리들(2221)은 버려질 수 있다. 그 결과, 제4 루마 블록(1914)에 대한 최적의 팔레트 테이블을 구성할 수 없게 되므로, 제4 루마 블록(1914)에 대한 팔레트 복호화 성능이 저하되는 문제가 발생할 수 있다.
도 21 및 도 22를 참조하여 설명한 문제들을 해결하기 위하여, 본 발명의 실시예들에 따른 영상 부호화/복호화 방법에 따르면, 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인지 여부에 기반하여, 팔레트 예측자를 업데이트하는 과정이 스킵되거나, 팔레트 모드가 선택적으로 적용될 수 있다.
이하, 첨부된 도면을 참조하여, 본 발명의 실시예들을 상세하게 설명하기로 한다.
실시예 #1
본 개시의 실시예 #1에 따르면, 로컬 듀얼 트리 구조를 갖는 현재 블록을 팔레트 부호화/복호화함에 있어서, 팔레트 예측자를 업데이트하는 과정은 현재 블록의 분할 구조에 기반하여 선택적으로 수행될 수 있다.
도 23은 본 개시의 일 실시예에 따른 팔레트 부호화 방법을 나타내는 흐름도이다.
도 23의 팔레트 부호화 방법은 도 2의 영상 부호화 장치에 의해 수행될 수 있다. 구체적으로, 단계 S2310 내지 단계 S2350은 인트라 예측부(165)에 의하여 수행될 수도 있고, 또는 인트라 예측부(165)와는 다른 별개의 기능 블록(e.g. 팔레트 인코딩부)에 의하여 수행될 수도 있다.
현재 블록에 팔레트 모드가 적용되는지 여부는, 현재 블록의 예측 모드 타입에 기반하여 결정될 수 있다. 예를 들어, 현재 블록의 예측 모드 타입이 인트라 예측, IBC(intra block copy), 팔레트 모드 및 인터 예측이 모두 적용될 수 있는 제1 모드 타입(e.g. MODE_TYPE_ALL)인 경우, 현재 블록에 팔레트 모드가 적용될 수 있다. 이와 달리, 현재 블록의 예측 모드 타입이 인트라 예측만이 적용될 수 있는 제2 모드 타입(e.g. MODE_TYPE_INTRA), 또는 인터 예측만이 적용될 수 있는 제3 모드 타입(e.g. MODE_TYPE_INTER)인 경우, 현재 블록에 팔레트 모드가 적용될 수 없다. 현재 블록에 팔레트 모드가 적용되는지 여부는 소정의 플래그(e.g. pred_mode_plt_flag)를 이용하여 시그널링될 수 있다. 예를 들어, 현재 블록에 팔레트 모드가 적용되지 않는 경우, 제1 값(e.g. 0)을 갖는 pred_mode_plt_flag가 시그널링될 수 있다. 이와 달리, 현재 블록에 팔레트 모드가 적용되는 경우, 제2 값(e.g. 1)을 갖는 pred_mode_plt_flag가 시그널링될 수 있다.
도 23을 참조하면, 현재 블록에 팔레트 모드가 적용되는 경우, 영상 부호화 장치는 현재 블록에 대한 팔레트 예측자 및 팔레트 테이블을 구성할 수 있다(S2310).
팔레트 예측자는 적어도 하나의 팔레트 엔트리(대표 컬러값) 및 각각의 팔레트 엔트리를 식별하기 위한 팔레트 인덱스를 포함할 수 있다. 현재 블록이 현재 CTU(또는, 슬라이스) 내에서 처음으로 팔레트 부호화되는 블록인 경우, 팔레트 예측자는 소정의 초기값(e.g. 0)을 가질 수 있다. 이와 달리, 현재 블록이 현재 CTU 내에서 처음으로 팔레트 부호화되는 블록이 아닌 경우, 팔레트 예측자는 현재 블록 이전의 팔레트 부호화 과정에서 이용된 적어도 하나의 팔레트 엔트리를 포함할 수 있다.
영상 부호화 장치는 팔레트 예측자에 기반하여 팔레트 테이블을 구성할 수 있다. 팔레트 테이블은 팔레트 예측자로부터 선택된 적어도 하나의 팔레트 엔트리와 각각의 팔레트 엔트리를 식별하기 위한 팔레트 인덱스를 포함할 수 있다.
일 예에서, 팔레트 예측자 및 팔레트 테이블은 현재 블록의 컬러 포맷(또는, 크로마 포맷)에 따라 다양하게 구성될 수 있다. 예를 들어, 현재 블록의 컬러 포맷이 표 2를 참조하여 전술한 모노크롬(monochrome) 포맷인 경우, 팔레트 예측자 및 팔레트 테이블은 현재 블록의 루마 성분에 대한 팔레트 엔트리만을 포함할 수 있다. 이와 달리, 현재 블록의 컬러 포맷이 표 2를 참조하여 전술한 4:2:0, 4:2:2 또는 4:4:4 포맷인 경우, 팔레트 예측자 및 팔레트 테이블은 현재 블록의 루마 성분 및 크로마 성분 각각에 대한 팔레트 엔트리를 포함할 수 있다.
일 예에서, 팔레트 예측자 및 팔레트 테이블은 현재 블록의 분할 구조에 따라 다양하게 구성될 수 있다. 예를 들어, 현재 블록이 싱글 트리 구조를 갖는 경우, 팔레트 예측자 및 팔레트 테이블은 현재 블록의 루마 성분 및 크로마 성분에 대해 공통적으로 적용되는 하나의 구성을 가질 수 있다. 이와 달리, 현재 블록이 듀얼 트리 구조를 갖는 경우, 팔레트 예측자 및 팔레트 테이블은 현재 블록의 루마 성분 및 크로마 성분 각각에 대해 개별적으로 적용되는 복수의 구성들을 가질 수 있다. 예를 들어, 현재 블록에 대한 팔레트 예측자는 루마 성분에 대한 루마 팔레트 예측자 및 크로마 성분에 대한 크로마 팔레트 예측자를 포함할 수 있다. 이 경우, 루마 팔레트 예측자에 포함되는 팔레트 엔트리의 개수는 크로마 팔레트 예측자에 포함되는 팔레트 엔트리의 개수는 서로 다를 수 있다.
영상 부호화 장치는 팔레트 테이블에 기반하여 현재 블록에 대한 팔레트 인덱스 맵을 생성할 수 있다(S2320).
팔레트 인덱스 맵은, 현재 블록 내의 각각의 샘플에 팔레트 테이블 내의 소정의 팔레트 인덱스를 매핑시킨 것을 의미할 수 있다. 예를 들어, 현재 블록 내의 복수의 샘플들 중에서, 팔레트 테이블에서 정의된 대표 컬러값과 동일 또는 유사한 픽셀값을 갖는 샘플에 대해서는, 해당 대표 컬러값을 지시하는 팔레트 인덱스가 매핑될 수 있다. 이와 달리, 현재 블록의 복수의 샘플들 중에서, 팔레트 테이블에서 정의된 대표 컬러값과 비유사한 픽셀값을 갖는 샘플(탈출 샘플)에 대해서는, 탈출 팔레트 인덱스가 매핑될 수 있다. 일 예에서, 각 샘플의 픽셀값이 팔레트 테이블에 정의된 대표 컬러값과 유사한지 여부는 소정의 임계치를 기준으로 판별될 수 있다. 예를 들어, 각 샘플의 픽셀값과 대표 컬러값의 차이가 소정의 임계치 이하인 경우, 해당 샘플에는 대표 컬러값을 지시하는 팔레트 인덱스가 매핑될 수 있다. 이와 달리, 각 샘플의 픽셀값과 대표 컬러값의 차이가 소정의 임계치를 초과하는 경우, 해당 샘플에는 탈출 팔레트 인덱스가 매핑될 수 있다.
영상 부호화 장치는 팔레트 인덱스 맵에 기반하여 현재 블록을 부호화할 수 있다(S2330).
현재 블록의 부호화 과정은 팔레트 인덱스 맵 내의 팔레트 인덱스들을 소정의 스캔 방식에 따라 스캔함으로써 수행될 수 있다. 구체적으로, 영상 부호화 장치는 현재 블록에 매핑된 팔레트 인덱스들을 소정의 스캔 방식에 따라 스캔함으로써, 상기 팔레트 인덱스들 각각의 부호화 모드(팔레트 샘플 모드)를 결정할 수 있다.
팔레트 부호화를 위한 스캔 방식은, 도 15를 참조하여 전술한 바와 같이, 수평 트래버스 스캔(horizontal traverse scan) 및 수직 트래버스 스캔(vertical traverse scan)을 포함할 수 있다. 일 예에서, 스캔 방식에 관한 정보는 palette_transpose_flag를 이용하여 시그널링될 수 있다. 예를 들어, 현재 블록의 팔레트 부호화를 위해 수평 트래버스 스캔이 이용되는 경우, 제1 값(e.g. 0)을 갖는 palette_transpose_flag가 시그널링될 수 있다. 이와 달리, 현재 블록의 팔레트 부호화를 위해 수직 트래버스 스캔이 이용되는 경우, 제2 값(e.g. 1)을 갖는 palette_transpose_flag가 시그널링될 수 있다.
현재 블록에 매핑된 팔레트 인덱스들 각각을 부호화하기 위한 부호화 모드는 팔레트 샘플 모드라고 지칭될 수 있다. 팔레트 샘플 모드는 'INDEX' 모드 및 'COPY_ABOVE' 모드를 포함할 수 있다. 팔레트 샘플 모드가 'INDEX' 모드로 결정된 경우, 해당 팔레트 인덱스의 값이 부호화될 수 있다. 이와 달리, 팔레트 샘플 모드가 'COPY_ABOVE' 모드로 결정된 경우, 해당 팔레트 인덱스의 값은 부호화되지 않고, 해당 팔레트 인덱스가 위쪽(수평 트래버스 스캔의 경우) 또는 왼쪽(수직 트래버스 스캔의 경우)에 존재하는 팔레트 인덱스와 동일한 값을 갖는 것을 나타내는 정보가 부호화될 수 있다. 일 예에서, 팔레트 샘플 모드에 관한 정보는 copy_above_palette_indices_flag를 이용하여 시그널링될 수 있다. 예를 들어, 현재 샘플에 대한 팔레트 샘플 모드가 'INDEX' 모드로 결정된 경우, 제1 값(e.g. 0)을 갖는 copy_above_palette_indices_flag가 시그널링될 수 있다. 이와 달리, 현재 샘플에 대한 팔레트 샘플 모드가 'COPY_ABOVE' 모드로 결정된 경우, 제2 값(e.g. 1)을 갖는 copy_above_palette_indices_flag가 시그널링될 수 있다.
또한, 'INDEX' 모드와 'COPY_ABOVE' 모드에서, 동일한 팔레트 샘플 모드를 이용하여 연속적으로 부호화된 팔레트 인덱스들의 개수를 나타내는 런-값 정보가 추가적으로 부호화될 수 있다.
한편, 탈출 샘플의 경우, 상기 탈출 샘플의 양자화된 픽셀값이 부호화될 수 있다. 일 예에서, 현재 블록이 탈출 샘플을 포함하는지 여부는 탈출 샘플 플래그(e.g. palette_escape_val_present_flag)를 이용하여 시그널링될 수 있다. 예를 들어, 현재 블록이 탈출 샘플을 포함하지 않는 경우, 제1 값(e.g. 0)을 갖는 palette_escape_val_present_flag가 시그널링될 수 있다. 이와 달리, 현재 블록이 탈출 샘플을 포함하는 경우, 제2 값(e.g. 1)을 갖는 palette_escape_val_present_flag가 시그널링될 수 있다.
영상 부호화 장치는, 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인지 여부를 결정할 수 있다(S2340).
일 예에서, 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인지 여부는, 현재 블록의 예측 모드 타입에 기반하여 결정될 수 있다. 예를 들어, 도 10a 내지 도 10c를 참조하여 전술한 바와 같이, 현재 블록의 예측 모드 타입이 인트라 예측만이 적용될 수 있는 MODE_TYPE_INTRA인 경우, 현재 블록의 분할 구조는 로컬 듀얼 트리 구조일 수 있다. 이와 달리, 현재 블록의 예측 모드 타입이 MODE_TYPE_INTRA가 아닌 경우(e.g. MODE_TYPE_ALL), 현재 블록의 분할 구조는 싱글 트리 구조일 수 있다.
다른 예에서, 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인지 여부는, 현재 블록의 트리 타입(treeType) 및 현재 CTU의 분할 구조 중 적어도 하나에 기반하여 결정될 수 있다. 예를 들어, 현재 블록의 트리 타입이 싱글 트리(SINGLE_TREE)가 아니고, 현재 CTU가 P 또는 B 슬라이스에 포함되거나 또는 싱글 트리 구조로 분할되는 경우, 현재 블록의 분할 구조는 로컬 듀얼 트리 구조일 수 있다. 이와 달리, 현재 블록의 트리 타입이 싱글 트리(SINGLE_TREE)인 경우, 현재 블록의 분할 구조는 싱글 트리 구조일 수 있다. 또는, 현재 블록이 I 슬라이스에 포함되고, 해당 슬라이스에 포함되는 CTU가 64x64 루마 샘플 CU로 암묵적 쿼드트리 분할(implicit quadtree split)되며, 상기 64x64 루마 샘플 CU는 듀얼 트리의 루트 노드(root node)가 되는 경우, 현재 블록의 분할 구조는 듀얼 트리 구조일 수 있다. 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인지 여부는, 아래의 수학식 6과 같은 LocalDualTreeFlag를 이용하여 시그널링될 수 있다.
Figure PCTKR2020012898-appb-M000006
수학식 6을 참조하면, sps_qtbtt_dual_tree_intra_flag는 현재 CTU의 분할 구조를 나타낼 수 있다. 예를 들어, 제1 값(e.g. 0)을 갖는 sps_qtbtt_dual_tree_intra_flag는 현재 블록이 I 슬라이스에 포함되고, 해당 슬라이스에 포함되는 CTU가 싱글 트리 구조로 분할됨을 나타낼 수 있다. 이와 달리, 제2 값(e.g. 1)을 갖는 sps_qtbtt_dual_tree_intra_flag는 현재 블록이 I 슬라이스에 포함되고, 해당 슬라이스에 포함되는 CTU가 64x64 루마 샘플 CU로 암묵적 쿼드트리 분할(implicit quadtree split)되며, 상기 64x64 루마 샘플 CU는 듀얼 트리의 루트 노드(root node)가 됨을 나타낼 수 있다.
LocalDualTreeFlag의 값은, 현재 블록의 트리 타입(treeType), 슬라이스 타입(sh_slice_type), 및 현재 CTU의 분할 구조(sps_qtbtt_dual_tree_intra_flag)에 기반하여 결정될 수 있다. LocalDualTreeFlag의 제1 값(e.g. 0)은 현재 블록의 분할 구조가 로컬 듀얼 트리 구조가 아님을 나타낼 수 있고, LocalDualTreeFlag의 제2 값(e.g. 1)은 현재 블록의 분할 구조가 로컬 듀얼 트리 구조임을 나타낼 수 있다.
현재 블록의 분할 구조가 로컬 듀얼 트리 구조가 아닌 경우(S2340의 'NO'), 영상 부호화 장치는 현재 블록에 대한 팔레트 테이블을 이용하여 팔레트 예측자를 업데이트할 수 있다(S2350). 예를 들어, 현재 블록이 모노크롬(monochrome) 포맷의 루마 블록인 경우, 영상 부호화 장치는 팔레트 예측자를 업데이트할 수 있다. 또한, 현재 블록이 크로마 블록이고 현재 블록의 분할 구조가 로컬 듀얼 트리 구조가 아닌 경우, 영상 부호화 장치는 팔레트 예측자를 업데이트할 수 있다. 이와 달리, 현재 블록이 크로마 블록이고 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인 경우, 영상 부호화 장치는 팔레트 예측자를 업데이트하지 않을 수 있다.
일 예에서, 영상 부호화 장치는 팔레트 테이블에 포함된 적어도 하나의 팔레트 엔트리를 팔레트 예측자에 추가함으로써, 팔레트 예측자를 업데이트할 수 있다. 또한, 영상 부호화 장치는 팔레트 예측자에 포함된 적어도 하나의 팔레트 엔트리를 팔레트 테이블에 포함된 적어도 하나의 팔레트 엔트리로 대체함으로써, 팔레트 예측자를 업데이트할 수도 있다. 이 경우, 팔레트 예측자에서 대체되는 팔레트 엔트리는 선입 선출 방식(FIFO)에 따라 가장 오래된 팔레트 엔트리 또는 가장 적은 빈도로 사용된 팔레트 엔트리로 결정될 수 있다.
일 예에서, 팔레트 예측자에 대한 업데이트 과정은, 팔레트 예측자가 최대 크기에 도달할 때까지 계속하여 수행될 수 있다. 팔레트 예측자가 최대 크기에 도달하지 못한 경우, 팔레트 테이블에서 재사용되지 않은 팔레트 예측자 내의 적어도 하나의 팔레트 엔트리가 새로운 팔레트 예측자로서 추가될 수 있다. 이를 팔레트 충전(palette stuffing)이라고 지칭할 수 있다. 그리고, 업데이트된 팔레트 예측자에 관한 정보가 부호화되어 시그널링될 수 있다.
현재 블록의 분할 구조가 로컬 듀얼 트리 구조인 경우(S2340의 'YES'), 영상 부호화 장치는 팔레트 예측자를 업데이트하는 단계(S2350)를 스킵할 수 있다. 이 경우, 현재 CTU 내에서 현재 블록 다음으로 팔레트 부호화되는 블록에 대해서는, 현재 블록에 적용된 팔레트 예측자가 다시 적용될 수 있다.
한편, 도 23에는 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인지 여부를 결정하는 단계(S2340)가 현재 블록을 부호화하는 단계(S2330) 이후에 수행되는 것으로 도시되어 있으나, 그 동작 순서는 다양하게 변경될 수 있다. 예를 들어, 단계 S2340은 단계 S2330 이전에 수행될 수도 있고, 또는 단계 S2340은 단계 S2330과 동시에 수행될 수도 있다.
도 24는 도 19의 예에서 팔레트 예측자가 업데이트되지 않는 경우 팔레트 부호화 과정을 설명하기 위한 도면이다.
도 24를 참조하면, 제2 루마 블록(1912)에 대한 부호화 과정(S2410)에서 업데이트된 팔레트 예측자에서, 루마 성분에 대한 팔레트 엔트리들이 제3-1 루마 블록(1913-1)의 팔레트 부호화에 이용될 수 있다(S2420). 또한, 제2 루마 블록(1912)에 대한 부호화 과정(S2410)에서 업데이트된 팔레트 예측자에서, 크로마 성분에 대한 팔레트 엔트리들이 제3 크로마 블록(1923)의 팔레트 부호화에 이용될 수 있다(S2430). 그리고, 로컬 듀얼 트리 구조를 갖는 제3-1 루마 블록(1913-1) 및 제3 크로마 블록(1923) 각각에 대한 팔레트 부호화 과정에서, 팔레트 예측자를 업데이트하는 과정은 스킵될 수 있다. 그 결과, 제3-1 루마 블록(1913-1) 및 제3 크로마 블록(1923) 다음으로 팔레트 부호화되는 제4 루마 블록(1914)에 대해서는, 제2 루마 블록(1912)에 대한 팔레트 부호화 과정(S2410)에서 업데이트된 팔레트 예측자가 다시 적용될 수 있다(S2440).
도 25는 현재 블록의 분할 구조에 기반하여 팔레트 예측자를 선택적으로 업데이트하는 과정의 일 예를 나타내는 도면이다.
도 25를 참조하면, 팔레트 예측자(PredictorPaletteEntries[cIdx][i])를 구성하는 팔레트 엔트리들(PredictorPaletteEntries)에 대한 업데이트 동작은, 현재 블록의 예측 모드 타입이 인트라 예측, IBC(intra block copy), 팔레트 모드 및 인터 예측이 모두 적용될 수 있는 제1 모드 타입(e.g. MODE_TYPE_ALL)인 경우에만 수행될 수 있다.
파라미터 CurrentPaletteSize[startComp]는 현재 블록에 대한 팔레트 테이블의 크기(즉, 팔레트 엔트리들의 총 개수)를 나타낼 수 있다.
파라미터 startComp, numComps 및 maxNumPalettePredictorSize 각각의 값은 현재 블록의 분할 트리 구조에 따라 다르게 설정될 수 있다.
예를 들어, 현재 블록이 싱글 트리 구조를 갖는 경우, 파라미터 startComp, numComps 및 maxNumPalettePredictorSize 각각의 값은 아래의 수학식 7과 같이 설정될 수 있다.
Figure PCTKR2020012898-appb-M000007
수학식 7을 참조하면, 팔레트 테이블의 첫번째 컬러 컴포넌트 startComp은 0으로 설정될 수 있다. 또한, 팔레트 테이블의 총 컬러 컴포넌트들의 개수 numComps는, 현재 블록의 컬러 포맷(또는, 크로마 포맷)이 모노크롬(monochrome)인 경우 1로 설정되고, 현재 블록의 컬러 포맷이 4:4:4 포맷인 경우 3으로 설정될 수 있다. 또한, 팔레트 예측자의 최대 크기 maxNumPalettePredictorSize는 63으로 설정될 수 있다.
이와 달리, 현재 블록이 듀얼 트리 루마 구조를 갖는 경우, 파라미터 startComp, numComps 및 maxNumPalettePredictorSize 각각의 값은 아래의 수학식 8과 같이 설정될 수 있다.
Figure PCTKR2020012898-appb-M000008
수학식 8을 참조하면, 팔레트 테이블의 첫번째 컬러 컴포넌트 startComp는 0으로 설정될 수 있다. 또한, 팔레트 테이블의 컬러 컴포넌트들의 총 개수 numComps는 1로 설정될 수 있다. 또한, 팔레트 예측자의 최대 크기 maxNumPalettePredictorSize는 31로 설정될 수 있다.
또한, 현재 블록이 듀얼 트리 크로마 구조를 갖는 경우, 파라미터 startComp, numComps 및 maxNumPalettePredictorSize 각각의 값은 아래의 수학식 9와 같이 설정될 수 있다.
Figure PCTKR2020012898-appb-M000009
수학식 9를 참조하면, 팔레트 테이블의 첫번째 컬러 컴포넌트 startComp는 1로 설정될 수 있다. 또한, 팔레트 테이블의 컬러 컴포넌트들의 총 개수 numComps는 2로 설정될 수 있다. 또한, 팔레트 예측자의 최대 크기 maxNumPalettePredictorSize는 31로 설정될 수 있다.
팔레트 테이블의 모든 팔레트 엔트리들이 새로운 팔레트 엔트리로 설정될 수 있다(newPredictorPaletteEntries[cIdx][i] = CurrentPaletteEntries[cIdx][i]). 여기서, cIdx는 컬러 컴포넌트를 의미할 수 있다. 그리고, 첫번째 컬러 컴포넌트 startComp에 대한 팔레트 테이블의 크기는 새로운 팔레트 예측자의 크기로 설정될 수 있다(newPredictorPaletteSize = CurrentPaletteSize[startComp]).
다음으로, 소정의 재사용 플래그 PalettePredictorEntryReuseFlags[i]의 값에 기반하여, 팔레트 예측자의 적어도 하나의 팔레트 엔트리가 새로운 팔레트 엔트리로 설정될 수 있다(newPredictorPaletteEntries[cIdx][newPredictorPaletteSize] = PredictorPaletteEntries[cIdx][i]). 그리고, 새로운 팔레트 예측자의 크기는 1 만큼 증가할 수 있다(newPredictorPaletteSize++).
다음으로, 상술한 모든 새로운 팔레트 엔트리들은 새로운 팔레트 예측자의 팔레트 엔트리로 설정될 수 있다(PredictorPaletteEntries[cIdx][i] = newPredictorPaletteEntries[cIdx][i]). 그리고, 새로운 팔레트 예측자의 크기가 첫번째 컬러 컴포넌트 startComp에 대한 팔레트 예측자의 크기로 설정될 수 있다(newPredictorPaletteSize = PredictorPaletteSize[StartComp]).
도 26은 본 개시의 일 실시예에 따른 팔레트 복호화 방법을 나타내는 흐름도이다.
도 26의 팔레트 복호화 방법은 도 3의 영상 복호화 장치에 의해 수행될 수 있다. 구체적으로, 단계 S2610 내지 단계 S2660은 인트라 예측부(265)에 의하여 수행될 수도 있고, 또는 인트라 예측부(265)와는 다른 별개의 기능 블록(e.g. 팔레트 디코딩부)에 의하여 수행될 수도 있다.
도 26을 참조하면, 현재 블록에 팔레트 모드가 적용되는 경우, 영상 복호화 장치는 비트스트림으로부터 현재 블록에 대한 팔레트 정보 및 팔레트 인덱스 예측 정보를 획득할 수 있다(S2610).
팔레트 정보는 팔레트 예측자에 관한 정보를 포함할 수 있다. 또한, 팔레트 정보는 새로운 팔레트 엔트리에 관한 정보를 더 포함할 수 있다. 일 예에서, 영상 복호화 장치는 비트스트림에 포함된 PredictorPaletteEntries[cIdx][i]를 복호화함으로써, 팔레트 예측자에 관한 정보를 획득할 수 있다. 또한, 일 예에서, 영상 복호화 장치는 비트스트림에 포함된 new_palette_entries[cIdx][i]를 복호화함으로써, 새로운 팔레트 엔트리에 관한 정보를 획득할 수 있다. PredictorPaletteEntries[cIdx][i] 및 new_palette_entries[cIdx][i]에서, cIdx는 컬러 컴포넌트를 의미할 수 있다.
팔레트 인덱스 예측 정보는 현재 블록에 대한 팔레트 인덱스 맵에 관한 정보를 포함할 수 있다. 일 예에서, 영상 복호화 장치는 비트스트림에 포함된 PaletteIndexMap[xC][yC]를 복호화함으로써, 현재 블록에 매핑된 적어도 하나의 팔레트 인덱스를 획득할 수 있다. 여기서, xC 및 yC는 현재 블록이 속한 CTU(또는, 슬라이스)의 좌상단 샘플로부터의 현재 샘플의 상대적인 위치를 나타내는 좌표 지시자일 수 있다. 일 예에서, 영상 복호화 장치는 비트스트림에 포함된 PaletteRunMinus1을 복호화함으로써, 팔레트 인덱스 맵에 포함된 팔레트 인덱스의 런-값 정보를 획득할 수 있다.
영상 복호화 장치는 비트스트림으로부터 획득된 팔레트 정보에 기반하여, 현재 블록에 대한 팔레트 예측자 및 팔레트 테이블을 구성할 수 있다(S2620).
일 예에서, 영상 복호화 장치는 비트스트림에 포함된 PredictorPaletteEntries[cIdx][i]에 기반하여, 현재 블록에 대한 팔레트 예측자를 구성할 수 있다. 팔레트 예측자는, 예를 들어 현재 블록을 포함하는 CTU(또는, 슬라이스)의 최초 복호화 시점에서 초기화된 소정의 값(e.g. 0)을 가질 수 있다. 또는, 팔레트 예측자는 이전 팔레트 복호화 과정에서 업데이트된 팔레트 예측자와 동일한 구성을 가질 수 있다.
영상 복호화 장치는 팔레트 예측자에 기반하여 현재 블록에 대한 팔레트 테이블을 구성할 수 있다. 팔레트 테이블은 팔레트 예측자에 포함된 팔레트 엔트리 및 비트스트림으로부터 획득되는 새로운 팔레트 엔트리 중 적어도 하나와 각각의 팔레트 엔트리를 식별하기 위한 팔레트 인덱스를 포함할 수 있다.
일 예에서, 팔레트 예측자 및 팔레트 테이블은 현재 블록의 컬러 포맷(또는, 크로마 포맷)에 따라 다양하게 구성될 수 있다. 예를 들어, 팔레트 예측자 및 팔레트 테이블은, 현재 블록의 컬러 포맷에 따라, 루마 성분에 대한 팔레트 엔트리만을 포함하거나, 또는 루마 성분 및 크로마 성분 각각에 대한 팔레트 엔트리를 모두 포함할 수 있다.
일 예에서, 팔레트 예측자 및 팔레트 테이블은 현재 블록의 분할 구조에 따라 다양하게 구성될 수 있다. 예를 들어, 현재 블록이 싱글 트리 구조를 갖는 경우, 팔레트 예측자 및 팔레트 테이블은 현재 블록의 루마 성분 및 크로마 성분에 공통적으로 적용되는 단일 구성을 가질 수 있다. 이와 달리, 현재 블록이 듀얼 트리 구조를 갖는 경우, 팔레트 예측자 및 팔레트 테이블은 현재 블록의 루마 성분 및 크로마 성분 각각에 대해 별도로 적용되는 다중 구성을 가질 수 있다.
영상 복호화 장치는 비트스트림으로부터 획득된 팔레트 인덱스 예측 정보에 기반하여 현재 블록에 대한 팔레트 인덱스 맵을 생성할 수 있다(S2630). 구체적으로, 영상 복호화 장치는, 비트스트림으로부터 획득된 팔레트 인덱스, 팔레트 샘플 모드 및 팔레트 샘플 모드의 런-값을 이용하여, 소정의 스캔 방식에 따라 현재 블록 내의 각각의 샘플에 팔레트 인덱스를 매핑함으로써, 팔레트 인덱스 맵을 생성할 수 있다.
팔레트 복호화를 위한 스캔 방식은, 도 15를 참조하여 전술한 바와 같이, 수평 트래버스 스캔(horizontal traverse scan) 및 수직 트래버스 스캔(vertical traverse scan)을 포함할 수 있다. 일 예에서, 팔레트 복호화를 위한 스캔 방식은 비트스트림에 포함된 palette_transpose_flag를 복호화함으로써 결정될 수 있다. 예를 들어, palette_transpose_flag가 제1 값(e.g. 0)을 갖는 경우, 팔레트 복호화를 위한 스캔 방식은 수평 트래버스 스캔으로 결정될 수 있다. 이와 달리, palette_transpose_flag가 제2 값(e.g. 1)을 갖는 경우, 팔레트 복호화를 위한 스캔 방식은 수직 트래버스 스캔으로 결정될 수 있다.
팔레트 샘플 모드는, 전술한 바와 같이, 'INDEX' 모드 및 'COPY_ABOVE' 모드를 포함할 수 있다. 현재 샘플에 'INDEX' 모드가 적용되는 경우, 상기 현재 샘플에 매핑되는 팔레트 인덱스의 값은 비트스트림으로부터 직접 획득될 수 있다. 이에 반해, 현재 샘플에 'COPY_ABOVE' 모드가 적용되는 경우, 상기 현재 샘플에 매핑되는 팔레트 인덱스의 값은 상기 현재 샘플의 위쪽(수평 트래버스 스캔의 경우) 또는 왼쪽(수직 트래버스 스캔의 경우)에 존재하는 주변 샘플에 매핑된 팔레트 인덱스의 값으로 결정될 수 있다.
한편, 현재 샘플이 탈출 샘플인 경우, 상기 현재 샘플의 양자화된 픽셀값이 비트스트림으로부터 직접 획득될 수 있다. 탈출 샘플에는 탈출 팔레트 인덱스가 매핑될 수 있다.
영상 복호화 장치는 현재 블록에 대한 팔레트 테이블 및 팔레트 인덱스 맵에 기반하여 현재 블록을 복호화할 수 있다(S2640). 구체적으로, 영상 복호화 장치는, 팔레트 테이블을 참조하여, 팔레트 인덱스 맵 내의 각각의 팔레트 인덱스의 값을 대표 컬러값에 역매핑(inverse mapping)함으로써, 현재 블록에 대한 예측 블록을 생성할 수 있다.
그리고, 영상 복호화 장치는 현재 블록이 로컬 듀얼 트리 구조를 갖는지 여부를 결정할 수 있다(S2650).
일 예에서, 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인지 여부는, 현재 블록의 예측 모드 타입에 기반하여 결정될 수 있다. 예를 들어, 도 10a 내지 도 10c를 참조하여 전술한 바와 같이, 현재 블록의 예측 모드 타입이 인트라 예측만이 적용될 수 있는 MODE_TYPE_INTRA인 경우, 현재 블록의 분할 구조는 로컬 듀얼 트리 구조일 수 있다. 이와 달리, 현재 블록의 예측 모드 타입이 MODE_TYPE_INTRA가 아닌 경우(e.g. MODE_TYPE_ALL), 현재 블록의 분할 구조는 싱글 트리 구조일 수 있다.
다른 예에서, 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인지 여부는, 현재 블록의 트리 타입(treeType) 및 현재 블록을 포함하는 CTU(현재 CTU)의 분할 구조 중 적어도 하나에 기반하여 결정될 수 있다. 예를 들어, 현재 블록의 트리 타입이 싱글 트리(SINGLE_TREE)가 아니고, 현재 CTU가 싱글 트리 구조로 분할되는 경우, 현재 블록의 분할 구조는 로컬 듀얼 트리 구조일 수 있다. 이와 달리, 현재 블록의 트리 타입이 싱글 트리(SINGLE_TREE)인 경우, 현재 블록의 분할 구조는 싱글 트리 구조일 수 있다. 또는, 현재 블록이 I 슬라이스에 포함되고, 해당 슬라이스에 포함되는 CTU가 64x64 루마 샘플 CU로 암묵적 쿼드트리 분할(implicit quadtree split)되며, 상기 64x64 루마 샘플 CU는 듀얼 트리의 루트 노드(root node)가 되는 경우, 현재 블록의 분할 구조는 듀얼 트리 구조일 수 있다. 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인지 여부는, 수학식 6을 참조하여 전술한 LocalDualTreeFlag를 복호화함으로써 결정될 수 있다. 예를 들어, LocalDualTreeFlag가 제1 값(e.g. 0)을 갖는 경우, 현재 블록의 분할 구조는 싱글 트리 구조 또는 듀얼 트리 구조로 결정될 수 있다. 이와 달리, LocalDualTreeFlag가 제2 값(e.g. 1)을 갖는 경우, 현재 블록의 분할 구조는 로컬 듀얼 트리 구조로 결정될 수 있다.
현재 블록의 분할 구조가 로컬 듀얼 트리 구조가 아닌 경우(S2650의 'NO'), 영상 복호화 장치는 현재 블록에 대한 팔레트 테이블을 이용하여 팔레트 예측자를 업데이트할 수 있다(S2660). 예를 들어, 현재 블록이 모노크롬(monochrome) 포맷의 루마 블록인 경우, 영상 복호화 장치는 팔레트 예측자를 업데이트할 수 있다. 또한, 현재 블록이 크로마 블록이고 현재 블록의 분할 구조가 로컬 듀얼 트리 구조가 아닌 경우, 영상 복호화 장치는 팔레트 예측자를 업데이트할 수 있다. 이와 달리, 현재 블록이 크로마 블록이고 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인 경우, 영상 복호화 장치는 팔레트 예측자를 업데이트하지 않을 수 있다.
일 예에서, 영상 복호화 장치는 팔레트 테이블에 포함된 적어도 하나의 팔레트 엔트리를 팔레트 예측자에 추가함으로써, 팔레트 예측자를 업데이트할 수 있다. 또한, 영상 복호화 장치는 팔레트 예측자에 포함된 적어도 하나의 팔레트 엔트리를 팔레트 테이블에 포함된 적어도 하나의 팔레트 엔트리로 대체함으로써, 팔레트 예측자를 업데이트할 수도 있다. 이 경우, 팔레트 예측자에서 대체되는 팔레트 엔트리는 선입 선출 방식(FIFO)에 따라 가장 오래된 팔레트 엔트리 또는 가장 적은 빈도로 사용된 팔레트 엔트리로 결정될 수 있다.
일 예에서, 팔레트 예측자에 대한 업데이트 과정은, 팔레트 예측자가 최대 크기에 도달할 때까지 계속하여 수행될 수 있다. 팔레트 예측자가 최대 크기에 도달하지 못한 경우, 팔레트 테이블에서 재사용되지 않은 팔레트 예측자 내의 적어도 하나의 팔레트 엔트리가 새로운 팔레트 예측자로서 추가될 수 있다. 이를 팔레트 충전(palette stuffing)이라고 지칭할 수 있다.
일 예에서, 영상 복호화 장치는 영상 부호화 장치로부터 시그널링된 팔레트 예측자의 업데이트 정보에 기반하여 팔레트 예측자를 업데이트할 수도 있다.
현재 블록의 분할 구조가 로컬 듀얼 트리 구조인 경우(S2650의 'YES'), 영상 복호화 장치는 팔레트 예측자를 업데이트하는 단계(S2660)를 스킵할 수 있다. 이 경우, 현재 CTU 내에서 현재 블록 다음으로 팔레트 복호화되는 블록에 대해서는, 현재 블록에 적용된 팔레트 예측자가 다시 적용될 수 있다.
이상, 상술한 본 개시의 실시예 #1에 따르면, 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인 경우, 현재 블록에 적용된 팔레트 예측자를 업데이트하는 과정이 스킵될 수 있다. 이에 따라, 현재 블록 다음으로 팔레트 부호화/복호화되는 블록에 대한 팔레트 예측자가, 현재 블록에 적용된 유효한(valid) 팔레트 엔트리를 포함하지 못하게 되거나, 유효하지 않은(invalid) 팔레트 엔트리를 포함하게 되는 문제를 해결할 수 있다.
실시예 #2
본 개시의 실시예 #2에 따르면, 로컬 듀얼 트리 구조를 갖는 현재 블록을 부호화/복호화함에 있어서, 팔레트 모드는 현재 블록의 분할 구조에 기반하여 선택적으로 적용될 수 있다.
도 27은 본 개시의 일 실시예에 따른 팔레트 부호화 방법을 나타내는 흐름도이다.
도 27의 팔레트 부호화 방법은 도 2의 영상 부호화 장치에 의해 수행될 수 있다. 구체적으로, S2710 내지 S2760은 인트라 예측부(165)에 의하여 수행될 수도 있고, 또는 인트라 예측부(165)와는 다른 별개의 기능 블록(e.g. 팔레트 인코딩부)에 의하여 수행될 수도 있다. 한편, 도 27의 S2720 내지 S2750은 각각 도 23의 S2310 내지 S2330 및 S2350에 대응될 수 있다. 따라서, S2720 내지 S2750에 대한 설명은 간략히 하기로 한다.
도 27을 참조하면, 영상 부호화 장치는 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인지 여부를 결정할 수 있다(S2710).
일 예에서, 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인지 여부는, 현재 블록의 예측 모드 타입에 기반하여 결정될 수 있다. 예를 들어, 도 10a 내지 도 10c를 참조하여 전술한 바와 같이, 현재 블록의 예측 모드 타입이 인트라 예측만이 적용될 수 있는 MODE_TYPE_INTRA인 경우, 현재 블록의 분할 구조는 로컬 듀얼 트리 구조일 수 있다. 이와 달리, 현재 블록의 예측 모드 타입이 MODE_TYPE_INTRA가 아닌 경우(e.g. MODE_TYPE_ALL), 현재 블록의 분할 구조는 싱글 트리 구조일 수 있다.
다른 예에서, 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인지 여부는, 현재 블록의 트리 타입(treeType) 및 현재 CTU의 분할 구조 중 적어도 하나에 기반하여 결정될 수 있다. 예를 들어, 현재 블록의 트리 타입이 싱글 트리(SINGLE_TREE)가 아니고, 현재 CTU가 P 또는 B 슬라이스에 포함되거나 또는 싱글 트리 구조로 분할되는 경우, 현재 블록의 분할 구조는 로컬 듀얼 트리 구조일 수 있다. 이와 달리, 현재 블록의 트리 타입이 싱글 트리(SINGLE_TREE)인 경우, 현재 블록의 분할 구조는 싱글 트리 구조일 수 있다. 또는, 현재 블록이 I 슬라이스에 포함되고, 해당 슬라이스에 포함되는 CTU가 64x64 루마 샘플 CU로 암묵적 쿼드트리 분할(implicit quadtree split)되며, 상기 64x64 루마 샘플 CU는 듀얼 트리의 루트 노드(root node)가 되는 경우, 현재 블록의 분할 구조는 듀얼 트리 구조일 수 있다. 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인지 여부는, 수학식 6을 참조하여 전술한 LocalDualTreeFlag를 이용하여 시그널링될 수 있다. 이 경우, LocalDualTreeFlag의 제1 값(e.g. 0)은 현재 블록의 분할 구조가 로컬 듀얼 트리 구조가 아님을 나타낼 수 있고, LocalDualTreeFlag의 제2 값(e.g. 1)은 현재 블록의 분할 구조가 로컬 듀얼 트리 구조임을 나타낼 수 있다.
현재 블록의 분할 구조가 로컬 듀얼 트리 구조가 아닌 경우(S2710의 'NO'), 영상 부호화 장치는 현재 블록에 대해 팔레트 모드를 적용할 것을 결정하고, 현재 블록에 대한 팔레트 예측자 및 팔레트 테이블을 구성할 수 있다(S2720).
팔레트 예측자는 적어도 하나의 팔레트 엔트리(대표 컬러값) 및 각각의 팔레트 엔트리를 식별하기 위한 팔레트 인덱스를 포함할 수 있다. 현재 블록이 현재 CTU(또는, 슬라이스) 내에서 처음으로 팔레트 부호화되는 블록인 경우, 팔레트 예측자는 소정의 초기값(e.g. 0)을 가질 수 있다. 이와 달리, 현재 블록이 현재 CTU 내에서 처음으로 팔레트 부호화되는 블록이 아닌 경우, 팔레트 예측자는 현재 CTU 내에서 현재 블록 이전의 팔레트 부호화 과정에서 이용된 적어도 하나의 팔레트 엔트리를 포함할 수 있다.
영상 부호화 장치는 팔레트 예측자에 기반하여 팔레트 테이블을 구성할 수 있다. 팔레트 테이블은 팔레트 예측자로부터 선택된 적어도 하나의 팔레트 엔트리와 각각의 팔레트 엔트리를 식별하기 위한 팔레트 인덱스를 포함할 수 있다.
일 예에서, 팔레트 예측자 및 팔레트 테이블은 현재 블록의 컬러 포맷(또는, 크로마 포맷)에 따라 다양하게 구성될 수 있다. 예를 들어, 현재 블록의 컬러 포맷이 표 2를 참조하여 전술한 모노크롬(monochrome) 포맷인 경우, 팔레트 예측자 및 팔레트 테이블은 현재 블록의 루마 성분에 대한 팔레트 엔트리만을 포함할 수 있다. 이와 달리, 현재 블록의 컬러 포맷이 표 2를 참조하여 전술한 4:2:0, 4:2:2 또는 4:4:4 포맷인 경우, 팔레트 예측자 및 팔레트 테이블은 현재 블록의 루마 성분 및 크로마 성분 각각에 대한 팔레트 엔트리를 포함할 수 있다.
일 예에서, 팔레트 예측자 및 팔레트 테이블은 현재 블록의 분할 구조에 따라 다양하게 구성될 수 있다. 예를 들어, 현재 블록이 싱글 트리 구조를 갖는 경우, 팔레트 예측자 및 팔레트 테이블은 현재 블록의 루마 성분 및 크로마 성분에 대해 공통적으로 적용되는 하나의 구성을 가질 수 있다. 이와 달리, 현재 블록이 듀얼 트리 구조를 갖는 경우, 팔레트 예측자 및 팔레트 테이블은 현재 블록의 루마 성분 및 크로마 성분 각각에 대해 개별적으로 적용되는 복수의 구성들을 가질 수 있다.
영상 부호화 장치는 팔레트 테이블에 기반하여 현재 블록에 대한 팔레트 인덱스 맵을 생성할 수 있다(S2730). 구체적으로, 영상 부호화 장치는, 현재 블록 내의 각 픽셀(샘플)의 픽셀값과 팔레트 테이블 내의 대표 컬러값 사이의 동일 또는 유사 여부에 기반하여, 현재 블록 내의 각 픽셀에 팔레트 인덱스를 매핑함으로써, 팔레트 인덱스 맵을 생성할 수 있다.
영상 부호화 장치는 팔레트 인덱스 맵에 기반하여 현재 블록을 부호화할 수 있다(S2740).
현재 블록의 부호화 과정은 팔레트 인덱스 맵 내의 팔레트 인덱스들을 소정의 스캔 방식에 따라 스캔함으로써 수행될 수 있다. 구체적으로, 영상 부호화 장치는 현재 블록에 매핑된 팔레트 인덱스들을 소정의 스캔 방식에 따라 스캔함으로써, 상기 팔레트 인덱스들 각각의 부호화 모드(팔레트 샘플 모드)를 결정할 수 있다.
팔레트 부호화를 위한 스캔 방식은, 도 15를 참조하여 전술한 바와 같이, 수평 트래버스 스캔(horizontal traverse scan) 및 수직 트래버스 스캔(vertical traverse scan)을 포함할 수 있다. 일 예에서, 스캔 방식에 관한 정보는 palette_transpose_flag를 이용하여 시그널링될 수 있다.
팔레트 인덱스 맵에 포함된 팔레트 인덱스들 각각을 부호화하기 위한 팔레트 샘플 모드는 'INDEX' 모드 및 'COPY_ABOVE' 모드를 포함할 수 있다. 팔레트 샘플 모드가 'INDEX' 모드로 결정된 경우, 해당 팔레트 인덱스의 값이 부호화될 수 있다. 이와 달리, 팔레트 샘플 모드가 'COPY_ABOVE' 모드로 결정된 경우, 해당 팔레트 인덱스의 값은 부호화되지 않고, 해당 팔레트 인덱스가 위쪽(수평 트래버스 스캔의 경우) 또는 왼쪽(수직 트래버스 스캔의 경우)에 존재하는 팔레트 인덱스와 동일한 값을 갖는 것을 나타내는 정보가 부호화될 수 있다. 일 예에서, 팔레트 샘플 모드에 관한 정보는 copy_above_palette_indices_flag를 이용하여 시그널링될 수 있다.
또한, 'INDEX' 모드와 'COPY_ABOVE' 모드에서, 동일한 팔레트 샘플 모드를 이용하여 연속적으로 부호화된 팔레트 인덱스들의 개수를 나타내는 런-값 정보가 추가적으로 부호화될 수 있다.
한편, 팔레트 인덱스 맵이 탈출 팔레트 인덱스를 포함하는지 여부를 나타내는 정보는 탈출 샘플 플래그(e.g. palette_escape_val_present_flag)를 이용하여 시그널링될 수 있다. 탈출 팔레트 인덱스가 매핑된 샘플(탈출 샘플)에 대해서는, 해당 샘플의 양자화된 픽셀값이 부호화되어 시그널링될 수 있다.
영상 부호화 장치는 현재 블록에 대한 팔레트 테이블을 이용하여 팔레트 예측자를 업데이트할 수 있다(S2750). 예를 들어, 영상 부호화 장치는 팔레트 테이블에 포함된 적어도 하나의 팔레트 엔트리를 팔레트 예측자에 추가함으로써, 팔레트 예측자를 업데이트할 수 있다. 또한, 영상 부호화 장치는 팔레트 예측자에 포함된 적어도 하나의 팔레트 엔트리를 팔레트 테이블에 포함된 적어도 하나의 팔레트 엔트리로 대체함으로써, 팔레트 예측자를 업데이트할 수도 있다. 팔레트 예측자에서 대체되는 팔레트 엔트리는 선입 선출 방식(FIFO)에 따라 가장 오래된 팔레트 엔트리 또는 가장 적은 빈도로 사용된 팔레트 엔트리로 결정될 수 있다.
팔레트 예측자에 대한 업데이트 과정은, 팔레트 예측자가 최대 팔레트 사이즈에 도달할 때까지 계속하여 수행될 수 있다. 예를 들어, 팔레트 예측자는 최대 팔레트 사이즈에 도달할 때까지 팔레트 충전(palette stuffing)을 통해 업데이트될 수 있다.
현재 블록의 분할 구조가 로컬 듀얼 트리 구조인 경우(S2710의 'YES'), 영상 부호화 장치는 현재 블록에 팔레트 모드를 적용하지 않고, 팔레트 모드 이외의 통상의 예측 모드(e.g. 인트라 예측 모드, 인터 예측 모드 등)를 이용하여 현재 블록을 부호화할 수 있다(S2760). 통상의 예측 모드에 관한 구체적인 내용은 도 1 내지 도 14를 참조하여 전술한 바와 같다.
한편, 현재 블록에 팔레트 모드가 적용되는지 여부에 관한 정보는 팔레트 모드 플래그(e.g. pred_mode_plt_flag)를 이용하여 시그널링될 수 있다.
도 28은 팔레트 모드 플래그를 포함하는 coding_unit 신택스의 구체적인 일 예는 나타내는 도면이다.
도 28을 참조하면, pred_mode_plt_flag는 현재 블록(또는, 현재 CU)에 대해 팔레트 모드가 적용되는지 여부를 나타낼 수 있다. 예를 들어, 제1 값(e.g. 0)을 갖는 pred_mode_plt_flag는 현재 블록에 대해 팔레트 모드가 적용되지 않음을 나타낼 수 있다. 이와 달리, 제2 값(e.g. 1)을 갖는 pred_mode_plt_flag는 현재 블록에 대해 팔레트 모드가 적용됨을 나타낼 수 있다.
일 예에서, pred_mode_plt_flag는 현재 블록의 예측 모드 타입에 기반하여 시그널링될 수 있다. 예를 들어, 현재 블록의 예측 모드 타입이 인트라 예측, IBC(intra block copy), 팔레트 모드 및 인터 예측이 모두 적용될 수 있는 제1 모드 타입(e.g. MODE_TYPE_ALL)인 경우, pred_mode_plt_flag가 시그널링될 수 있다. 이와 달리, 현재 블록의 예측 모드 타입이 인트라 예측만이 적용될 수 있는 제2 모드 타입(e.g. MODE_TYPE_INTRA) 또는 인터 예측만이 적용될 수 있는 제3 모드 타입(e.g. MODE_TYPE_INTER)인 경우, pred_mode_plt_flag는 시그널링되지 않을 수 있다.
도 29는 본 개시의 일 실시예에 따른 팔레트 복호화 방법을 나타내는 흐름도이다.
도 29의 팔레트 복호화 방법은 도 3의 영상 복호화 장치에 의해 수행될 수 있다. 구체적으로, 단계 S2910 내지 단계 S2980은 인트라 예측부(265)에 의하여 수행될 수도 있고, 또는 인트라 예측부(265)와는 다른 별개의 기능 블록(e.g. 팔레트 디코딩부)에 의하여 수행될 수도 있다. 한편, 도 29의 S2930 내지 S2970은 각각 도 26의 S2610 내지 S2640 및 S2660에 대응될 수 있다. 따라서, S2930 내지 S2970에 대한 설명은 간략히 하기로 한다.
도 29를 참조하면, 영상 복호화 장치는 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인지 여부를 결정할 수 있다(S2910).
일 예에서, 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인지 여부는, 현재 블록의 예측 모드 타입에 기반하여 결정될 수 있다. 예를 들어, 도 10a 내지 도 10c를 참조하여 전술한 바와 같이, 현재 블록의 예측 모드 타입이 인트라 예측만이 적용될 수 있는 MODE_TYPE_INTRA인 경우, 현재 블록의 분할 구조는 로컬 듀얼 트리 구조일 수 있다. 이와 달리, 현재 블록의 예측 모드 타입이 MODE_TYPE_INTRA가 아닌 경우(e.g. MODE_TYPE_ALL), 현재 블록의 분할 구조는 싱글 트리 구조일 수 있다.
다른 예에서, 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인지 여부는, 현재 블록의 트리 타입(treeType) 및 현재 CTU의 분할 구조 중 적어도 하나에 기반하여 결정될 수 있다. 예를 들어, 현재 블록의 트리 타입이 싱글 트리(SINGLE_TREE)가 아니고, 현재 CTU가 P 또는 B 슬라이스에 포함되거나 또는 싱글 트리 구조로 분할되는 경우, 현재 블록의 분할 구조는 로컬 듀얼 트리 구조일 수 있다. 이와 달리, 현재 블록의 트리 타입이 싱글 트리(SINGLE_TREE)인 경우, 현재 블록의 분할 구조는 싱글 트리 구조일 수 있다. 또는, 현재 블록이 I 슬라이스에 포함되고, 해당 슬라이스에 포함되는 CTU가 64x64 루마 샘플 CU로 암묵적 쿼드트리 분할(implicit quadtree split)되며, 상기 64x64 루마 샘플 CU는 듀얼 트리의 루트 노드(root node)가 되는 경우, 현재 블록의 분할 구조는 듀얼 트리 구조일 수 있다. 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인지 여부는, 수학식 6을 참조하여 전술한 LocalDualTreeFlag를 이용하여 시그널링될 수 있다. 이 경우, LocalDualTreeFlag의 제1 값(e.g. 0)은 현재 블록의 분할 구조가 로컬 듀얼 트리 구조가 아님을 나타낼 수 있고, LocalDualTreeFlag의 제2 값(e.g. 1)은 현재 블록의 분할 구조가 로컬 듀얼 트리 구조임을 나타낼 수 있다.
현재 블록의 분할 구조가 로컬 듀얼 트리 구조가 아닌 경우(S2910의 'NO'), 영상 복호화 장치는 현재 블록에 팔레트 모드가 적용되는지 여부를 결정할 수 있다. 일 예에서, 영상 복호화 장치는 비트스트림으로부터 획득되는 팔레트 모드 플래그(e.g. pred_mode_plt_flag)에 기반하여, 현재 블록에 팔레트 모드가 적용되는지 여부를 결정할 수 있다. 예를 들어, 도 28을 참조하여 전술한 pred_mode_plt_flag가 제1 값(e.g. 0)을 갖는 경우, 현재 블록에 대해 팔레트 모드가 적용되지 않을 수 있다. 이와 달리, pred_mode_plt_flag가 제2 값(e.g. 1)을 갖는 경우, 현재 블록에 대해 팔레트 모드가 적용될 수 있다. 한편, pred_mode_plt_flag가 비트스트림으로부터 획득되지 않는 경우, pred_mode_plt_flag의 값은 제1 값을 갖는 것으로 추론될 수 있다.
현재 블록에 팔레트 모드가 적용되는 경우(S2920의 'YES'), 영상 복호화 장치는 비트스트림으로부터 현재 블록에 대한 팔레트 정보 및 팔레트 인덱스 예측 정보를 획득할 수 있다(S2930). 팔레트 정보는 팔레트 예측자 및/또는 새로운 팔레트 엔트리에 관한 정보를 포함할 수 있다. 팔레트 인덱스 예측 정보는 현재 블록에 매핑된 팔레트 인덱스 및 팔레트 인덱스의 런-값 정보를 포함할 수 있다.
영상 복호화 장치는 비트스트림으로부터 획득된 팔레트 정보에 기반하여, 현재 블록에 대한 팔레트 예측자 및 팔레트 테이블을 구성할 수 있다(S2940). 일 예에서, 팔레트 예측자는 현재 블록 이전의 팔레트 복호화 과정에서 업데이트된 팔레트 예측자와 동일한 구성을 가질 수 있다. 한편, 팔레트 예측자에 관한 정보가 비트스트림으로부터 획득되지 않는 경우, 팔레트 예측자는 소정의 초기값(e.g. 0)을 갖거나, 또는 이전 팔레트 복호화 과정에서 이용된 팔레트 예측자와 동일한 구성을 가질 수 있다.
영상 복호화 장치는 팔레트 예측자에 기반하여 현재 블록에 대한 팔레트 테이블을 구성할 수 있다. 팔레트 테이블은 팔레트 예측자에 포함된 팔레트 엔트리 및 비트스트림으로부터 획득된 새로운 팔레트 엔트리 중 적어도 하나와 각각의 팔레트 엔트리를 식별하기 위한 팔레트 인덱스를 포함할 수 있다.
일 예에서, 팔레트 예측자 및 팔레트 테이블은 현재 블록의 컬러 포맷(또는, 크로마 포맷)에 따라 다양하게 구성될 수 있다. 또한, 팔레트 예측자 및 팔레트 테이블은 현재 블록의 분할 구조에 따라 다양하게 구성될 수 있다.
영상 복호화 장치는 팔레트 인덱스 예측 정보에 기반하여 현재 블록에 대한 팔레트 인덱스 맵을 생성할 수 있다(S2950). 구체적으로, 영상 복호화 장치는, 비트스트림으로부터 획득된 팔레트 인덱스, 팔레트 샘플 모드 및 팔레트 샘플 모드의 런-값을 이용하여, 소정의 스캔 방식에 따라 현재 블록 내의 각각의 샘플에 팔레트 인덱스를 매핑함으로써, 팔레트 인덱스 맵을 생성할 수 있다.
팔레트 복호화를 위한 스캔 방식은, 도 15를 참조하여 전술한 바와 같이, 수평 트래버스 스캔(horizontal traverse scan) 및 수직 트래버스 스캔(vertical traverse scan)을 포함할 수 있다. 일 예에서, 팔레트 복호화를 위한 스캔 방식은 비트스트림에 포함된 palette_transpose_flag를 복호화함으로써 결정될 수 있다. 예를 들어, palette_transpose_flag가 제1 값(e.g. 0)을 갖는 경우, 팔레트 복호화를 위한 스캔 방식은 수평 트래버스 스캔으로 결정될 수 있다. 이와 달리, palette_transpose_flag가 제2 값(e.g. 1)을 갖는 경우, 팔레트 복호화를 위한 스캔 방식은 수직 트래버스 스캔으로 결정될 수 있다.
팔레트 샘플 모드는, 전술한 바와 같이, 'INDEX' 모드 및 'COPY_ABOVE' 모드를 포함할 수 있다. 현재 샘플에 'INDEX' 모드가 적용되는 경우, 상기 현재 샘플에 매핑되는 팔레트 인덱스의 값은 비트스트림으로부터 직접 획득될 수 있다. 이에 반해, 현재 샘플에 'COPY_ABOVE' 모드가 적용되는 경우, 상기 현재 샘플에 매핑되는 팔레트 인덱스의 값은 상기 현재 샘플의 위쪽(수평 트래버스 스캔의 경우) 또는 왼쪽(수직 트래버스 스캔의 경우)에 존재하는 주변 샘플에 매핑된 팔레트 인덱스의 값으로 결정될 수 있다.
한편, 현재 샘플이 탈출 샘플인 경우, 상기 현재 샘플의 양자화된 픽셀값이 비트스트림으로부터 직접 획득될 수 있다. 탈출 샘플에는 탈출 팔레트 인덱스가 매핑될 수 있다.
영상 복호화 장치는 현재 블록에 대한 팔레트 테이블 및 팔레트 인덱스 맵에 기반하여 현재 블록을 복호화할 수 있다(S2960). 구체적으로, 영상 복호화 장치는, 팔레트 테이블을 참조하여, 팔레트 인덱스 맵 내의 각각의 팔레트 인덱스의 값을 대표 컬러값에 역매핑(inverse mapping)함으로써, 현재 블록에 대한 예측 블록을 생성할 수 있다.
영상 복호화 장치는 현재 블록에 대한 팔레트 테이블을 이용하여 팔레트 예측자를 업데이트할 수 있다(S2970). 예를 들어, 영상 복호화 장치는 팔레트 테이블에 포함된 적어도 하나의 팔레트 엔트리를 팔레트 예측자에 추가함으로써, 팔레트 예측자를 업데이트할 수 있다. 또한, 영상 복호화 장치는 팔레트 예측자에 포함된 적어도 하나의 팔레트 엔트리를 팔레트 테이블에 포함된 적어도 하나의 팔레트 엔트리로 대체함으로써, 팔레트 예측자를 업데이트할 수도 있다.
팔레트 예측자에 대한 업데이트 과정은, 팔레트 예측자가 최대 팔레트 사이즈에 도달할 때까지 계속하여 수행될 수 있다. 예를 들어, 팔레트 예측자는 최대 팔레트 사이즈에 도달할 때까지 팔레트 충전(palette stuffing)을 통해 업데이트될 수 있다.
일 예에서, 영상 복호화 장치는 영상 부호화 장치로부터 시그널링된 팔레트 예측자의 업데이트 정보에 기반하여 팔레트 예측자를 업데이트할 수도 있다.
현재 블록의 분할 구조가 로컬 듀얼 트리 구조인 경우(S2910의 'YES'), 영상 복호화 장치는 현재 블록에 팔레트 모드를 적용하지 않고, 팔레트 모드 이외의 통상의 예측 모드(e.g. 인트라 예측 모드, 인터 예측 모드 등)를 이용하여 현재 블록을 복호화할 수 있다(S2980). 통상의 예측 모드에 관한 구체적인 내용은 도 1 내지 도 14를 참조하여 전술한 바와 같다. 이 경우, 현재 CTU 내에서 현재 블록 이후에 팔레트 복호화되는 블록에 대해서는, 소정의 값(e.g. 0)으로 초기화된 팔레트 예측자가 적용되거나, 또는 현재 블록에 적용된 팔레트 예측자가 다시 적용될 수 있다.
이상, 상술한 본 개시의 실시예 #2에 따르면, 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인 경우, 현재 블록은 팔레트 모드 이외의 통상의 예측 모드를 이용하여 부호화/복호화될 수 있다. 이에 따라, 팔레트 예측자를 업데이트하는 과정 또한 스킵되므로, 팔레트 예측자가 유효한(valid) 팔레트 엔트리를 포함하지 못하게 되거나 유효하지 않은(invalid) 팔레트 엔트리를 포함하게 되는 문제를 해결할 수 있다.
본 개시의 예시적인 방법들은 설명의 명확성을 위해서 동작의 시리즈로 표현되어 있지만, 이는 단계가 수행되는 순서를 제한하기 위한 것은 아니며, 필요한 경우에는 각각의 단계가 동시에 또는 상이한 순서로 수행될 수도 있다. 본 개시에 따른 방법을 구현하기 위해서, 예시하는 단계에 추가적으로 다른 단계를 포함하거나, 일부의 단계를 제외하고 나머지 단계를 포함하거나, 또는 일부의 단계를 제외하고 추가적인 다른 단계를 포함할 수도 있다.
본 개시에 있어서, 소정의 동작(단계)을 수행하는 영상 부호화 장치 또는 영상 복호화 장치는 해당 동작(단계)의 수행 조건이나 상황을 확인하는 동작(단계)을 수행할 수 있다. 예를 들어, 소정의 조건이 만족되는 경우 소정의 동작을 수행한다고 기재된 경우, 영상 부호화 장치 또는 영상 복호화 장치는 상기 소정의 조건이 만족되는지 여부를 확인하는 동작을 수행한 후, 상기 소정의 동작을 수행할 수 있다.
본 개시의 다양한 실시예는 모든 가능한 조합을 나열한 것이 아니고 본 개시의 대표적인 양상을 설명하기 위한 것이며, 다양한 실시예에서 설명하는 사항들은 독립적으로 적용되거나 또는 둘 이상의 조합으로 적용될 수도 있다.
또한, 본 개시의 다양한 실시예는 하드웨어, 펌웨어(firmware), 소프트웨어, 또는 그들의 결합 등에 의해 구현될 수 있다. 하드웨어에 의한 구현의 경우, 하나 또는 그 이상의 ASICs(Application Specific Integrated Circuits), DSPs(Digital Signal Processors), DSPDs(Digital Signal Processing Devices), PLDs(Programmable Logic Devices), FPGAs(Field Programmable Gate Arrays), 범용 프로세서(general processor), 컨트롤러, 마이크로 컨트롤러, 마이크로 프로세서 등에 의해 구현될 수 있다.
또한, 본 개시의 실시예가 적용된 영상 복호화 장치 및 영상 부호화 장치는 멀티미디어 방송 송수신 장치, 모바일 통신 단말, 홈 시네마 비디오 장치, 디지털 시네마 비디오 장치, 감시용 카메라, 비디오 대화 장치, 비디오 통신과 같은 실시간 통신 장치, 모바일 스트리밍 장치, 저장 매체, 캠코더, 주문형 비디오(VoD) 서비스 제공 장치, OTT 비디오(Over the top video) 장치, 인터넷 스트리밍 서비스 제공 장치, 3차원(3D) 비디오 장치, 화상 전화 비디오 장치, 및 의료용 비디오 장치 등에 포함될 수 있으며, 비디오 신호 또는 데이터 신호를 처리하기 위해 사용될 수 있다. 예를 들어, OTT 비디오(Over the top video) 장치로는 게임 콘솔, 블루레이 플레이어, 인터넷 접속 TV, 홈시어터 시스템, 스마트폰, 태블릿 PC, DVR(Digital Video Recoder) 등을 포함할 수 있다.
도 30은 본 개시에 따른 실시예가 적용될 수 있는 컨텐츠 스트리밍 시스템을 예시적으로 나타내는 도면이다.
도 30에 도시된 바와 같이, 본 개시의 실시예가 적용된 컨텐츠 스트리밍 시스템은 크게 인코딩 서버, 스트리밍 서버, 웹 서버, 미디어 저장소, 사용자 장치 및 멀티미디어 입력 장치를 포함할 수 있다.
상기 인코딩 서버는 스마트폰, 카메라, 캠코더 등과 같은 멀티미디어 입력 장치들로부터 입력된 컨텐츠를 디지털 데이터로 압축하여 비트스트림을 생성하고 이를 상기 스트리밍 서버로 전송하는 역할을 한다. 다른 예로, 스마트폰, 카메라, 캠코더 등과 같은 멀티미디어 입력 장치들이 비트스트림을 직접 생성하는 경우, 상기 인코딩 서버는 생략될 수 있다.
상기 비트스트림은 본 개시의 실시예가 적용된 영상 부호화 방법 및/또는 영상 부호화 장치에 의해 생성될 수 있고, 상기 스트리밍 서버는 상기 비트스트림을 전송 또는 수신하는 과정에서 일시적으로 상기 비트스트림을 저장할 수 있다.
상기 스트리밍 서버는 웹 서버를 통한 사용자 요청에 기반하여 멀티미디어 데이터를 사용자 장치에 전송하고, 상기 웹 서버는 사용자에게 어떠한 서비스가 있는지를 알려주는 매개체 역할을 할 수 있다. 사용자가 상기 웹 서버에 원하는 서비스를 요청하면, 상기 웹 서버는 이를 스트리밍 서버에 전달하고, 상기 스트리밍 서버는 사용자에게 멀티미디어 데이터를 전송할 수 있다. 이때, 상기 컨텐츠 스트리밍 시스템은 별도의 제어 서버를 포함할 수 있고, 이 경우 상기 제어 서버는 상기 컨텐츠 스트리밍 시스템 내 각 장치 간 명령/응답을 제어하는 역할을 수행할 수 있다.
상기 스트리밍 서버는 미디어 저장소 및/또는 인코딩 서버로부터 컨텐츠를 수신할 수 있다. 예를 들어, 상기 인코딩 서버로부터 컨텐츠를 수신하는 경우, 상기 컨텐츠를 실시간으로 수신할 수 있다. 이 경우, 원활한 스트리밍 서비스를 제공하기 위하여 상기 스트리밍 서버는 상기 비트스트림을 일정 시간동안 저장할 수 있다.
상기 사용자 장치의 예로는, 휴대폰, 스마트 폰(smart phone), 노트북 컴퓨터(laptop computer), 디지털방송용 단말기, PDA(personal digital assistants), PMP(portable multimedia player), 네비게이션, 슬레이트 PC(slate PC), 태블릿 PC(tablet PC), 울트라북(ultrabook), 웨어러블 디바이스(wearable device, 예를 들어, 워치형 단말기 (smartwatch), 글래스형 단말기 (smart glass), HMD(head mounted display)), 디지털 TV, 데스크탑 컴퓨터, 디지털 사이니지 등이 있을 수 있다.
상기 컨텐츠 스트리밍 시스템 내 각 서버들은 분산 서버로 운영될 수 있으며, 이 경우 각 서버에서 수신하는 데이터는 분산 처리될 수 있다.
본 개시의 범위는 다양한 실시예의 방법에 따른 동작이 장치 또는 컴퓨터 상에서 실행되도록 하는 소프트웨어 또는 머신-실행가능한 명령들(예를 들어, 운영체제, 애플리케이션, 펌웨어(firmware), 프로그램 등), 및 이러한 소프트웨어 또는 명령 등이 저장되어 장치 또는 컴퓨터 상에서 실행 가능한 비-일시적 컴퓨터-판독가능 매체(non-transitory computer-readable medium)를 포함한다.
본 개시에 따른 실시예는 영상을 부호화/복호화하는데 이용될 수 있다.

Claims (15)

  1. 영상 복호화 장치에 의해 수행되는 영상 복호화 방법으로서, 상기 영상 복호화 방법은,
    현재 블록에 팔레트 모드가 적용되는 경우, 비트스트림으로부터 상기 현재 블록에 대한 팔레트 정보 및 팔레트 인덱스 예측 정보를 획득하는 단계;
    상기 팔레트 정보에 기반하여 상기 현재 블록에 대한 팔레트 예측자를 구성하고, 상기 팔레트 예측자에 기반하여 상기 현재 블록에 대한 팔레트 테이블을 구성하는 단계;
    상기 팔레트 인덱스 예측 정보에 기반하여, 상기 현재 블록에 대한 팔레트 인덱스 맵을 생성하는 단계; 및
    상기 팔레트 테이블 및 상기 팔레트 인덱스 맵에 기반하여, 상기 현재 블록을 복호화하는 단계를 포함하고,
    상기 팔레트 예측자는 상기 현재 블록의 분할 구조에 기반하여 선택적으로 업데이트되는
    영상 복호화 방법.
  2. 제1항에 있어서,
    상기 현재 블록이 크로마 블록이고, 상기 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인 경우, 상기 팔레트 예측자는 업데이트되지 않는
    영상 복호화 방법.
  3. 제2항에 있어서,
    상기 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인지 여부는, 상기 현재 블록의 트리 타입 및 상기 현재 블록을 포함하는 CTU의 분할 구조 중 적어도 하나에 기반하여 결정되는
    영상 복호화 방법.
  4. 제1항에 있어서,
    상기 현재 블록이 크로마 블록이고, 상기 현재 블록의 분할 구조가 로컬 듀얼 트리 구조가 아닌 경우, 상기 팔레트 예측자는 상기 팔레트 테이블에 기반하여 업데이트되는
    영상 복호화 방법.
  5. 제4항에 있어서,
    상기 업데이트된 팔레트 예측자는, 상기 팔레트 테이블에 포함된 적어도 하나의 팔레트 엔트리를 포함하는
    영상 복호화 방법.
  6. 상기 업데이트된 팔레트 예측자는, 소정의 최대 크기 범위 내에서 상기 팔레트 테이블에 포함되지 않는 적어도 하나의 새로운 팔레트 엔트리를 포함하는
    영상 복호화 방법.
  7. 제1항에 있어서,
    상기 현재 블록에 팔레트 모드를 적용할지 여부는, 상기 현재 블록의 예측 모드 타입에 기반하여 결정되는
    영상 복호화 방법.
  8. 제7항에 있어서,
    상기 현재 블록의 예측 모드 타입이, 인트라 예측, IBC(intra block copy), 팔레트 모드 및 인터 예측이 모두 적용될 수 있는 제1 모드 타입인 경우, 상기 현재 블록에 팔레트 모드가 적용되는
    영상 복호화 방법.
  9. 제7항에 있어서,
    상기 현재 블록의 예측 모드 타입이, 인트라 예측만이 적용될 수 있는 제2 모드 타입인 경우, 상기 현재 블록에 팔레트 모드가 적용되지 않는
    영상 복호화 방법.
  10. 메모리 및 적어도 하나의 프로세서를 포함하는 영상 복호화 장치로서,
    상기 적어도 하나의 프로세서는,
    현재 블록에 팔레트 모드가 적용되는 경우, 비트스트림으로부터 상기 현재 블록에 대한 팔레트 정보 및 팔레트 인덱스 예측 정보를 획득하고,
    상기 팔레트 정보에 기반하여 상기 현재 블록에 대한 팔레트 예측자를 구성하고, 상기 팔레트 예측자에 기반하여 상기 현재 블록에 대한 팔레트 테이블을 구성하는 단계;
    상기 팔레트 인덱스 예측 정보에 기반하여, 상기 현재 블록에 대한 팔레트 인덱스 맵을 생성하고,
    상기 팔레트 테이블 및 상기 팔레트 인덱스 맵에 기반하여, 상기 현재 블록을 복호화하며,
    상기 팔레트 예측자는 상기 현재 블록의 분할 구조에 기반하여 선택적으로 업데이트되는
    영상 복호화 장치.
  11. 영상 부호화 장치에 의해 수행되는 영상 부호화 방법으로서, 상기 영상 부호화 방법은,
    현재 블록에 팔레트 모드가 적용되는 경우, 상기 현재 블록에 대한 팔레트 예측자를 구성하고, 상기 팔레트 예측자에 기반하여 상기 현재 블록에 대한 팔레트 테이블을 구성하는 단계;
    상기 팔레트 테이블에 기반하여, 상기 현재 블록에 대한 팔레트 인덱스 맵을 생성하는 단계; 및
    상기 팔레트 인덱스 맵에 기반하여 상기 현재 블록을 부호화하는 단계를 포함하고,
    상기 팔레트 예측자는 상기 현재 블록의 분할 구조에 기반하여 선택적으로 업데이트되는
    영상 부호화 방법.
  12. 제11항에 있어서,
    상기 현재 블록이 크로마 블록이고, 상기 현재 블록의 분할 구조가 로컬 듀얼 트리 구조인 경우, 상기 팔레트 예측자는 업데이트되지 않는
    영상 부호화 방법.
  13. 제11항에 있어서,
    상기 현재 블록이 크로마 블록이고, 상기 현재 블록의 분할 구조가 로컬 듀얼 트리 구조가 아닌 경우, 상기 팔레트 예측자는 상기 팔레트 테이블에 기반하여 업데이트되는
    영상 부호화 방법.
  14. 제11항에 있어서,
    상기 현재 블록에 팔레트 모드를 적용할지 여부는, 상기 현재 블록의 예측 모드 타입에 기반하여 결정되는
    영상 부호화 방법.
  15. 제11항의 영상 부호화 방법에 의해 생성된 비트스트림을 전송하는 방법.
PCT/KR2020/012898 2019-09-23 2020-09-23 팔레트 모드를 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법 WO2021060844A1 (ko)

Priority Applications (7)

Application Number Priority Date Filing Date Title
KR1020227008747A KR20220047834A (ko) 2019-09-23 2020-09-23 팔레트 모드를 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법
JP2022518236A JP7362910B2 (ja) 2019-09-23 2020-09-23 パレットモードを用いた画像符号化/復号化方法、装置、及びビットストリームの伝送方法
CN202080066527.8A CN114521328A (zh) 2019-09-23 2020-09-23 使用调色板模式的图像编码/解码方法和装置及发送比特流的方法
CA3155112A CA3155112A1 (en) 2019-09-23 2020-09-23 Image encoding/decoding method and device using palette mode, and method for transmitting bitstream
US17/697,474 US11689732B2 (en) 2019-09-23 2022-03-17 Image encoding/decoding method and device using palette mode, and method for transmitting bitstream
US18/198,170 US12003740B2 (en) 2019-09-23 2023-05-16 Image encoding/decoding method and device using palette mode, and method for transmitting bitstream
JP2023172537A JP2023171923A (ja) 2019-09-23 2023-10-04 パレットモードを用いた画像符号化/復号化方法、装置、及びビットストリームの伝送方法

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201962904578P 2019-09-23 2019-09-23
US62/904,578 2019-09-23

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/697,474 Continuation US11689732B2 (en) 2019-09-23 2022-03-17 Image encoding/decoding method and device using palette mode, and method for transmitting bitstream

Publications (1)

Publication Number Publication Date
WO2021060844A1 true WO2021060844A1 (ko) 2021-04-01

Family

ID=75166721

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2020/012898 WO2021060844A1 (ko) 2019-09-23 2020-09-23 팔레트 모드를 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법

Country Status (6)

Country Link
US (2) US11689732B2 (ko)
JP (2) JP7362910B2 (ko)
KR (1) KR20220047834A (ko)
CN (1) CN114521328A (ko)
CA (1) CA3155112A1 (ko)
WO (1) WO2021060844A1 (ko)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022250276A1 (ko) * 2021-05-28 2022-12-01 엘지전자 주식회사 포인트 클라우드 데이터 전송 방법, 포인트 클라우드 데이터 전송 장치, 포인트 클라우드 데이터 수신 방법 및 포인트 클라우드 데이터 수신 장치

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210093891A (ko) * 2018-12-18 2021-07-28 엘지전자 주식회사 이차 변환에 기반한 영상 코딩 방법 및 그 장치
EP3941046A4 (en) * 2019-03-14 2022-12-21 LG Electronics Inc. IMAGE CODING/DECODING METHOD AND APPARATUS FOR PERFORMING INTRA PREDICTION, AND BITSTREAM TRANSMISSION METHOD
WO2021244420A1 (en) 2020-05-31 2021-12-09 Beijing Bytedance Network Technology Co., Ltd. Palette mode with local dual tree modetype definition

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160123287A (ko) * 2013-12-18 2016-10-25 에이치에프아이 이노베이션 인크. 팔레트 테이블 예측을 위한 방법 및 장치
KR20170016958A (ko) * 2014-06-27 2017-02-14 후아웨이 테크놀러지 컴퍼니 리미티드 개선된 팔레트 테이블 및 인덱스 맵 코딩 방법들을 이용한 진보된 스크린 콘텐츠 코딩
KR20180053702A (ko) * 2015-09-14 2018-05-23 퀄컴 인코포레이티드 비디오 코딩을 위한 팔레트 예측자 초기화 및 병합
KR20190057159A (ko) * 2014-12-19 2019-05-27 에이치에프아이 이노베이션 인크. 비디오 및 이미지 코딩에서의 비-444 색채 포맷을 위한 팔레트 기반 예측의 방법

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114630131B (zh) * 2014-11-12 2023-11-07 寰发股份有限公司 索引映射编解码中的跳出像素编解码方法
WO2016120468A1 (en) * 2015-01-29 2016-08-04 Canon Kabushiki Kaisha Palette predictor initializer when encoding or decoding self-contained coding structures
US20190246122A1 (en) * 2018-02-08 2019-08-08 Qualcomm Incorporated Palette coding for video coding
WO2021018166A1 (en) * 2019-07-29 2021-02-04 Beijing Bytedance Network Technology Co., Ltd. Scanning order improvements for palette mode coding
US11206413B2 (en) * 2019-08-13 2021-12-21 Qualcomm Incorporated Palette predictor updates for local dual trees
US11388443B2 (en) * 2019-09-18 2022-07-12 Qualcomm Incorporated Harmonization of deblocking conditions in video coding
US11240507B2 (en) * 2019-09-24 2022-02-01 Qualcomm Incorporated Simplified palette predictor update for video coding

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160123287A (ko) * 2013-12-18 2016-10-25 에이치에프아이 이노베이션 인크. 팔레트 테이블 예측을 위한 방법 및 장치
KR20170016958A (ko) * 2014-06-27 2017-02-14 후아웨이 테크놀러지 컴퍼니 리미티드 개선된 팔레트 테이블 및 인덱스 맵 코딩 방법들을 이용한 진보된 스크린 콘텐츠 코딩
KR20190057159A (ko) * 2014-12-19 2019-05-27 에이치에프아이 이노베이션 인크. 비디오 및 이미지 코딩에서의 비-444 색채 포맷을 위한 팔레트 기반 예측의 방법
KR20180053702A (ko) * 2015-09-14 2018-05-23 퀄컴 인코포레이티드 비디오 코딩을 위한 팔레트 예측자 초기화 및 병합

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
J. YE (TENCENT), X. LI (TENCENT), S. LIU (TENCENT), X. XU (TENCENT): "CE15-related: Palette mode when dual-tree is enabled", 124. MPEG MEETING; 20181008 - 20181012; MACAO; (MOTION PICTURE EXPERT GROUP OR ISO/IEC JTC1/SC29/WG11), 29 September 2018 (2018-09-29), XP030191377 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022250276A1 (ko) * 2021-05-28 2022-12-01 엘지전자 주식회사 포인트 클라우드 데이터 전송 방법, 포인트 클라우드 데이터 전송 장치, 포인트 클라우드 데이터 수신 방법 및 포인트 클라우드 데이터 수신 장치

Also Published As

Publication number Publication date
US12003740B2 (en) 2024-06-04
CN114521328A (zh) 2022-05-20
KR20220047834A (ko) 2022-04-19
US20230291915A1 (en) 2023-09-14
US11689732B2 (en) 2023-06-27
JP2022549263A (ja) 2022-11-24
JP2023171923A (ja) 2023-12-05
CA3155112A1 (en) 2021-04-01
US20220210449A1 (en) 2022-06-30
JP7362910B2 (ja) 2023-10-17

Similar Documents

Publication Publication Date Title
WO2021060844A1 (ko) 팔레트 모드를 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법
WO2020251330A1 (ko) 단순화된 mpm 리스트 생성 방법을 활용하는 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법
WO2021101317A1 (ko) 무손실 색상 변환을 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법
WO2020251328A1 (ko) 인트라 예측 모드 변환에 기반한 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법
WO2020213931A1 (ko) 레지듀얼 계수의 차분 부호화를 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법
WO2020013541A1 (ko) 비디오 신호를 처리하기 위한 방법 및 장치
WO2020251329A1 (ko) Mip 모드 매핑이 단순화된 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법
WO2021172914A1 (ko) 레지듀얼 코딩에 대한 영상 디코딩 방법 및 그 장치
WO2021060847A1 (ko) 컬러 포맷에 기반하여 분할 모드를 결정하는 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법
WO2021086020A1 (ko) 색공간 변환을 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법
WO2021054796A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021086055A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021096290A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021054798A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021015536A1 (ko) 팔레트 모드의 적용 여부에 따라 디블로킹 필터링을 수행하는 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법
WO2021167421A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021086021A1 (ko) 적응적 변환을 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법
WO2021086022A1 (ko) 적응적 색상 변환을 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법
WO2021054787A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021006698A1 (ko) 영상 코딩 시스템에서 영상 코딩 방법 및 장치
WO2021006697A1 (ko) 레지듀얼 코딩에 대한 영상 디코딩 방법 및 그 장치
WO2020262962A1 (ko) 크로마 변환 블록의 최대 크기 제한을 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법
WO2021086023A1 (ko) 적응적 변환을 이용하여 레지듀얼 처리를 수행하는 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법
WO2021194221A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021201549A1 (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: 20867742

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 20227008747

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 3155112

Country of ref document: CA

ENP Entry into the national phase

Ref document number: 2022518236

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20867742

Country of ref document: EP

Kind code of ref document: A1